Optex 中的运行标题

Optex 中的运行标题

我尝试改编奥普马克,并且还来自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

我在这里做错了什么?

相关内容