GeneralCzech in TeXnicCenter

General information and discussion about TeXnicCenter
raca
Posts: 6
Joined: Mon Dec 21, 2009 11:20 pm

Czech in TeXnicCenter

Post by raca »

Hello,
I've troubles with including czech alphabet. The letters like ě, ř, ů, ť don't display correctly ´when pdf is created, eventhough the manbual says, they should. If I use only MiXTeX, everything is OK - and the only difference is that in MiXTeX I use [utf8]{inputenc}. But in TeXnicCenter utf8 doesn't work, so I need to use [ansinew]... And the output is Wrong.
I'm gratitude for every help... TC is amazing, but if I can't use mother tongue, it's pretty useles.

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org
LaTeX Beginner's Guide LaTeX Cookbook LaTeX TikZ graphics TikZによるLaTeXグラフィックス
User avatar
localghost
Site Moderator
Posts: 9201
Joined: Fri Feb 02, 2007 12:06 pm

Re: Czech in TeXnicCenter

Post by localghost »

It seems that you are using TeXnicCenter (TXC) 1.0 RC1 which does not support unicode. You may try TXC 2.0 alpha 1 (Build 1012) or any other editor that does so.


Best regards
Thorsten
How to make a "Minimal Example"
Board Rules
Avoidable Mistakes[/size]

¹ System: openSUSE 42.2 (Linux 4.4.52), TeX Live 2016 (vanilla), TeXworks 0.6.1
raca
Posts: 6
Joined: Mon Dec 21, 2009 11:20 pm

Re: Czech in TeXnicCenter

Post by raca »

Thats true, thanks... I'll try it and write the result. Marry Chrismas :)
raca
Posts: 6
Joined: Mon Dec 21, 2009 11:20 pm

Re: Czech in TeXnicCenter

Post by raca »

I've installed center 2.0 alpha, build 1012, but the troubles are remaining. Now, the utf8 works, but, if I build the output, the problematic characters don't display at all.

I only take the basic example from mixtex 2.8 online help (chapter 'first steps') and copy paste it to texniccenter - where it don't work.
User avatar
localghost
Site Moderator
Posts: 9201
Joined: Fri Feb 02, 2007 12:06 pm

Czech in TeXnicCenter

Post by localghost »

Just saying »Doesn't work« is trivial without giving any concrete example here. Copy the sample below and insert only special Czech characters where I marked it.

Code: Select all

\documentclass[11pt,a4paper,czech]{article}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage{babel}

\begin{document}
  % put some special Czech characters here
\end{document}
Make sure that all formats for your language exist [1]. Start a run on this file and see what happens. Report back and attach the generated log file if necessary.

This issue is not related to the editor or the encoding of the source file. Until now I have been able to write my documents in all versions of TXC (although I have changed to TeXworks). And my mother tongue is German. But in opposite to Czech it is already set up in MiKTeX.

[1] MiKTeX 2.8 Documentation - Select Hyphenation Tables
How to make a "Minimal Example"
Board Rules
Avoidable Mistakes[/size]

¹ System: openSUSE 42.2 (Linux 4.4.52), TeX Live 2016 (vanilla), TeXworks 0.6.1
raca
Posts: 6
Joined: Mon Dec 21, 2009 11:20 pm

Czech in TeXnicCenter

Post by raca »

!Package inputenc error: unicode char \u8:ěšč not setup for use with LaTeX.
But this cannot be true, because in MiXTeX characters like 'ě' 'š' 'č' display correctly in the output, and I'm also using [utf8]{inputenc}. When I take the code you wrote above and put it in TXC --> the errors occure and in the output problematic characters are missing (it figures 'ebek' instead of 'žebříček' for example). Then I copypaste it to MiXTeX and the output is built without errors and every letter is painted correctly.
rockstar1707
Posts: 27
Joined: Wed Jan 17, 2007 12:35 pm

Re: Czech in TeXnicCenter

Post by rockstar1707 »

I think that when you create new document, TXC2 Alpha automatically sets it to ANSI encoding, and you can't change it to UTF8 inside TXC. This is what I do:

1) Make new document in TXC
2) Open that document in some other text editor, which has good support for encodings. Personally I use Geany (http://www.geany.org/).
3) In Geany I set up UTF-8 encoding for the document and I write some non-ASCII characters in it.
4) I open the document in TXC again, and now it correctly recognizes UTF-8 encoding.

Note, that in step 3 you have to write some non-ASCII characters.

I believe that in the final version there will be an option to set up the default encoding for newly created files.

And there's one more bug with non-ASCII characters. autocompletion doesn't work on lines/paragraphs with non-ASCII characters. I described that in this bug report http://sourceforge.net/tracker/index.ph ... tid=479426
User avatar
localghost
Site Moderator
Posts: 9201
Joined: Fri Feb 02, 2007 12:06 pm

Czech in TeXnicCenter

Post by localghost »

rockstar1707 wrote:I think that when you create new document, TXC2 Alpha automatically sets it to ANSI encoding, and you can't change it to UTF8 inside TXC. [...]
I have no problem with changing the encoding in TXC. I just choose »Save as« from the »File« menu and change the encoding in the dialog window.


Best regards
Thorsten
How to make a "Minimal Example"
Board Rules
Avoidable Mistakes[/size]

¹ System: openSUSE 42.2 (Linux 4.4.52), TeX Live 2016 (vanilla), TeXworks 0.6.1
rockstar1707
Posts: 27
Joined: Wed Jan 17, 2007 12:35 pm

Czech in TeXnicCenter

Post by rockstar1707 »

localghost wrote: I have no problem with changing the encoding in TXC. I just choose »Save as« from the »File« menu and change the encoding in the dialog window.
Hmm, I have already filled a bug report against this, since in Save As dialog I don't see options for changing encoding. I'm using Win32 XP SP3.

The bug is here: http://sourceforge.net/tracker/index.ph ... tid=416430

And this is what I see (those red ??? were added by me):
txc2alphasaveas.png
txc2alphasaveas.png (31.58 KiB) Viewed 10072 times
User avatar
localghost
Site Moderator
Posts: 9201
Joined: Fri Feb 02, 2007 12:06 pm

Re: Czech in TeXnicCenter

Post by localghost »

Really very astonishing. On my Windows system it works fine. Good that it's still an alpha version.
Attachments
TXC2alpha2-SaveAs-Encoding.png
TXC2alpha2-SaveAs-Encoding.png (31.35 KiB) Viewed 10071 times
How to make a "Minimal Example"
Board Rules
Avoidable Mistakes[/size]

¹ System: openSUSE 42.2 (Linux 4.4.52), TeX Live 2016 (vanilla), TeXworks 0.6.1
Post Reply