构建 MikTeX 格式“csplain”时出错

构建 MikTeX 格式“csplain”时出错

我正在尝试构建新的 MikTeX 格式“csplain”。原因是解压 MikTeX 便携式 csplain 后默认情况下未启用。步骤顺序可在以下屏幕截图中看到:

1.

在此处输入图片描述

  1. 未选中选项“更新所有格式文件时排除此格式”。

在此处输入图片描述

  1. 点击“构建”按钮。

在此处输入图片描述

  1. 收到以下错误信息:

在此处输入图片描述

  1. 点击“Áno”(在英语中表示“是”):

在此处输入图片描述

这是 Ulrike 推荐的命令“pdftex -ini -enable-enctex csplain-utf8.ini”的输出,用于更好地诊断问题:

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
Preloading the plain format: codes, registers, parameters, fonts, more fonts,
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
Loading US English hyphenation patterns in ASCII encoding, \enPatt=0 (en).
(f:\Software\_Office\MikTex\tex\csplain\base\hyphen.ex
Enhyphex.tex English exception words.)
Loading Czech hyphenation patterns in ISO-8859-2 encoding, \csILtwo=5 (cs).
(f:\Software\_Office\MikTex\tex\csplain\base\czhyphen.tex)
(f:\Software\_Office\MikTex\tex\generic\hyphen\czhyphen.ex)
Loading Slovak hyphenation patterns in ISO-8859-2 encoding, \skILtwo=6 (sk).
(f:\Software\_Office\MikTex\tex\csplain\base\skhyphen.tex)
(f:\Software\_Office\MikTex\tex\csplain\base\skhyphen.ex)
Loading Czech hyphenation patterns in Cork encoding, \csCork=15 (cs).
(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)
Loading Slovak hyphenation patterns in Cork encoding, \skCork=16 (sk).
(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

这是按照 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
Preloading the plain format: codes, registers, parameters, fonts, more fonts,
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.
Loading US English hyphenation patterns in ASCII encoding, \enPatt=0 (en).
(f:\Software\_Office\MikTex\tex\csplain\base\hyphen.ex
Enhyphex.tex English exception words.)
Loading Czech hyphenation patterns in ISO-8859-2 encoding, \csILtwo=5 (cs).
(f:\Software\_Office\MikTex\tex\csplain\base\czhyphen.tex)
(f:\Software\_Office\MikTex\tex\csplain\base\czhyphen.ex)
Loading Slovak hyphenation patterns in ISO-8859-2 encoding, \skILtwo=6 (sk).
(f:\Software\_Office\MikTex\tex\csplain\base\skhyphen.tex)
(f:\Software\_Office\MikTex\tex\csplain\base\skhyphen.ex)
Loading Czech hyphenation patterns in Cork encoding, \csCork=15 (cs).
(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)
Loading Slovak hyphenation patterns in Cork encoding, \skCork=16 (sk).
(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

附言

更具体地说,我的安装。我从以下网站下载了官方 MikTex 便携包 2.9.5105:http://miktex.org/download并解压。我从未在我的电脑上使用过任何其他版本的 MikTex。我的操作系统是 Windows 7 Home Premium 64 位。

PS2 游戏

为了更具体地回答 Petr 的问题,您可以在此处查看 tex\generic\enctex\utf8unkn.tex 文件的文件版本。左侧是更新后的 MikTeX 便携式安装的屏幕截图。右侧是安装包“miktex-portable-2.9.5105.exe”(7z 存档)的内容。

在此处输入图片描述

答案1

从您的代码中:

(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

意味着文件f:\Software\_Office\MikTex\tex\generic\enctex\utf8unkn.tex被读取,然后发生未定义的控制序列。但文件utf8unkn.tex看起来像这样:

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

\def\xprncodes=#1 {%
  \count255=128
  \loop \xprncode\count255=#1\advance\count255 by 1
  \ifnum \count255<256 \repeat
}

这意味着\xprncodes 定义。很可能存在版本混乱,因为该文件utf8unkn.tex来自enctex包,但所有其他文件都来自csplain包。首先:检查utf8unkn.tex文件的内容(如果定义在这里)。如果没有,则包的enctex版本是 2010 年 1 月或更早。该定义\xprncode是从 2012 年 10 月版本引入的。现在,我们有 2014 年 7 月版本。所有版本都可用在CTAN,您可以检查您的计算机上存在的版本。

如果 MikTeX 默认的是 2010 或更早版本,那么这就是报告错误的原因。

我很惊讶MikTeX 默认不启用 csplain。我曾要求 Christian Schenk 启用csplain命令pdfcsplain/fromats(两年前)。Christian 回答说已经启用了。如果没有,那么在我看来,这是报告错误的另一个原因。 如果用户只需要一个简单的单击并且所有内容都可以顺利生成,那么从我的角度来看一切都很好。

抱歉,我无法检查,因为我不是(也从来不是) MS Win 的用户。

Petr Olšák,encTeX 和 csplain 的作者

答案2

格式定义错误。您没有选择编译器,并且缺少输入文件。在我的(非便携式)miktex 上,它看起来像这样:

在此处输入图片描述

相关内容