How can I compile a document with enctex enabled ? Documentation on the net seems so horrible that right now I want to throw myself out the window! (Fortunately, soft grass is on the other side!)

As far as I understood, I need do somehow arrive at an .ini file from my .tex file, which I can then process by e.g. pdflatex using the -enc command. But if I try to generate my .ini file with tex -ini. file.tex, tex complains, that it doesn't understand my code, which uses enctex primitives, like \mubyte.
So I can't compile to .ini because enctex primitives are being used, but I can only compile .ini files with enctex. Seems like a circular deadlock, no ?

  • enctex isn't really supported with latex (although it probably works if you enable it the same way at initex and for documents) but why make a latex format incompatible with latex everywhere else? – David Carlisle Sep 7 '15 at 14:18
  • @DavidCarlisle I couldn't understand your comment, because unfortunately I don't know what a latex format really is. The reason I asked, has a very practical background: All I want is to get this answer tex.stackexchange.com/a/264105/6671 to work, which apperently needs enctex. – l7ll7 Sep 7 '15 at 14:22
  • @DavidCarlisle Would you think, it is a bad idea to use that answer, as activating enctex would somehow "mess up" the rest of my latex ? BTW, I'm usind texlive if this information makes any difference. – l7ll7 Sep 7 '15 at 14:24
  • If it is just for personal use you could experiment with enctex but don't use an enctex based format for any latex documents that you want to share with other people as they will not be compatible with standard latex installations. – David Carlisle Sep 7 '15 at 14:55
  • @DavidCarlisle Ok, good to know. If enctex has such an experimental character, why is it then even included as a package (but not activated) in TeXLive or MikTex ? I'd be very glad, if you could tell me, if the Disclaimer in the answer below, concerning the risk of enabling enctex, is valid. – l7ll7 Sep 7 '15 at 15:26

If you want to try you can do this (on texlive 2015):

Create in e.g. texmf-local/web2c a file fmtutil.cnf with the content

encpdflatex pdftex language.dat -enc -translate-file=cp227.tcx *pdflatex.ini

If necessary run mktexlsr to update the file database.

Then run on a command line

fmtutil-sys --byfmt encpdflatex


fmtutil --byfmt encpdflatex

(It shouldn't much matter which, they simply put the format in different locations).

This should create the encpdflatex format. You can then use it with

pdftex --fmt=encpdflatex file

Disclaimer: I never used enctex and have no idea what it will do with latex. But as the format has its own name it should do no harm to try it.

  • Ok, I definitely hope you meant it should do no harm. But as I'm afraid this may mess up my installation (even though seemingly unlikely), I'm cautiously going to wait for some (enctex) expert to confirm in the comments that this solution indeed won't break anything. – l7ll7 Sep 7 '15 at 15:25
  • Sorry I naturally meant, "it will do no harm". It will simply create an "encpdflatex.fmt" and as long as you don't use it explicitly with the --fmt switch it will do nothing. For more informations about how to handle formats see preining.info/blog/2015/04/tex-live-the-new-multi-fmtutil – Ulrike Fischer Sep 7 '15 at 15:29
  • Ok, I'll try it. Can I create the file also in the texmf folder, where a web2c folder also is ? I don't have a texmf-local folder. (I also texlive 2009 as just saw - I was a bit shocked myself - but I hope that won't make any difference. I don't plan on updating, if its not absolutely absolutely necessary because my system is set up perfectly right now, and updating would take a lot of time.) – l7ll7 Sep 7 '15 at 15:47
  • My method with an additional fmtutil.cnf will not work on older texlive. See the link I sent. – Ulrike Fischer Sep 7 '15 at 15:50
  • Yes, I saw the link - that was the reason I even looked, which version of texlive I had running. Is there any other "version-independent" way of getting enctex to work ? – l7ll7 Sep 7 '15 at 16:06

EncTeX is a TeX extension similar like eTeX. Roughly speaking, it adds new primitives to TeX. Both these extensions are built in the pdftex binary.

LaTeX or plain TeX are collections of macros used as format of TeX. There are two steps for use this: first you must generate a format (by pdftex -ini ... or something similar) and second, the format can be used (by pdftex -fmt format document.tex or something similar, typical short-cuts are latex document or pdflatex document). Users typically don't care about the format generating because this is done by TeX distribution automatically (when TeX distribution is installed). Unfortunately, it is very dangerous to present some notes about manual format generation because these facts vary in different TeX distributions and in time. There are user depended or system provided formats, configuration files, distribution utilities etc.

The pdftex binary includes eTeX and EncTeX extensions but they are disabled by default. They can be enabled during format generation. It means that the availability of new primitives from these extensions depends on format used. LaTeX developers decided that eTeX is enabled and EncTeX is disabled in standard LaTeX. Note that LaTeX is generated by the line where -etex or star before the file name is used. This is switch for enabling eTeX.

EncTeX could be enabled when LaTeX format is generated without any harm. If you don't use the new enabled primitives (like \mubyte) then the document will be exactly the same as with normal LaTeX. Why LaTeX developers decided not to enable encTeX by default? Because if people use new primitives then they will be confused with the standard inputenc way for re-encoding. So LaTeX document nor any LaTeX package must not use EncTeX primitives.

If you want to use EncTeX, you can forget to LaTeX and use csplain format. This format enables EncTeX as default in typical TeX distributions. I strongly recommend to don't use LaTeX.

  • You recommend to not use LaTeX in this case or to not use it at all? – Ruben Sep 7 '15 at 17:48
  • @wipet @wipet Could you help me trying to compile with csplain ? Already after your answer on my other question I had installed it, but couldn't manage to compile my documents with it (like your previous answer to my other question). If I save the document, for example, as a.tex and run csplain -enc a.tex it stop with an error saying Undefined control sequence. – l7ll7 Sep 9 '15 at 9:40
  • @user10324 Maybe, you are using some LaTeX macro in your document which isn't defined in plain TeX. Normally, plain TeX users don't use LaTeX macros but they define their own macros. – wipet Sep 9 '15 at 9:45
  • @user10324 You can try to create a file example.tex from my example in the thread "Automatically removing, after compilation..." without adding any more text. Then you can try to run csplain example.tex. I hope that this works. – wipet Sep 9 '15 at 9:51

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.