makefmts.sh
我尝试使用以下脚本生成纯 TeX 西里尔文格式文件cyrplain
包裹,下面是这个脚本的内容:
#!/bin/sh
tex -ini -fmt=cyrtex -progname=tex cyrtex.ini
tex -ini -fmt=cyramstex -progname=amstex cyramstx.ini
tex -ini -fmt=cyrtexinfo -progname=texinfo cyrtxinf.ini
tex -ini -fmt=cyrblue -progname=tex cyrblue.ini
pdftex -ini -fmt=cyrpdftex -progname=pdftex cyrtex.ini
pdftex -ini -fmt=cyrpdftexinfo -progname=pdftexinfo cyrtxinf.ini
运行脚本时,我收到了以下错误消息(其中包括):
(/usr/local/texlive/2015basic/texmf-dist/tex/generic/babel/plain.def
! Illegal parameter number in definition of \@yargdef.
<to be read again>
\relax
l.144 \let\@hash@\relax
?
! Illegal parameter number in definition of \@yargdef.
<to be read again>
\the
l.149 \edef\reserved@a{\reserved@a\@hash@\the
\@tempcntb}%
?
! Illegal parameter number in definition of \@yargdef.
<to be read again>
\l@ngrel@x
l.152 \l@ngrel@x
\expandafter\def\expandafter#1\reserved@a}
?
以下是第 141 至 152 行plain.def
:
\long\def\@yargdef#1#2#3{%
\@tempcnta#3\relax
\advance \@tempcnta \@ne
\let\@hash@\relax
\edef\reserved@a{\ifx#2\tw@ [\@hash@1]\fi}%
\@tempcntb #2%
\@whilenum\@tempcntb <\@tempcnta
\do{%
\edef\reserved@a{\reserved@a\@hash@\the\@tempcntb}%
\advance\@tempcntb \@ne}%
\let\@hash@##%
\l@ngrel@x\expandafter\def\expandafter#1\reserved@a}
谁能告诉我哪里出了问题?
cyrtex.log
以下是第一个错误的内容:
This is pdfTeX, Version 3.14159265-2.6-1.40.16 (TeX Live 2015) (INITEX) 7 JUL 2015 12:56
restricted \write18 enabled.
%&-line parsing enabled.
**cyrtex.ini
(/usr/local/texlive/2015basic/texmf-dist/tex/plain/cyrplain/cyrtex.ini
(/usr/local/texlive/2015basic/texmf-dist/tex/plain/cyrplain/cyrtex.tex
(/usr/local/texlive/2015basic/texmf-dist/tex/plain/cyrplain/cyrtex.cfg
(/usr/local/texlive/2015basic/texmf-dist/tex/latex/cyrillic/lcydefs.tex))
(/usr/local/texlive/2015basic/texmf-dist/tex/plain/base/plain.tex
Preloading the plain format: codes, registers,
\maxdimen=\dimen10
\hideskip=\skip10
\centering=\skip11
\p@=\dimen11
\z@=\dimen12
\z@skip=\skip12
\voidb@x=\box10
parameters,
\smallskipamount=\skip13
\medskipamount=\skip14
\bigskipamount=\skip15
\normalbaselineskip=\skip16
\normallineskip=\skip17
\normallineskiplimit=\dimen13
\jot=\dimen14
\interdisplaylinepenalty=\count23
\interfootnotelinepenalty=\count24
fonts,
(/usr/local/texlive/2015basic/texmf-dist/tex/plain/cyrplain/cyrcmfnt.tex
fonts, more fonts,)
\itfam=\fam4
\slfam=\fam5
\bffam=\fam6
\ttfam=\fam7
macros,
\strutbox=\box11
\mscount=\count25
\tabs=\box12
\tabsyet=\box13
\tabsdone=\box14
math definitions,
\rootbox=\box15
\p@renwd=\dimen15
output routines,
\headline=\toks10
\footline=\toks11
\footins=\insert254
\topins=\insert253
hyphenation
(/usr/local/texlive/2015basic/texmf-dist/tex/generic/babel/hyphen.cfg
File: hyphen.cfg Babel hyphens 3.9l <2014/09/25>
(/usr/local/texlive/2015basic/texmf-dist/tex/generic/babel/switch.def
File: switch.def Babel switching mechanism 3.9l <2014/09/25>
(/usr/local/texlive/2015basic/texmf-dist/tex/generic/babel/plain.def
\@tempcnta=\count26
\@tempcntb=\count27
))
\l@english=\language0
(/usr/local/texlive/2015basic/texmf-dist/tex/generic/hyphen/hyphen.tex)
\l@usenglish=\language0
\l@USenglish=\language0
\l@american=\language0
\l@dumylang=\language1
(/usr/local/texlive/2015basic/texmf-dist/tex/generic/hyphen/dumyhyph.tex)
\l@nohyphenation=\language2
(/usr/local/texlive/2015basic/texmf-dist/tex/generic/hyphen/zerohyph.tex)
\l@basque=\language3
(/usr/local/texlive/2015basic/texmf-dist/tex/generic/hyph-utf8/loadhyph/loadhyp
h-eu.tex EC Basque hyphenation patterns
(/usr/local/texlive/2015basic/texmf-dist/tex/generic/hyph-utf8/conversions/conv
-utf8-ec.tex)
(/usr/local/texlive/2015basic/texmf-dist/tex/generic/hyph-utf8/patterns/tex/hyp
h-eu.tex))
\l@bulgarian=\language4
(/usr/local/texlive/2015basic/texmf-dist/tex/generic/hyph-utf8/loadhyph/loadhyp
h-bg.tex T2A Bulgarian hyphenation patterns
(/usr/local/texlive/2015basic/texmf-dist/tex/generic/hyph-utf8/conversions/conv
-utf8-t2a.tex)
(/usr/local/texlive/2015basic/texmf-dist/tex/generic/hyph-utf8/patterns/tex/hyp
h-bg.tex))
\l@czech=\language5
(/usr/local/texlive/2015basic/texmf-dist/tex/generic/hyph-utf8/loadhyph/loadhyp
h-cs.tex EC Czech hyphenation patterns (Pavel Sevecek, v3, 1995)
(/usr/local/texlive/2015basic/texmf-dist/tex/generic/hyph-utf8/conversions/conv
-utf8-ec.tex)
(/usr/local/texlive/2015basic/texmf-dist/tex/generic/hyph-utf8/patterns/tex/hyp
h-cs.tex))
\l@danish=\language6
(/usr/local/texlive/2015basic/texmf-dist/tex/generic/hyph-utf8/loadhyph/loadhyp
h-da.tex EC Danish hyphenation patterns
(/usr/local/texlive/2015basic/texmf-dist/tex/generic/hyph-utf8/conversions/conv
-utf8-ec.tex)
(/usr/local/texlive/2015basic/texmf-dist/tex/generic/hyph-utf8/patterns/tex/hyp
h-da.tex))
\l@dutch=\language7
(/usr/local/texlive/2015basic/texmf-dist/tex/generic/hyph-utf8/loadhyph/loadhyp
h-nl.tex EC Dutch hyphenation patterns
(/usr/local/texlive/2015basic/texmf-dist/tex/generic/hyph-utf8/conversions/conv
-utf8-ec.tex)
(/usr/local/texlive/2015basic/texmf-dist/tex/generic/hyph-utf8/patterns/tex/hyp
h-nl.tex))
\l@ukenglish=\language8
(/usr/local/texlive/2015basic/texmf-dist/tex/generic/hyph-utf8/loadhyph/loadhyp
h-en-gb.tex ASCII Hyphenation patterns for British English
(/usr/local/texlive/2015basic/texmf-dist/tex/generic/hyph-utf8/patterns/tex/hyp
h-en-gb.tex))
\l@british=\language8
\l@UKenglish=\language8
\l@usenglishmax=\language9
(/usr/local/texlive/2015basic/texmf-dist/tex/generic/hyph-utf8/loadhyph/loadhyp
h-en-us.tex ASCII Hyphenation patterns for American English
(/usr/local/texlive/2015basic/texmf-dist/tex/generic/hyph-utf8/patterns/tex/hyp
h-en-us.tex))
\l@finnish=\language10
(/usr/local/texlive/2015basic/texmf-dist/tex/generic/hyph-utf8/loadhyph/loadhyp
h-fi.tex EC Finnish hyphenation patterns
(/usr/local/texlive/2015basic/texmf-dist/tex/generic/hyph-utf8/conversions/conv
-utf8-ec.tex)
(/usr/local/texlive/2015basic/texmf-dist/tex/generic/hyph-utf8/patterns/tex/hyp
h-fi.tex))
\l@french=\language11
(/usr/local/texlive/2015basic/texmf-dist/tex/generic/hyph-utf8/loadhyph/loadhyp
h-fr.tex EC French hyphenation patterns (V2.12, 2002/12/11)
(/usr/local/texlive/2015basic/texmf-dist/tex/generic/hyph-utf8/conversions/conv
-utf8-ec.tex)
(/usr/local/texlive/2015basic/texmf-dist/tex/generic/hyph-utf8/patterns/tex/hyp
h-fr.tex))
\l@patois=\language11
\l@francais=\language11
\l@german=\language12
(/usr/local/texlive/2015basic/texmf-dist/tex/generic/hyph-utf8/loadhyph/loadhyp
h-de-1901.tex EC German hyphenation patterns (traditional orthography)
(/usr/local/texlive/2015basic/texmf-dist/tex/generic/hyphen/dehypht.tex
German Traditional Hyphenation Patterns `dehypht' Version 3.2a <1999/03/03>
(Formerly known under the name `ghyph31' and `ghyphen'.)))
\l@ngerman=\language13
(/usr/local/texlive/2015basic/texmf-dist/tex/generic/hyph-utf8/loadhyph/loadhyp
h-de-1996.tex EC German hyphenation patterns (reformed orthography)
(/usr/local/texlive/2015basic/texmf-dist/tex/generic/hyphen/dehyphn.tex
New German Hyphenation Patterns `dehyphn' Rev.31 <2001-05-07> (WaS)))
\l@swissgerman=\language14
(/usr/local/texlive/2015basic/texmf-dist/tex/generic/hyph-utf8/loadhyph/loadhyp
h-de-ch-1901.tex
EC Swiss-German hyphenation patterns (traditional orthography)
(/usr/local/texlive/2015basic/texmf-dist/tex/generic/hyph-utf8/conversions/conv
-utf8-ec.tex)
(/usr/local/texlive/2015basic/texmf-dist/tex/generic/hyph-utf8/patterns/tex/hyp
h-de-ch-1901.tex
Swiss-German Hyphenation Patterns (Traditional Orthography) `dehyphts-x' 2014-0
5-21 (WL)))
\l@hungarian=\language15
(/usr/local/texlive/2015basic/texmf-dist/tex/generic/hyph-utf8/loadhyph/loadhyp
h-hu.tex EC Hungarian hyphenation patterns (v20110815)
(/usr/local/texlive/2015basic/texmf-dist/tex/generic/hyph-utf8/conversions/conv
-utf8-ec.tex)
(/usr/local/texlive/2015basic/texmf-dist/tex/generic/hyph-utf8/patterns/tex/hyp
h-hu.tex Huhyphn - hungarian hyphenation patterns v20110815))
\l@italian=\language16
(/usr/local/texlive/2015basic/texmf-dist/tex/generic/hyph-utf8/loadhyph/loadhyp
h-it.tex ASCII Italian hyphenation patterns
(/usr/local/texlive/2015basic/texmf-dist/tex/generic/hyph-utf8/patterns/tex/hyp
h-it.tex))
\l@mongolian=\language17
(/usr/local/texlive/2015basic/texmf-dist/tex/generic/hyph-utf8/loadhyph/loadhyp
h-mn-cyrl.tex T2A (New) Mongolian hyphenation patterns
(/usr/local/texlive/2015basic/texmf-dist/tex/generic/hyph-utf8/conversions/conv
-utf8-t2a.tex)
(/usr/local/texlive/2015basic/texmf-dist/tex/generic/hyph-utf8/patterns/tex/hyp
h-mn-cyrl.tex))
\l@mongolianlmc=\language18
(/usr/local/texlive/2015basic/texmf-dist/tex/generic/hyph-utf8/loadhyph/loadhyp
h-mn-cyrl-x-lmc.tex LMC Mongolian hyphenation patterns
(/usr/local/texlive/2015basic/texmf-dist/tex/generic/hyph-utf8/conversions/conv
-utf8-lmc.tex)
(/usr/local/texlive/2015basic/texmf-dist/tex/generic/hyph-utf8/patterns/tex/hyp
h-mn-cyrl-x-lmc.tex))
\l@bokmal=\language19
(/usr/local/texlive/2015basic/texmf-dist/tex/generic/hyph-utf8/loadhyph/loadhyp
h-nb.tex EC Norwegian Bokmal hyphenation patterns
(/usr/local/texlive/2015basic/texmf-dist/tex/generic/hyph-utf8/conversions/conv
-utf8-ec.tex)
(/usr/local/texlive/2015basic/texmf-dist/tex/generic/hyph-utf8/patterns/tex/hyp
h-nb.tex
(/usr/local/texlive/2015basic/texmf-dist/tex/generic/hyph-utf8/patterns/tex/hyp
h-no.tex)))
\l@norwegian=\language19
\l@norsk=\language19
\l@nynorsk=\language20
(/usr/local/texlive/2015basic/texmf-dist/tex/generic/hyph-utf8/loadhyph/loadhyp
h-nn.tex EC Norwegian Nynorsk hyphenation patterns
(/usr/local/texlive/2015basic/texmf-dist/tex/generic/hyph-utf8/conversions/conv
-utf8-ec.tex)
(/usr/local/texlive/2015basic/texmf-dist/tex/generic/hyph-utf8/patterns/tex/hyp
h-nn.tex
(/usr/local/texlive/2015basic/texmf-dist/tex/generic/hyph-utf8/patterns/tex/hyp
h-no.tex)))
\l@polish=\language21
(/usr/local/texlive/2015basic/texmf-dist/tex/generic/hyph-utf8/loadhyph/loadhyp
h-pl.tex QX Polish hyphenation patterns
(/usr/local/texlive/2015basic/texmf-dist/tex/generic/hyph-utf8/conversions/conv
-utf8-qx.tex)
(/usr/local/texlive/2015basic/texmf-dist/tex/generic/hyph-utf8/patterns/tex/hyp
h-pl.tex))
\l@portuguese=\language22
(/usr/local/texlive/2015basic/texmf-dist/tex/generic/hyph-utf8/loadhyph/loadhyp
h-pt.tex EC Portuguese hyphenation patterns
(/usr/local/texlive/2015basic/texmf-dist/tex/generic/hyph-utf8/conversions/conv
-utf8-ec.tex)
(/usr/local/texlive/2015basic/texmf-dist/tex/generic/hyph-utf8/patterns/tex/hyp
h-pt.tex))
\l@portuges=\language22
\l@brazil=\language22
\l@brazilian=\language22
\l@russian=\language23
(/usr/local/texlive/2015basic/texmf-dist/tex/generic/hyph-utf8/loadhyph/loadhyp
h-ru.tex T2A Russian hyphenation patterns
(/usr/local/texlive/2015basic/texmf-dist/tex/generic/ruhyphen/ruhyphen.tex
(/usr/local/texlive/2015basic/texmf-dist/tex/generic/ruhyphen/catkoi.tex)
(/usr/local/texlive/2015basic/texmf-dist/tex/generic/ruhyphen/koi2lcy.tex)
(/usr/local/texlive/2015basic/texmf-dist/tex/generic/ruhyphen/ruhyphal.tex)
(/usr/local/texlive/2015basic/texmf-dist/tex/generic/ruhyphen/cyryoal.tex)))
\l@serbian=\language24
(/usr/local/texlive/2015basic/texmf-dist/tex/generic/hyph-utf8/loadhyph/loadhyp
h-sr-latn.tex EC Serbian hyphenation patterns in Latin script
(/usr/local/texlive/2015basic/texmf-dist/tex/generic/hyph-utf8/conversions/conv
-utf8-ec.tex)
(/usr/local/texlive/2015basic/texmf-dist/tex/generic/hyph-utf8/patterns/tex/hyp
h-sh-latn.tex))
\l@serbianc=\language25
(/usr/local/texlive/2015basic/texmf-dist/tex/generic/hyph-utf8/loadhyph/loadhyp
h-sr-cyrl.tex T2A Serbian hyphenation patterns in Cyrillic script
(/usr/local/texlive/2015basic/texmf-dist/tex/generic/hyph-utf8/conversions/conv
-utf8-t2a.tex)
(/usr/local/texlive/2015basic/texmf-dist/tex/generic/hyph-utf8/patterns/tex/hyp
h-sh-cyrl.tex))
\l@spanish=\language26
(/usr/local/texlive/2015basic/texmf-dist/tex/generic/hyph-utf8/loadhyph/loadhyp
h-es.tex EC Spanish hyphenation patterns
(/usr/local/texlive/2015basic/texmf-dist/tex/generic/hyph-utf8/conversions/conv
-utf8-ec.tex)
(/usr/local/texlive/2015basic/texmf-dist/tex/generic/hyph-utf8/patterns/tex/hyp
h-es.tex))
\l@espanol=\language26
\l@swedish=\language27
(/usr/local/texlive/2015basic/texmf-dist/tex/generic/hyph-utf8/loadhyph/loadhyp
h-sv.tex EC Swedish hyphenation patterns (Jan Michael Rynning, 1994-03-03)
(/usr/local/texlive/2015basic/texmf-dist/tex/generic/hyph-utf8/conversions/conv
-utf8-ec.tex)
(/usr/local/texlive/2015basic/texmf-dist/tex/generic/hyph-utf8/patterns/tex/hyp
h-sv.tex))
\l@ukrainian=\language28
(/usr/local/texlive/2015basic/texmf-dist/tex/generic/hyph-utf8/loadhyph/loadhyp
h-uk.tex T2A Ukrainian hyphenation patterns
(/usr/local/texlive/2015basic/texmf-dist/tex/generic/ukrhyph/ukrhyph.tex
Ukrainian hyphenation patterns in lcy encoding
(/usr/local/texlive/2015basic/texmf-dist/tex/generic/ukrhyph/catlcy.tex)
(/usr/local/texlive/2015basic/texmf-dist/tex/generic/ukrhyph/lcy2lcy.tex)
(/usr/local/texlive/2015basic/texmf-dist/tex/generic/ukrhyph/ukrhypmp.tex)))))
(/usr/local/texlive/2015basic/texmf-dist/tex/plain/cyrplain/txxextra.tex)
(/usr/local/texlive/2015basic/texmf-dist/tex/plain/cyrplain/plainenc.tex
(/usr/local/texlive/2015basic/texmf-dist/tex/generic/babel/plain.def
! Illegal parameter number in definition of \@yargdef.
<to be read again>
\relax
l.144 \let\@hash@\relax
? q
OK, entering \batchmode...
答案1
该文件从plainenc.tex
加载,但这已被读取为通用连字加载器的一部分。除非在这两点之间执行了 ,否则该文件可以多次加载。发生的事情是执行了,这意味着在第二次读取时,您无法在 的定义中使用。可以通过添加 来解决这个问题plain.def
babel
plain.def
\@yargdef
\@yargdef
\let\@hash@##
\@hash@
\@yargdef
\let\@hash@\relax
某个方便的地方。
这可以说是 的一个错误plain.def
。
答案2
由于该错误出现在中\@yargdef
,因此可以通过修补此宏来修复它,如下所示:
\gdef\@my@aaa{*}
\ifx\@my@aaa\@my@bbb
\immediate\write16{skip redefining yargdef}
\else%
\gdef\@my@bbb{*}%
%%--- the original code of \@yargdef goes here ---%%
\fi%
我在 MiKTeX 2.4 和 MiKTeX 2.9 中提供了使用西里尔文(俄语)Plain TeX、AmSTeX 和 LaTeX 2.09 的现成解决方案。它们配有俄语的分步说明,并且免费下载。