I want to write in latex a text at which there are some lemmas.

So we could use the command



Could we write instead of "Lemma" something in greek??

When I write


I get an error...

What could I do??

  • 2
    Welcome to TeX.SE. How is the Lemma environment defined? Do you load any packages, such as amsthm and ntheorem, that facilitate the creation of theorem-like environments? Which LaTeX format do you use: pdfLaTeX, XeLaTeX, LuaLaTeX, or something else? – Mico Apr 13 '15 at 3:23
  • 1
    Why would you do that? The text from \begin{<anything>} and \end{<anything>} will not appear in the output (as opposed to what is written inbetween those two commands), and you could define any environment to include the word "lemma" (in Greek) as you pleased.... – jon Apr 13 '15 at 3:24
  • Can someone explain to me what is unclear about this question? I realize it shows lack of some LaTeX knowledge, but this itself doesn't make it unclear. – yo' Apr 22 '15 at 5:59

You could do it with XeLaTeX or LuaLaTeX, but not with pdfLaTeX.

The reason is that TeX (on which pdfTeX is based) was born before Unicode was thought of. So TeX doesn't understand Unicode natively and this causes some “problems”.

Let's look at the Unicode character Λ U+039B GREEK CAPITAL LETTER LAMDA. When your editor is set up for UTF-8 and you type Λ, the editor actually records two characters (better, bytes) in the file: <CE><9B>. Any Unicode compliant program that reads the same file, would recognize the byte <CE> as a UTF-8 prefix for a two-byte encoded character, look at the next byte and, after finding <9B>, it would interpret the pair of bytes as Λ as if it had been a unique character to begin with.

With TeX the situation is different. It can't interpret two, three or four byte UTF-8 characters as if they had been one from the start, because TeX just knows bytes. So, upon finding <CE><9B> it doesn't know more than these two bytes.

Fortunately, TeX understands macro definitions, which can be used to emulate UTF-8. Any character can be made into a macro and indeed, \usepackage[utf8]{inputenc} makes the <CE> byte into a macro. This macro absorbs the next token and from it it produces some other macro; in the case of <CE><9B> the macro produced is \textLambda, which is later interpreted to print a capital lambda.

As a consequence, your desired \begin{Λήμμα} would hand TeX not a sequence of characters to interpret in order to find the name of the environment, but a sequence of instructions to print a word in the Greek alphabet.

When \begin{lemma} is found, the macro \lemma is executed (defined when \newtheorem{lemma} had been processed). With pdfLaTeX it's not possible to have \begin{Λήμμα} without giving up at several more useful constructs.

It's not really difficult to set up \newtheorem so that \newtheorem{Λήμμα}{Λήμμα} is accepted and even to redefine \begin so that \begin{Λήμμα} is interpreted correctly. However, this would break several packages: the pros and cons balance leans too much towards the cons side.

You can do




if you use XeLaTeX or LuaLaTeX for processing your document. However, I see no real advantage in doing so: code reusability is much more important, in my opinion.

Just to make things clearer: you can do


with any engine (provided Greek support is enabled if the engine is pdfLaTeX). The printed label can be anything printable. The symbolic label, used in the source code, should be ASCII characters.

| improve this answer | |

I'm going to guess that what you really want is to see the word "Λήμμα" in your formatted document; how to get it there is not particularly important. As @egreg explained in his answer, it's not easy to include non-English characters in the definition of command names. Fortunately the amsthm package (which presumably you're using, if you are using \newtheorem) makes it possible to do what you want without using Greek in macro names.

The command \newtheorem has the syntax: \newtheorem{commandname}{Displayed name}. Use it to define your own lemma environment, like this:


Use whatever name you want instead of mylemma, but use only English letters. If your document is set up to handle Greek in the regular text (in the "body" of your document), this definition should Just Work. Then you just type \begin{mylemma} instead of \begin{Lemma}, and you'll see Λήμμα 1 etc. in your document.

Incidentally, if you want to write text in Greek, you must switch to XeTeX or LuaTeX (I don't know enough to compare them, but either one will do). Especially if you're new to latex, which I'm guessing you are. It's simply not worth figuring out how to make pdftex work with unicode, when the alternatives are so much more robust for this purpose (and let you use your favorite Greek fonts).

Edit: Here's a minimal compilable example, since you seem unsure how to use the theorem environment. (Needs to be compiled with XeLaTeX.) Please use a version of such an example if you have questions in the future.



\setmainfont{TeX Gyre Termes}

x = x

y = y
| improve this answer | |
  • 1
    it's not amsmath that provides \newtheorem, it's amsthm. (but if one is writing theorems, they're probably also indulging in math, so loading both packages is a good idea.) – barbara beeton Apr 13 '15 at 20:13
  • Oops, thanks! Dropped the reference to amsmath. – alexis Apr 14 '15 at 13:00
  • 2
    good try, but if i were a newbie, i wouldn't have the foggiest idea what the "ams system" might be. (even as an employee of ams, i'm not really sure.) "the amsthm package", on the other hand, should be clear in latex terminology. – barbara beeton Apr 14 '15 at 19:18
  • Ok, I'll take your advice on this. The OP must know what I meant but other readers could indeed have no idea. – alexis Apr 14 '15 at 20:12
  • Thank you!! I have also two other questions. 1)If we want to write more than one Lemmas do we have to write the following? \newtheorem{mylemma1}{Λήμμα 1.} \\ \begin{mylemma1} $A(x,y)>y$ \end{mylemma1} \\ \newtheorem{mylemma2}{Λήμμα 2.} \\ \begin{mylemma2} $A(x,y+1)>A(x,y)$ \end{mylemma2} ... or is there a specific command for that?? 2) When we write the command \newtheorem{mylemma1}{Λήμμα 1.} \\ \begin{mylemma1} $A(x,y)>y$ \end{mylemma1} , "A(x,y)>y" appears the line under "Λήμμα 1.". Could we write it also at the same line?? @alexis – Mary Star Apr 15 '15 at 23:11

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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