4

Using the standard babel package is compeltely counter-intuitive as the letters in the keyboard do not match the babel package and also the accent is in a different key which makes it impossible to write anything longer than a couple of lines (without real patience).

What I am looking is to directly type in greek in the TexnicCenter environment without having use the babel settings.

As suggested here http://www.eelvex.net/latex/greek-in-latex/ these two commands in the preamble should work

\usepackage[english,greek]{babel} \usepackage[iso-8859-7]{inputenc}

but in that case the greek text compiles to ';;;;;;'. When I change the setting to iso-8 \usepackage[utf-8]{inputenc}the document does not compile at all.

Also I am trying to use \usepackage{auto-greek} but in that case I cannot find the package.

When I am saving the .tex file the default setting is in ANSI rather in any of the UTF options. When I change the encoding of the final saved file to UTF it compiles but still no greek in the output.

How is it possible to write greek direct to TexnicCenter and getting a proper document? (A small example of a document would greatly help)

Thanks

1 Answer 1

3

I don't have texniccenter so I don't know if it can save a file in iso-8859-7 encoding – but I doubt it, texniccenter never made the impression to me as if it cared about encodings much.

As far as I know the newest texniccenter (version 2.X) can save in utf8. I would use this encoding. You will need a lgrenc.dfu (you can find it on the net) and then this should work fine with pdflatex (edited after the discussion in the comments):

\documentclass{article}
\usepackage[utf8]{inputenc} %needs lgrenc.dfu
\usepackage[english,greek]{babel}
\usepackage[LGRX,T1]{fontenc} %with newer versions of lgrenc.dfu one must
% load (with the help of fontenc) lgrxenc.def
% which can be found on milde.users.sourceforge.net/LGR
\begin{document}
αω \selectlanguage{english} text

\end{document}

If you need a lot of greek you could also consider to use xelatex.

9
  • I am not really sure about the lgrenc.dfu file. Should I save it here C:\Program Files\MiKTeX 2.9\tex\latex\base ? or is a specific folder where I have to put this file. Is dropping it in a folder enough? Regarding the encoding for the .tex file UTF is the only option as the ANSI setting does not save the greek characters in the tex. I did try to run the part above and did not get anything but I think that has to do with the encoding file.
    – o4tlulz
    Commented May 19, 2011 at 10:21
  • I have lgrenc.dfu in I:\UFlocaltexmf\tex\generic\babel\lgrenc.dfu where UFlocaltexmf is one of my local roots. How to add a local root with miktex is described in the documentation of miktex. Commented May 19, 2011 at 10:29
  • I changed the encoding to '\usepackage[utf8x]{inputenc}' (extended?) rather than the \usepackage[utf8]{inputenc}with the file encoding when saved changed to UTF8 from the default ANSI and everything is fine. Will try to work with it and see if I come across any issues.
    – o4tlulz
    Commented May 19, 2011 at 12:10
  • The option utf8x uses the ucs-package which is not really recommended. It is better to extend the standard inputenc/utf8 by adding the needed dfu-file. tex.stackexchange.com/questions/13067/utf8x-vs-utf8-inputenc Commented May 19, 2011 at 12:43
  • Now I am completely lost. Compiling this \documentclass{article} \usepackage[utf8]{inputenc} \usepackage[T1]{fontenc} \usepackage[english,greek]{babel} \begin{document} Ελληνικό κείμενο \selectlanguage{english} text \end{document} just does not include greek. I have saved the duf file in the babel folder C:\Program Files\MiKTeX 2.9\tex\generic\babel which is already at the root folder of Miktex, refreshed all the Miktex configurations and the greek part still does not compile ot greek, rather than empty space.
    – o4tlulz
    Commented May 19, 2011 at 14:41

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .