# lgrxenc.def not nound

Yesterday I've finally reinstalled my TeXLive to the version of 2014. While compiling, I have the following error:

fontec.sty Package fontenc Error: Encoding file lgrxenc.def' not found \ProcessOptions*

What can in mean and how do I fight it?

• Do you mean fontenc.sty? As always we need a minimal example which is compilable and shows this error to us. Like this (for me) its just a guessing around. – LaRiFaRi Jul 16 '14 at 7:27
• the lgrx-package is obsolete and has been replaced by greek-fontenc. See the readme to learn how to adapt your documents: ftp.gwdg.de/pub/ctan/obsolete/macros/latex/contrib/lgrx/README – Ulrike Fischer Jul 16 '14 at 7:29
• Yes, well, I think I have found the answer to my problem. There was an old package in preamble that I've tried to use, so I've just got rid of it. Sorry for a stupid question. – user17040 Jul 16 '14 at 7:29
• @user17040 No, it's not a stupid question. For a number of reasons, Greek encodings never reached an “official” status and a couple of years ago a special LGRx encoding was proposed that allowed direct UTF-8 input also for Greek. After this, the encoding was incorporated into Babel and in the “official” files, so \usepackage[LGRx]{fontenc} has become illegal. Perhaps, for ensuring back compatibility, such code should issue a warning instead of a weird error. – egreg Jul 16 '14 at 8:43
• Many thanks for the replies. Now everything works properly everywhere. – user17040 Jul 16 '14 at 9:13

It's a good question, because the issue can happen to other users.

For several years, the only practical way for inputting Greek was through a transliteration table (a for alpha, b for beta, 'a for alpha with tonos and so on).

TeX Live 2012 included the lgrx package that allowed direct UTF-8 input of Greek, so that a UTF-8 document like

\documentclass[a4paper]{article}
\usepackage[LGRx,T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage[polutonikogreek,english]{babel}
\begin{document}

The starting verse of the Iliad is
\begin{quotation}\greektext
Μῆνιν ἄειδε, θεά, Πηληιάδεω Ἀχιλῆος
\end{quotation}
and it's really great.

\end{document}


could be written. The lgrx package started to circulate some time before the release of TeX Live 2012 and, as said, it was included in it. However, starting from TeX Live 2013, the lgrx was incorporated in the greek-fontenc package, which is now standard, so just adding greek (or the polytonic version) to babel automatically load it.

Unfortunately, back compatibility wasn't taken into account, with the result that documents written in the interval between the releases of TeX Live 2012 and 2013 are now broken, in the sense that the error message

! Package fontenc Error: Encoding file lgrxenc.def' not found.
(fontenc)                You might have misspelt the name of the encoding.


is issued, though just going past the error produces a valid document.

The greek-fontenc package should contain a file lgrxenc.def containing something like

\PackageWarningNoLine{fontenc}
{Remember to remove LGRx' from the options\MessageBreak
to fontenc' as it's not required any more}
\endinput


so that just a warning

Package fontenc Warning: Remember to remove LGRx' from the options
(fontenc)                to fontenc' as it's not required any more.


is issued when the above document is processed.

If you have documents containing the LGRx option to fontenc, you can save the “compatibility lgrxenc.def” file in your personal tree: for a GNU/Linux machine it would be

~/texmf/tex/latex/lgrx-compatibility/lgrxenc.def


(where ~ stands for your home directory). For MacTeX it should be

~/Library/texmf/tex/latex/lgrx-compatibility/lgrxenc.def


On Windows it should be

%USERPROFILE%\texmf\tex\latex\lgrx-compatibility\lgrxenc.def


(where %USERPROFILE% refers to the analog of the home directory).

Create the necessary directories, as they are not created during installation of TeX Live.

It might be a good idea to make a feature request to the maintainer of greek-fontenc.

• Many thanks once again. This was really helpful for my other documents. – user17040 Jul 16 '14 at 11:54

You can make your life easier if you could switch to xelatex or lualatex:

\documentclass[a4paper]{article}
\usepackage{fontspec}
\usepackage{libertine}
\usepackage[polutonikogreek,english]{babel}
\begin{document}

The starting verse of the Iliad is
\begin{quotation}
Μῆνιν ἄειδε, θεά, Πηληιάδεω Ἀχιλῆος
\end{quotation}
and it's really great.

\end{document}


There is no need for a special encoding.