4

It runs ok, but there are error warnings: there is a "missing number, treated as zero" and "Illegal unit of measure (pt inserted)." on line 94 (log).

\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
  • by \_vglue \vskip 32pt did you mean \_vglue 32pt?
    – Udi Fogiel
    Oct 20, 2023 at 23:13

1 Answer 1

5

The problem is with the line \_vglue \vskip 32pt. \vglue is a plain TeX macro that accepts a glue, the definition of \vglue is similar in OpTeX. It expands to \_afterassignment\_vglA \_skip0=, so essentially you have \_skip0=\vskip, which causes the error, as you can only assign glue to a \skip register.

It can be easily fixed by changing the problematic line to \_vglue 32pt.

1
  • Thank you for the explanation. It worked fine.
    – user574859
    Oct 20, 2023 at 23:41

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .