I read many posts but I found nothing.
I have a legacy project which I used to run in an old ubuntu 14 with its tex packages. Now, I want to rebuild the old project with a modern texlive suite (archlinux). The problem is the amount of code, impossible to put a small snippet to show you.
This is the minimal example of using my "legacy library".
\documentclass[twoside,a4paper,12pt]{article}
\input{/mnt/repositories/latex/latex-my/imports/latex-doc/headers_begin.tex}
\setlang{en}
\renewcommand{\docOwner}{owner}
\renewcommand{\docDate}{TODAY}
\renewcommand{\docVersion}{version}
\renewcommand{\docEmail}{email}
\renewcommand{\docTitle}{title}
\newcommand{\docAuthors}{authors}
\renewcommand{\docCopyright}{2016-2017}
\renewcommand{\docListingFont}{dejavu}
\renewcommand{\structnextlength}{\shortnext}
\renewcommand{\tocWithContents}{book}
\renewcommand{\tocWithTables}{simple}
\renewcommand{\tocWithFigures}{simple}
\renewcommand{\tocWithListings}{book}
\renewcommand{\tocWithInject}{book}
\renewcommand{\tocWithInjectAck}{book}
\renewcommand{\tocWithInjectSummary}{book}
\renewcommand{\tocWithTitle}{blank}
\renewcommand{\tocWithSpace}{book}
\renewcommand{\headersLayout}{normal}
\renewcommand{\docHeader}{header}
\renewcommand{\snippets}{styled}
\input{/mnt/repositories/latex/latex-my/imports/latex-doc/headers_end.tex}
\begin{document}
\setlang{en}
\begin{primary}[Introduction]{Introduction}
\label{sec-4}
\phantomsection
The introduction.
\end{primary}\clearpage
\end{document}
It depends if I set \setLang{en} or \setLang{es}, I get two different errors:
With \setLang{en}
❯ pdflatex semi.tex
This is pdfTeX, Version 3.14159265-2.6-1.40.17 (TeX Live 2016/Arch Linux) (preloaded format=pdflatex)
restricted \write18 enabled.
entering extended mode
(./semi.tex
LaTeX2e <2016/03/31> patch level 3
... I need to cut some lines because of stackexchange limits...
(/usr/share/texmf-dist/tex/latex/eso-pic/eso-pic.sty)
(/usr/share/texmf-dist/tex/latex/pdfpages/pppdftex.def)))
Package csquotes Warning: Load 'inputenc' before 'csquotes' on input line 26.
(./semi.aux) (/usr/share/texmf-dist/tex/latex/pxfonts/omlpxmi.fd)
(/usr/share/texmf-dist/tex/latex/pxfonts/omspxsy.fd)
(/usr/share/texmf-dist/tex/latex/pxfonts/omxpxex.fd)
(/usr/share/texmf-dist/tex/latex/pxfonts/upxexa.fd)
(/usr/share/texmf-dist/tex/latex/base/ts1cmr.fd)
(/usr/share/texmf-dist/tex/latex/pxfonts/t1pxr.fd)
(/usr/share/texmf-dist/tex/context/base/mkii/supp-pdf.mkii
[Loading MPS to PDF converter (version 2006.09.02).]
) (/usr/share/texmf-dist/tex/latex/oberdiek/epstopdf-base.sty
(/usr/share/texmf-dist/tex/latex/oberdiek/grfext.sty)
(/usr/share/texmf-dist/tex/latex/latexconfig/epstopdf-sys.cfg))
(/usr/share/texmf-dist/tex/latex/ucs/ucsencs.def)
*geometry* driver: auto-detecting
*geometry* detected driver: pdftex
ABD: EveryShipout initializing macros
(/usr/share/texmf-dist/tex/latex/hyperref/nameref.sty
(/usr/share/texmf-dist/tex/generic/oberdiek/gettitlestring.sty))
(/usr/share/texmf-dist/tex/generic/oberdiek/se-pdfdoc.def)
(/usr/share/texmf-dist/tex/generic/oberdiek/se-utf8.def)
(/usr/share/texmf-dist/tex/latex/fmtcount/fc-spanish.def)
! Undefined control sequence.
\fc@orddef@ult #1->\fc@textsuperscript
{#1}
l.26 \begin{document}
? q
OK, entering \batchmode%
With \setLang{es}
❯ pdflatex semi.tex
This is pdfTeX, Version 3.14159265-2.6-1.40.17 (TeX Live 2016/Arch Linux) (preloaded format=pdflatex)
restricted \write18 enabled.
entering extended mode
(./semi.tex
LaTeX2e <2016/03/31> patch level 3
Babel <3.9r> and hyphenation patterns for 83 language(s) loaded.
(/usr/share/texmf-dist/tex/latex/base/article.cls
Document Class: article 2014/09/29 v1.4h Standard LaTeX document class
(/usr/share/texmf-dist/tex/latex/base/size12.clo))
(/mnt/repositories/latex/latex-my/imports/latex-doc/headers_begin.tex
(/usr/share/texmf-dist/tex/generic/ifxetex/ifxetex.sty)
... I need to cut some lines because of stackexchange limits...
) (/usr/share/texmf-dist/tex/latex/oberdiek/epstopdf-base.sty
(/usr/share/texmf-dist/tex/latex/oberdiek/grfext.sty)
(/usr/share/texmf-dist/tex/latex/latexconfig/epstopdf-sys.cfg))
(/usr/share/texmf-dist/tex/latex/ucs/ucsencs.def)
*geometry* driver: auto-detecting
*geometry* detected driver: pdftex
ABD: EveryShipout initializing macros
(/usr/share/texmf-dist/tex/latex/hyperref/nameref.sty
(/usr/share/texmf-dist/tex/generic/oberdiek/gettitlestring.sty))
(/usr/share/texmf-dist/tex/generic/oberdiek/se-pdfdoc.def)
(/usr/share/texmf-dist/tex/generic/oberdiek/se-utf8.def)
(/usr/share/texmf-dist/tex/latex/pxfonts/ot1pxr.fd)
(/usr/share/texmf-dist/tex/latex/pxfonts/upxmia.fd)
(/usr/share/texmf-dist/tex/latex/pxfonts/upxsya.fd)
(/usr/share/texmf-dist/tex/latex/pxfonts/upxsyb.fd)
(/usr/share/texmf-dist/tex/latex/pxfonts/upxsyc.fd)
! Missing \endcsname inserted.
<to be read again>
\<let>-command
l.26 \begin{document}
Any clue how to debug the error here? Any guess from the output/log/error messages? I am completely lost with this type of debugging info.
I tried comment some "\input" that I have in the legacy library, but some parts are related to others and is hard as hell to "remove parts".
Is there any type of backtrace mechanism to find the original line of my library that is creating this errors at the beginning? Or at least the package (amsmath, etc).
Update 07/04/2017
More info with the \tracingall
(last lines):
\@empty ->
{\noexpand}
\@gobble #1->
#1<-\getrefbykeydefault {##1}{}{??}
\def #1#2{->\<def>-command \expandafter \noexpand \csname \expandafter \@gobble
\string #1\@empty \endcsname \@gobble {
#1<-\pageref
#2<-##1
{\expandafter}
{\csname}
{\expandafter}
{\string}
\@gobble #1->
#1<-\
\@empty ->
{\noexpand}
\@gobble #1->
#1<-\getrefbykeydefault {##1}{page}{0}
\NROrg@ifthenelse #1#2#3->\let \bbl@temp@pref \pageref \let \pageref \org@pager
ef \let \bbl@temp@ref \ref \let \ref \org@ref \@safe@activestrue \org@ifthenels
e {#1}{\let \pageref \bbl@temp@pref \let \ref \bbl@temp@ref \@safe@activesfalse
#2}{\let \pageref \bbl@temp@pref \let \ref \bbl@temp@ref \@safe@activesfalse #
3}
#1<-\equal {\docSubtitle }{}
#2<- \large {\ }\\
#3<- \large {\docSubtitle }\\
\let #1->\expandafter \expandafter \expandafter \HyPsd@@LetCommand \expandafter
\expandafter \expandafter {\expandafter \@gobble \string #1\@empty }
#1<-\bbl@temp@pref
{\expandafter}
{\expandafter}
{\expandafter}
{\expandafter}
{\expandafter}
{\string}
{\expandafter}
{\expandafter}
\@gobble #1->
#1<-\
\HyPsd@@LetCommand #1->\expandafter \ifx \csname #1\expandafter \endcsname \csn
ame iftrue\endcsname \pdfstringdefWarn \let \expandafter \@gobble \else \expand
after \ifx \csname #1\expandafter \endcsname \csname iffalse\endcsname \pdfstri
ngdefWarn \let \expandafter \expandafter \expandafter \@gobble \else \<let>-com
mand \expandafter \noexpand \csname #1\expandafter \expandafter \expandafter \e
ndcsname \fi \fi
#1<-bbl@temp@pref\@empty
{\expandafter}
{\csname}
\@empty ->
{\expandafter}
{\csname}
{changing \bbl@temp@pref=undefined}
{into \bbl@temp@pref=\relax}
{\ifx: (level 5) entered on line 27}
{false}
{\else: \ifx (level 5) entered on line 27}
{\expandafter}
{\csname}
\@empty ->
{\expandafter}
{\csname}
{\ifx: (level 6) entered on line 27}
{false}
{\else: \ifx (level 6) entered on line 27}
{\expandafter}
{\csname}
\@empty ->
{\expandafter}
{\expandafter}
{\fi: \ifx (level 6) entered on line 27}
{\expandafter}
{\fi: \ifx (level 5) entered on line 27}
{\noexpand}
\pageref #1->\HyPsd@@pageref #1*\END
#1<-\let
\HyPsd@@pageref #1*#2\END ->\ifx \\#2\\\HyPsd@@@pageref {#1}\else \expandafter
\HyPsd@@@pageref \fi
#1<-\let
#2<-
{\ifx: (level 5) entered on line 27}
{true}
\HyPsd@@@pageref #1->\expandafter \ifx \csname r@#1\endcsname \relax ??\else \e
xpandafter \expandafter \expandafter \expandafter \expandafter \expandafter \ex
pandafter \@car \expandafter \expandafter \expandafter \@gobble \csname r@#1\en
dcsname {}\@nil \fi
#1<-\let
{\expandafter}
{\csname}
\let #1->\expandafter \expandafter \expandafter \HyPsd@@LetCommand \expandafter
\expandafter \expandafter {\expandafter \@gobble \string #1\@empty }
#1<-\endcsname
{\expandafter}
{\expandafter}
{\expandafter}
{\expandafter}
{\expandafter}
{\string}
{\expandafter}
{\expandafter}
\@gobble #1->
#1<-\
\HyPsd@@LetCommand #1->\expandafter \ifx \csname #1\expandafter \endcsname \csn
ame iftrue\endcsname \pdfstringdefWarn \let \expandafter \@gobble \else \expand
after \ifx \csname #1\expandafter \endcsname \csname iffalse\endcsname \pdfstri
ngdefWarn \let \expandafter \expandafter \expandafter \@gobble \else \<let>-com
mand \expandafter \noexpand \csname #1\expandafter \expandafter \expandafter \e
ndcsname \fi \fi
#1<-endcsname\@empty
{\expandafter}
{\csname}
\@empty ->
{\expandafter}
{\csname}
{\ifx: (level 6) entered on line 27}
{false}
{\else: \ifx (level 6) entered on line 27}
{\expandafter}
{\csname}
\@empty ->
{\expandafter}
{\csname}
{\ifx: (level 7) entered on line 27}
{false}
{\else: \ifx (level 7) entered on line 27}
! Missing \endcsname inserted.
<to be read again>
\<let>-command
\HyPsd@@LetCommand ...gobble \else \<let>-command
\expandafter \noexpand \cs...
\HyPsd@@@pageref ...r \ifx \csname r@#1\endcsname
\relax ??\else \expandafte...
\HyPsd@@pageref ...ifx \\#2\\\HyPsd@@@pageref {#1}
\else \expandafter \HyPsd@...
\NROrg@ifthenelse ...\bbl@temp@pref \pageref \let
\pageref \org@pageref \let...
\@title ...ge {\ }\\ }{ \large {\docSubtitle }\\ }
\vspace {0.1in} \ifthenel...
\pdfstringdef ... \HyPsd@LetCommand \Hy@temp #1{#2
}\endgroup \ifx #1\@empty ...
\KVS@ProcessorDefault ...e KV@#1@#2\endcsname {#3}
\fi \fi
\KVS@Parse ...#1}{}{\KVS@Process #1=\KVS@Nil {#3}}
\KVS@MaybeBreak \KVS@IfEmp...
<argument> ...se \hypersetup {pdftitle={\@title }}
\fi \fi \ifx \@pdfauthor \...
\@firstoftwo #1#2->#1
\@begindocumenthook ... be\MessageBreak disabled}}
\ifx \ttl@Hy@steplink \@un...
\document ...ent \@firstofone \@begindocumenthook
\ifdim \topskip <1sp\globa...
l.27 \begin{document}
I upload the legacy + minimal file (pdflatex testit.tex
). I needed to remove plenty of things, rename images,... for almost 1 hour and half, but I hope it helps. Just replace the two \setLang{es}
with \setLang{en}
to see the other error. Uploaded here: box test.zip.
\input{/mnt/repositories/latex/latex-my/imports/latex-doc/headers_begin.tex}
is not likely to work anywhere other than your machine\<let>
looks odd. You can use e.g.\tracingall
but you will get a lot of output unless you minimise first. In the first case,\fc@textsuperscript
appears to be undefined..zip
files from unknown sources. You'd be better off using a pastebin site if you really can't come up with something sufficiently minimal to post here.