TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

How can we write Greek documents (i.e. in the Greek language) having the computer modern font? What code do we have to write? I'd like to note that I don't want to include some Greek letters, but I'd like to write an entire Greek text.

share|improve this question
This and this may help you. – Manuel Mar 3 '13 at 12:38
@Manuel Thank you for your help, but I would like to write the greek text entering greek caracters and the font would be like this is one from the first site that you gave me above. Let's say I would like to write φύσις and the written word would be like that one. Do you have any idea? – giannis Mar 18 '13 at 12:43
I don't understad you, but the first link lets you write φύσις. – Manuel Mar 18 '13 at 21:18
Are you perhaps asking if Computer Modern itself has support for Greek as a means of communication (as opposed to its use in mathematics)? Is this a question about the font, or is it a question about LaTeX? – Sean Allred Apr 9 '13 at 20:46
@SeanAllred It's more a question about the font. I want to write in Greek (to produce a Greek text, like having my keyboard in Greek), not by doing it like the manuals seen above. Also, if you know another font that can offer the same beautiful result just like this one font, as an alternative option, I would really appreciate it. – giannis Apr 9 '13 at 20:54
up vote 11 down vote accepted

It's not at all difficult, if you have an up-to-date TeX distribution.

% !TEX encoding = UTF-8



Η Αθήνα (Ἀθῆναι στα αρχαία ελληνικά και την καθαρεύουσα) είναι η
πρωτεύουσα της Ελλάδας. Επίσης είναι η έδρα της Περιφέρειας
Αττικής. Βρίσκεται στη Στερεά (Κεντρική) Ελλάδα και αποτελεί εύρωστο
οικονομικό, πολιτιστικό και διοικητικό κέντρο της χώρας. Πήρε το όνομά
της από τη θεά Αθηνά που ήταν και η προστάτιδά της. Η Αθήνα σήμερα
είναι μία σύγχρονη πόλη αλλά και διάσημη, καθώς στην αρχαιότητα ήταν
πανίσχυρη πόλη-κράτος και σημαντικότατο κέντρο πολιτισμού· θεωρείται η
ιστορικότερη πόλη της Ευρώπης μαζί με τη Ρώμη. Είναι γνωστή σε όλο τον
κόσμο για τα ιστορικά της μνημεία που διασώθηκαν,έστω και μερικώς, στο
πέρασμα των αιώνων. Επίνειο της ιστορικής πόλης είναι το λιμάνι του
Πειραιά. Πολιούχος της Πόλης των Αθηνών είναι ο Άγιος Διονύσιος ο


The text is from http://el.wikipedia.org/wiki/Αθήνα

enter image description here

With an older TeX system (but I recommend you to upgrade) you get the same result with the following code.

% !TEX encoding = UTF-8


Η Αθήνα (Ἀθῆναι στα αρχαία ελληνικά και την καθαρεύουσα) είναι η

share|improve this answer
Thank you very very much. I didn't know such a thing. I really think that you're saving me from so much time! – giannis Apr 9 '13 at 20:58
when I've tried just the same code as yours i've seen this error message: – giannis Apr 9 '13 at 21:03
! Package fontenc Error: Encoding file `lgrxenc.def' not found. (fontenc) You might have misspelt the name of the encoding. – giannis Apr 9 '13 at 21:04
@giannis This means you don't have an up-to-date TeX distribution. Can you add to your question what it is? However I've added a workaround to use until you upgrade. – egreg Apr 9 '13 at 21:06

Another option would be to use XeLaTeX. In this case you need to install CM-Unicode with the standard procedure of your Operating System (C:\windows\fonts catalog in windows ~/.fonts in Linux etc)

\setmainfont[Mapping=tex-text]{CMU Serif}
\setsansfont[Mapping=tex-text]{CMU Sans Serif}
\setmonofont{CMU Typewriter Text}
Κείμενο στα ελληνικά

Text in english

Alternatively you may use package polyglossia which is the replacement of babel for XeLaTeX but especially for the greek language, xgreek is probably a better choice. For more info look here (section "Ελληνικά")

The main advantage of XeLaTeX over pdfLaTeX is that you can easily use native system fonts and that you can also use ucharclasses which is a package that will allow you to change hyphenation rules without explicitly declaring the languages (with the restriction that the involved languages must be members of different unicode blocks). You may find a minimum working example, plus some extra info here

share|improve this answer
I've noticed that the only text that I can have is only what you've written above. I don't know why... :/ – giannis May 18 '13 at 15:50
That's really strange, but I am afraid that unless you provide some more info it is not going to be possible to get help... Perhaps you could open a new question with the specific problem, or at the very least upload the tex file and the log file. In any case, make sure that your tex distribution is updated and that you use the latest version of CM-Unicode. – pmav99 May 18 '13 at 21:13
I've recently updated them so as to achieve it. However, what I see as a result is only commas, full stops, and all the punctuation of the text, except for the text itself. – giannis May 18 '13 at 22:48
What operating system do you use? Make sure that the OS can see the fonts. It sounds like they are not installed. In Windows you need to place them in C:\Windows\fonts directory. In Linux at ~.fonts and run fc-cache -fv. Google it for more info. – pmav99 May 19 '13 at 9:34
I use the OS of Windows 7 and I am sure that I've placed the fonts in the appropriate file, just like as you noticed above. – giannis May 19 '13 at 10:08

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.