-
Notifications
You must be signed in to change notification settings - Fork 76
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
compile errors if removing a list environment #241
Comments
Thanks for reporting. List environments are a somewhat known weakness. Any chance of getting a sanitised example of old and new text leading to this outcome. Otherwise this will be hard to debug. |
In the following I provide a sanitized example with the following restrictions:
I try no to damage the structure when adjusting the sample text. So hopefully this can be used to reproduce the bug. Furthermore there is additional complexity as we have the single glossary entries in separate files, use a Makefile to generate the glossary.tex and then include generated the glossary.tex in our final documents. So problems may also be caused by this structure / latexpand. Old: \chapter{Abkürzungsverzeichnis} \begin{acronym}[lorem] \acro{sample}[Sample]{Beispielprobe} \acroplural{sample}[samples]{Beispielproben} \end{acronym} \longnewglossaryentry{ipsum} { name=ipsum } { \begin{enumerate}[label=\alph*)] \item a cute animal \item[] oder \item some dummy text \item[] oder \item something else \item[] oder \item something totally different \end{enumerate} Depending on the context \dots. } \longnewglossaryentry{yellow} New: \chapter{Abkürzungsverzeichnis} \begin{acronym}[lorem] \acro{sample}[Sample]{Beispielprobe} \acroplural{sample}[samples]{Beispielproben} \end{acronym} \printglossaries \bibliographystyle{alpha} \bibliography{../commons/bibliography} \addcontentsline{toc}{chapter}{Literaturverzeichnis} \label{bibliography}} \renewcommand{\glossarypreamble}{\label{chap:glossary}} \makeglossaries \longnewglossaryentry{ipsum} { name=ipsum } { \begin{enumerate}[label=\alph*)] \item a cute animal \item[] oder \item some dummy text \item[] oder \item something else \item[] oder \item something totally different \end{enumerate} Depending on the context \dots. } \longnewglossaryentry{yellow} Furthermore due to the change with \makeglossaries the sample glossary entry \gls{ipsum} is only contained in the old document but not in the new one while \gls{yellow} is contained in both documents (cause in the old document the whole glossary was printed in the new document only the referenced entries and there is no \gls{ipsum} in the document). |
OK, I know it's been some time but I just looked at this again. The example you provided does not reproduce the error, as the argument of \longnewglossaryentry is the same in old.tex and new.tex, and the only difference is the `paragraph' starting with \printglossaries. Also, I am not familiar with glossaries package, nor is latexdiff, so \makeglossaries will not get expanded internally but treated atomistically, i.e. you cannot expect differences to be highlighted there. Nevertheless there should be no errors when compiling Also note that latexdiff does not recognise command arguments if there are not immediately following - it will not recognise commands separated by newlines or spaces. So writing the entry as the following:
there probably will no longer be a compilation error (but also no highlighting). Alternatively, use |
I'm experiencing the same bug, I think that it's triggered when all the old.tex \documentclass{article}
\begin{document}
Missing item error:
\begin{itemize}
\item {\it first item}
\end{itemize}
\end{document} new.tex \documentclass{article}
\begin{document}
Missing item error:
no items here
\end{document} LATEXDIFF 1.3.2 is generating a diff latex file which includes: \begin{itemize}%DIFAUXCMD
%DIFDELCMD < \item {\it %%%
\DIFdel{first item}%DIFDELCMD < }
\end{itemize}%DIFAUXCMD that cannot be compiled because there're no |
I can confirm that the problem seems to occur when the old.tex
new.tex
No diff at all is produced, but the I opened a question on stack exchange with some more information, before I came across this issue. |
Hi,
first latexdiff is a really great tool, thanks for developing it.
We noticed cases where it produces a .tex which contains bugs/can't be compiled.
In our document we had a glossary from which some entries have been removed. Some of these entries contain enumerate environments. However (maybe due to other changes in the defined term) the \begin{enumerate} is removed but orphaned \item statements remain.
As I may not provide the file I extract a sample of such a corrupted block but had to replace the text with dummy content.
Version is
latexdiff-vc --version
This is LATEXDIFF-VC 1.3.0
(c) 2005-2018 F J Tilmann
We also encountered some issues with added chapters but these are negligible for now ...
The text was updated successfully, but these errors were encountered: