Open cbhushan opened 8 years ago
Thanks for your interest, I guess you are the first person to contact me about that in the 30 years since I wrote it:-)
This is just the usual latex "feature" of fragile commands in moving arguments need \protect so if you delete the .lof file and then edit your file to have
\caption{Hello again! This is \protect\B0-caption}
it should work fine,
David
On 10 January 2016 at 22:38, C Bhushan notifications@github.com wrote:
numdef has been life savior for me for a while (Found it here http://texstackexchangecom/a/66695) Thanks a lot for it
Unfortunately, I am facing difficulty to make \listoffigures work properly with it I am using pdflatex on Linux Here is a simple code to reproduce the error:
\documentclass{article} \usepackage{amsmath, amssymb, amsfonts}
\usepackage{numdef} \num\newcommand{\B0}[0]{B$_{\text{0}}$}
\begin{document} \listoffigures % works fine without this line
Hello world! This is \B0
\begin{figure} \centering Here goes the fig \caption{Hello again! This is \B0-caption} \end{figure}
\end{document}
Here is the error:
$ pdflatex testtex This is pdfTeX, Version 31415926-25-14014 (TeX Live 2013/Debian) restricted \write18 enabled entering extended mode (/testtex LaTeX2e <2011/06/27> Babel <39h> and hyphenation patterns for 2 languages loaded (/usr/share/texlive/texmf-dist/tex/latex/base/articlecls Document Class: article 2007/10/19 v14h Standard LaTeX document class (/usr/share/texlive/texmf-dist/tex/latex/base/size10clo)) (/usr/share/texlive/texmf-dist/tex/latex/amsmath/amsmathsty For additional information on amsmath, use the `?' option (/usr/share/texlive/texmf-dist/tex/latex/amsmath/amstextsty (/usr/share/texlive/texmf-dist/tex/latex/amsmath/amsgensty)) (/usr/share/texlive/texmf-dist/tex/latex/amsmath/amsbsysty) (/usr/share/texlive/texmf-dist/tex/latex/amsmath/amsopnsty)) (/usr/share/texlive/texmf-dist/tex/latex/amsfonts/amssymbsty (/usr/share/texlive/texmf-dist/tex/latex/amsfonts/amsfontssty)) (/home/cbhushan/texmf/tex/latex/local/numdefsty) (/testaux) (/testlof (/testlof (/testlof (/testlof (/testlof (/testlof (/testlof (/testlof (/testlof (/testlof (/testlof (/testlof (/testlof (/testlof ! TeX capacity exceeded, sorry [text input levels=15] \@filef@und ->testlof
l1 B$_{\text {0}}$\num@count = 0-caption}}{1}
! ==> Fatal error occurred, no output PDF file produced! Transcript written on testlog
And here is the content of testlof (testlog is similar to the output above)
\contentsline {figure}{\numberline {1}{\ignorespaces Hello again! This is \edef \B {\B }\futurelet \@tempa \let \afterassignment \let 0=0B${\text {0}}$\num@count = \afterassignment \let 0=0B${\text {0}}$\num@count = \afterassignment \let 0=0B$_{\text {0}}$\num@count = 0-caption}}{1}
— Reply to this email directly or view it on GitHub https://github.com/davidcarlisle/dpctex/issues/1.
numdef
has been life savior for me for a while (Found it here). Thanks a lot for it.Unfortunately, I am facing difficulty to make
\listoffigures
work properly with it. I am usingpdflatex
on Linux. Here is a simple code to reproduce the error:Here is the error:
And here is the content of
test.lof
(test.log
is similar to the output above).