1

This error is linked to “/usr/local/texlive/2022/texmf-dist/tex/latex/etoolbox/etoobox.sty, 1003” by the system. I do not know what this really means though I do find such definitions in a file of texlive 2023 with the same path installed in my computer’s C: drive.

The detailed information of this errors reads as follows:

Or name \end... illegal, see p.192 of the manual.

See the LaTeX manual or LaTeX Companion for explanation.
Type  H <return>  for immediate help.
...                                              
l.1003   \edef#1{\the\numexpr#2}}
                                  
Here is how much of TeX's memory you used:
23676 strings out of 477679
459511 string characters out of 5829514
763038 words of memory out of 5000000
42069 multiletter control sequences out of 15000+600000
470967 words of font info for 31 fonts, out of 8000000 for 9000
1141 hyphenation exceptions out of 8191
98i,1n,94p,437b,79s stack positions out of 10000i,1000n,20000p,200000b,200000s
No pages of output.

The following is the working environment:

% if your latex compiler failed to compile, uncomment the command below:
%\RequirePackage[2020-02-02]{latexrelease}
\documentclass{clv3}
\usepackage{hyperref}
\usepackage{xcolor}
\usepackage{linguex}
\usepackage{booktabs}
\usepackage{multirow}
\usepackage{tabularx}
\usepackage{xltabular}
\usepackage{makecell}
\usepackage{metalogo}
\usepackage{array}
\usepackage{tabto}
\usepackage{booktabs}
\usepackage[linguistics]{forest}
\usepackage{tabto}
\usepackage{amssymb}
\let\oldemptyset\emptyset
\let\emptyset\varnothing
\definecolor{darkblue}{rgb}{0, 0, 0.5}
\hypersetup{colorlinks=true,citecolor=darkblue, linkcolor=darkblue, urlcolor=darkblue}
\bibliographystyle{compling}
\usepackage{CJKutf8}
\usepackage{linguex}
\begin{document}
 content
...
\end {document}

The system now fails to compile. Hope this is the (only) cause for it. Thanks for your help in advance.

7
  • ! LaTeX Error: File `clv3.cls' not found. please link to this class. Jun 11 at 9:29
  • latexrelease should not normally be used, don't specicfybooktabs orlinguex twice Jun 11 at 9:32
  • Thanks a lot @DavidCarlisle. I commented the (latexrelease) out and delete the two repetitive packages. One more question: Do you mean the \documentclass{clv3} does not link to this "clve.cls"? Or what can I do to link to this class? Thanks again.
    – JC Y
    Jun 11 at 9:45
  • no, I mean give a url in the question where we can download clv3.cls it is not in texlive so your example stops with an error on the \documentclass Jun 11 at 9:52
  • I see. It is clv3.cls link. It's the first file in the list on that page.
    – JC Y
    Jun 11 at 9:58

1 Answer 1

0

It's quite simple. The clv3 class does

\def\numdefname{Definition}
\newtheorem{numdef}{\numdefname}

but etoolbox also wants to define \numdef.

It's easy to fix this by aliasing the numdef environment, but there's a worse problem: the class also redefines \document, which is a very bad thing: see Problem with Computational Linguistic Template - COLI - CLV3.cls

% save the kernel \document and \enddocument
\let\latexdocument\document
\let\latexenddocument\enddocument
%%%

\documentclass{clv3}
% restore the original
\let\document\latexdocument
\let\enddocument\latexenddocument

% add to the standard hooks
\makeatletter
\AtBeginDocument{%
  \if@filesw
    \immediate\openout\@mainqry=\jobname.qry
  \fi
}
\AtEndDocument{%
   \ifx\@biography\@empty\else{\par\ifbrief\vskip10pt\fi\biofont\noindent\@biography\par}\fi
   \immediate\closeout\@mainqry
   %\ifquery
   %   \process@queries\clearpage
   %\else
      \ifodd\c@page\clearpage\thispagestyle{empty}\null\clearpage\else\clearpage\fi
   %\fi
   %\ifquery\clearpage\else\ifodd\c@page\clearpage\thispagestyle{empty}\null\clearpage\else\clearpage\fi\fi
}
\makeatother

% alias numdef to cnumdef
\NewCommandCopy{\cnumdef}{\numdef}
\NewCommandCopy{\endcnumdef}{\endnumdef}
\let\numdef\relax \let\endnumdef\relax

\usepackage{xcolor}
\usepackage{linguex}
\usepackage{booktabs}
\usepackage{multirow}
\usepackage{tabularx}
\usepackage{xltabular}
\usepackage{makecell}
\usepackage{metalogo}
\usepackage{array}
\usepackage{tabto}
\usepackage{booktabs}
\usepackage[linguistics]{forest}
\usepackage{tabto}
\usepackage{amssymb}
\usepackage{CJKutf8}
\usepackage{linguex}
\usepackage{hyperref}

\let\oldemptyset\emptyset
\let\emptyset\varnothing

\definecolor{darkblue}{rgb}{0, 0, 0.5}
\hypersetup{colorlinks=true,citecolor=darkblue, linkcolor=darkblue, urlcolor=darkblue}
\bibliographystyle{compling}

\begin{document}

 content
...

\end {document}

Note the placement of \usepackage{hyperref}, which should come last.

5
  • Thanks! @egreg I copied the code in my main.txt, but it produced similar command errors on the new name. I guess I can just for now comment out the two new commands as I never need them in the main.txt. Then the command error is gone. Also, thanks a lot for your reminding of the placement of the usepackage{hyperref}. Fixed it too. Though the compilation still doesn't work, it's a good start :-)
    – JC Y
    Jun 11 at 11:43
  • Thanks a lot for the advice. Now it successfully compiles~~ The thing is, after executing the suggested code, the compilation produced an unexpected blank page (the last but two pages where the conclusion text is broken). I wonder if this has something to do with the suggested code? Thanks in advance.
    – JC Y
    Jun 13 at 1:03
  • The strange thing is that a footnote supposed to be on the last but one page, i.e. p55 (where the two-column bibliography starts) appears on this empty page, p54.
    – JC Y
    Jun 13 at 1:19
  • BTW, the doc is printed on both sides.
    – JC Y
    Jun 13 at 2:11
  • @JCY Please, open a new question, showing a short example of a failing document.
    – egreg
    Jun 13 at 8:03

You must log in to answer this question.

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