本章标题样式(OpTeX)有什么问题?

本章标题样式(OpTeX)有什么问题?

它运行正常,但有错误警告:第 94 行(日志)有“缺少数字,视为零”和“非法计量单位(插入 pt)”。

\fontfam[Garamond]
\typosize[11/14]
\margins/1 (6,9)in (0.5,0.5,0.5,0.75)in
\ptlang

%\onum

%%%%%%%%%%%%%%%%%%%%%%

\def\vbot{\let\_tableparbox=\_vbox}
\def\vcent{\toksapp\tabiteml{$}\tokspre\tabitemr{$}\let\_tableparbox=\_vcenter}

\def\ltable{\bgroup \let\_tablebox=\egroup \table} % the \vbox is deactivated

%%%%%%%%%%%%% TOC definitions %%%%%%%%%%%%%%%%%%%%
\_sdef{_tocl:1}#1#2#3{\_nofirst\_bigskip
\leftskip1em\_it\_llaptoclink{#1}{#2}\_nobreak\_tocdotfill  \_pgn{#3}\_tocpar}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%



%%%%%%%%%%%%%%%%%%%%%


\_def\_printchap #1{\_vfill\_supereject
\_vglue \vskip 32pt %\_medskipamount % shifted by topkip+\medskipamount
%%%old%%%
%{\_chapfont \_noindent \_mtext{chap} \_printrefnum[@]\_par
%\_nobreak\_smallskip
%\_noindent \_raggedright #1\_nbpar}\_mark{}%
%%%
\thistable{\rulewidth=2pt\Red
\vcent\tabskipl=0pt plus1fil \tabskipr=\tabskipl}
 \ltable to\hsize{p{3cm\fR}|p{5cm}}{    \Black\caps\setletterspace{5}\rm\_ifnonum\_else\_mtext{chap} \_fi
     \_printrefnum[@] & \Black #1 %\_strut\_nbpar
     \cr}%
  %%%%%%%%%
\_nobreak \_belowtitle{\vskip 32pt}%\_bigskip
\_firstnoindent
\xdef\headchap{\_ifnonum\else\_thechapnum. \fi}\global\addto\headchap{#1} 
\headline={}
\footline={\hss\folio\hss}
\nextpages={%
\headline={\lower4pt\null\vadjust{\Grey \hrule height 3pt width \hsize}
\kern-.5em\ifodd\pageno~\headchap\hfil \folio \else ~\folio\hfil\firstmark\fi}%
\footline={}%
}
}

% heachap code from ctustyle3.tex from https://gitlab.fit.cvut.cz/barlaada/tex



%\maketoc

\chap Do arquivo headers eu peguei o código acima e então escrevi um baita parágrafo para este teste e tal

\lipsum[1]


\bye

答案1

问题在于行\_vglue \vskip 32pt\vglue是一个接受胶水的普通 TeX 宏, 的定义\vglue在 OpTeX 中类似。 它扩展为\_afterassignment\_vglA \_skip0=,因此本质上你有\_skip0=\vskip,这会导致错误,因为你只能将胶水分配给寄存器\skip

只需将有问题的行更改为 即可轻松修复\_vglue 32pt

相关内容