![Optex 中的运行标题](https://linux22.com/image/449287/Optex%20%E4%B8%AD%E7%9A%84%E8%BF%90%E8%A1%8C%E6%A0%87%E9%A2%98.png)
我尝试改编奥普马克,并且还来自ctustyle
,但它不起作用。
我已经成功地调整了上面的一些宏,因此:
\_def\_printchap #1{\_vfill\_supereject
\_vglue\_medskipamount % shifted by topkip+\medskipamount
{\_chapfont \_noindent \_mtext{chap} \_printrefnum[@]\_par
\_nobreak\_smallskip
\_noindent \_raggedright #1\_nbpar}\_mark{}%
\_nobreak \_belowtitle{\_bigskip}%
\_firstnoindent
\xdef\headchap{\ifnonum\else\_thechapnum. \fi}\global\addto\headchap{#1}
\headline={}
\footline={\hss\folio\hss}
\nextpages={%
\headline={\lower4pt\null\vadjust{\hrule} \ifodd\pageno\headchap\hfil \folio \else \folio\hfil\firstmark\fi}%
\footline={}%
}
}
\chap asdf
asdf.
\sec asdf
\lipsum[1-10]
\sec asdf
\lipsum[1-10]
\chap jumbo manga
\lipsum[1-10]
\bye
它完全按照我预期的方式工作,但是有几个警告:
! Undefined control sequence.
\_printchap ...noindent \xdef \headchap {\ifnonum
\else \_thechapnum . \fi }...
\_inchap ...fi }\_printchap {\_scantextokens {#1}}
\_resetnonumnotoc
l.29 \chap asdf
! Extra \else.
\_printchap ...nt \xdef \headchap {\ifnonum \else
\_thechapnum . \fi }\globa...
\_inchap ...fi }\_printchap {\_scantextokens {#1}}
\_resetnonumnotoc
l.29 \chap asdf
! Extra \fi.
\_printchap ...{\ifnonum \else \_thechapnum . \fi
}\global \addto \headchap ...
\_inchap ...fi }\_printchap {\_scantextokens {#1}}
\_resetnonumnotoc
l.29 \chap asdf
我在这里做错了什么?