# Error building MikTeX format "csplain"

I am trying to build new MikTeX format "csplain". The reason is that after unpacking MikTeX portable csplain is not enabled by default. The sequence of steps can be seen in following screenshots:

1.

1. Unchecked option "Exclude this format when updating all format files".

1. Clicked on "Build" button.

1. Clicked on "Áno" (means Yes in english language):

This is output of command "pdftex -ini -enable-enctex csplain-utf8.ini" recommended by Ulrike for better diagnostics of problem:

This is pdfTeX, Version 3.1415926-2.5-1.40.14 (MiKTeX 2.9) (INITEX)
encTeX v. Jun. 2004, reencoding enabled.
(f:\Software\_Office\MikTex\tex\csplain\base\csplain-utf8.ini
(f:\Software\_Office\MikTex\tex\csplain\base\csplain.ini
(f:\Software\_Office\MikTex\tex\csplain\base\csfonts.tex)
(f:\Software\_Office\MikTex\tex\plain\base\plain.tex
macros, math definitions, output routines, hyphenation
(f:\Software\_Office\MikTex\tex\generic\hyphen\hyphen.tex))
(f:\Software\_Office\MikTex\tex\csplain\base\csfontsm.tex)
(f:\Software\_Office\MikTex\tex\csplain\base\il2code.tex
Font encoding set to ISO-8859-2.)
(f:\Software\_Office\MikTex\tex\csplain\base\hyphen.lan
(f:\Software\_Office\MikTex\tex\csplain\base\hyphen.ex
Enhyphex.tex English exception words.)
(f:\Software\_Office\MikTex\tex\csplain\base\czhyphen.tex)
(f:\Software\_Office\MikTex\tex\generic\hyphen\czhyphen.ex)
(f:\Software\_Office\MikTex\tex\csplain\base\skhyphen.tex)
(f:\Software\_Office\MikTex\tex\csplain\base\skhyphen.ex)
(f:\Software\_Office\MikTex\tex\csplain\base\t1code.tex
Font encoding set to Cork.)
(f:\Software\_Office\MikTex\tex\csplain\base\czhyphen.tex)
(f:\Software\_Office\MikTex\tex\generic\hyphen\czhyphen.ex)
(f:\Software\_Office\MikTex\tex\csplain\base\t1code.tex
Font encoding set to Cork.)
(f:\Software\_Office\MikTex\tex\csplain\base\skhyphen.tex)
(f:\Software\_Office\MikTex\tex\csplain\base\skhyphen.ex)
5 patterns preloaded: \enPatt =0 \csILtwo =5 \skILtwo =6 \csCork =15 \skCork =1
6  Defaults: \language=0, \cmaccents, \nonfrenchspacing,
ISO-8859-2 font encoding)
(f:\Software\_Office\MikTex\tex\csplain\base\plaina4.tex
\hsize=159.2 mm \vsize=239.2 mm)
(f:\Software\_Office\MikTex\tex\csplain\base\csenc-u.tex
(f:\Software\_Office\MikTex\tex\generic\enctex\utf8unkn.tex)
! Undefined control sequence.
l.116 ...in=1 \mubyteout=3 \mubytelog=1 \xprncodes
=0


And this is full output of build command after doing all the things recommended by Ulrike:

Creating the csplain format file...
Running miktex-pdftex.exe...
This is pdfTeX, Version 3.1415926-2.5-1.40.14 (MiKTeX 2.9) (INITEX)
entering extended mode
encTeX v. Jun. 2004, reencoding enabled.
(f:\Software\_Office\MikTex\tex\csplain\base\csplain-utf8.ini
(f:\Software\_Office\MikTex\tex\csplain\base\csplain.ini
(f:\Software\_Office\MikTex\tex\csplain\base\csfonts.tex)
(f:\Software\_Office\MikTex\tex\plain\base\plain.tex
macros, math definitions, output routines, hyphenation
(f:\Software\_Office\MikTex\tex\generic\hyphen\hyphen.tex))
(f:\Software\_Office\MikTex\tex\csplain\base\csfontsm.tex)
(f:\Software\_Office\MikTex\tex\csplain\base\il2code.tex
Font encoding set to ISO-8859-2.)
(f:\Software\_Office\MikTex\tex\csplain\base\hyphen.lan
eTeX's \savinghyphcodes detected - \lccode settings per pattern are saved.
(f:\Software\_Office\MikTex\tex\csplain\base\hyphen.ex
Enhyphex.tex English exception words.)
(f:\Software\_Office\MikTex\tex\csplain\base\czhyphen.tex)
(f:\Software\_Office\MikTex\tex\csplain\base\czhyphen.ex)
(f:\Software\_Office\MikTex\tex\csplain\base\skhyphen.tex)
(f:\Software\_Office\MikTex\tex\csplain\base\skhyphen.ex)
(f:\Software\_Office\MikTex\tex\csplain\base\t1code.tex
Font encoding set to Cork.)
(f:\Software\_Office\MikTex\tex\csplain\base\czhyphen.tex)
(f:\Software\_Office\MikTex\tex\csplain\base\czhyphen.ex)
(f:\Software\_Office\MikTex\tex\csplain\base\t1code.tex
Font encoding set to Cork.)
(f:\Software\_Office\MikTex\tex\csplain\base\skhyphen.tex)
(f:\Software\_Office\MikTex\tex\csplain\base\skhyphen.ex)
5 patterns preloaded: \enPatt =0 \csILtwo =5 \skILtwo =6 \csCork =15 \skCork =1
6  Defaults: \language=0, \cmaccents, \nonfrenchspacing,
ISO-8859-2 font encoding)
(f:\Software\_Office\MikTex\tex\csplain\base\plaina4.tex
\hsize=159.2 mm \vsize=239.2 mm)
(f:\Software\_Office\MikTex\tex\csplain\base\csenc-u.tex
(f:\Software\_Office\MikTex\tex\generic\enctex\utf8unkn.tex)
! Undefined control sequence.
l.116 ...in=1 \mubyteout=3 \mubytelog=1 \xprncodes
=0
No pages of output.
Transcript written on csplain-utf8.log.
miktex-makefmt: miktex-pdftex.exe failed on csplain-utf8.ini.
initexmf.EXE: The operation failed for some reason.
initexmf.EXE: Data: f:\Software\_Office\MikTex\miktex\bin\miktex-makefmt.exe


P.S.

To be more specific about my installation. I downloaded official MikTex portable package 2.9.5105 from http://miktex.org/download and unpacked it. Never used any other version of MikTex on my computer. My operating system is Windows 7 Home Premium 64-bit.

P.S. 2

To answer more specifically to question of Petr here you see file versions of tex\generic\enctex\utf8unkn.tex file. On left side you see screenshot from MikTeX portable installation after update. On right side you see content of installation package "miktex-portable-2.9.5105.exe" (which is 7z archive).

• A sorry loking at the formats.ini I see that this format needs a special argument. So try with pdftex -ini -enable-enctex csplain-utf8.ini Feb 7, 2015 at 18:21
• \xprncodes is on my system defined in the file utf8unkn.tex which is loaded just before the error message (at line 65). Did you check with the update manager if your system is up-to-date? Can you show the content of your version of the file? Feb 7, 2015 at 19:49

(f:\Software\_Office\MikTex\tex\csplain\base\csenc-u.tex
(f:\Software\_Office\MikTex\tex\generic\enctex\utf8unkn.tex)
! Undefined control sequence.
l.116 ...in=1 \mubyteout=3 \mubytelog=1 \xprncodes
=0


implies that the file f:\Software\_Office\MikTex\tex\generic\enctex\utf8unkn.tex is read and then the Undefined control sequence occurs. But the file utf8unkn.tex looks like:

...
% \xprncodes=1 or \xprncodes=0 .. set/unset printability of 128..255 chars

\def\xprncodes=#1 {%
\count255=128
\ifnum \count255<256 \repeat
}


it means that the \xprncodes is defined. Very probably there is a version mishmash because the file utf8unkn.tex is from enctex package but all another files are from csplain package. First of all: check the contents of your utf8unkn.tex file (if the definition is here). If no, then the package enctex has version Jan 2010 or older. The definition \xprncode was introduced from version Oct. 2012. Now, we have the version Jul 2014. All versions are available at CTAN, you can check what verion is present on your computer.

If there is version 2010 or older in MikTeX as default, than this is reason for bug reporting.

And I am surprised that the csplain isn't enabled by default in MikTeX. I have asked Christian Schenk to enable csplain and pdfcsplain commands/fromats (two years before now). Christian has answered me that this is done. If no, then this is another reason of bug reporting, IMHO. If user needs only one simple click and all is generated well then all is OK from my point of view.

Sorry, I cannot check it because I am not (and never was) the user of MS Win.

Petr Olšák, the author of encTeX and csplain

• The creation of the csplain format works fine on an up-to-date miktex. The format isn't build by default (like a lot formats) but it needs only one click to enable it. Btw: the name is Christian Schenk. Feb 7, 2015 at 21:34
• Thanks to name correction. I apologize. This is my very often mistake with this name, I don't know how. Feb 7, 2015 at 21:39
• @UlrikeFischer You write: The creation of the csplain format works fine on an up-to-date miktex. I am pleasured to read it. But I have received by email just today another bug report about csplain in mikTeX from different source. So I don't know... Feb 7, 2015 at 21:46
• My version of utf8unkn.tex was from year 2003. The solution was to right click into tray bar and choose "Update MiKTeX" option. But as Ulrike correctly pointed the formats.ini content was destroyed by clicking on "exclude" checkbox. This problem persists even after updating MiKTeX installation. So I had to restore formats.ini from original installation package miktex-portable-2.9.5105.exe which is a 7z archive. Feb 8, 2015 at 8:22
• Thank you Petr and Ulrike I would be lost without your advice. Feb 8, 2015 at 8:49

The format definition is wrong. You don't have a compiler selected and the input file is missing. On my (non-portable) miktex it looks like this:

• Unfortunately list of available compilers is empty. Feb 7, 2015 at 15:07
• Hm. What with other formats? E.g. pdflatex or lualatex. Do they have a compiler? Feb 7, 2015 at 15:09
• Perhaps it is this problem but for formats.ini: sourceforge.net/p/miktex/bugs/2342. So check the content of formats.ini in miktex/config. If it looks empty try to replace it with the original one (it should be in the miktex-config-2.9 package). Feb 7, 2015 at 15:20
• Don't change the entry (by clicking on the "exclude" button), this probably destroys the formats.ini and so the entries again. Simply select csplain in the list and click on build. Feb 7, 2015 at 15:40
• That can be due to a lot of things. Open a command line in some empty test folder and try pdftex -ini csplain-utf8.ini to get some better error messages. Feb 7, 2015 at 16:43