ftilmann / latexdiff

Compares two latex files and marks up significant differences between them. Releases on www.ctan.org and mirrors
GNU General Public License v3.0
514 stars 72 forks source link

error with revtex4-1 bibliographies caused by space between \bibitem and its arguments #194

Closed yzcj105 closed 4 years ago

yzcj105 commented 4 years ago

All the files listed here can be found in latexdiff_sample repo.

Suppose we have old version old.tex with old.bib, new.tex and new.bib. Both can be compiled individually

pdflatex old
bibtex old
pdflatex old
pdflatex old
pdflatex new
bibtex new
pdflatex new
pdflatex new

My latexdiff version

This is LATEXDIFF 1.2.0  (Algorithm::Diff 1.15 so, Perl v5.30.0)
  (c) 2004-2016 F J Tilmann

old.tex file

\documentclass[prl]{revtex4-1}
%\usepackage[dvipsnames]{xcolor}
\usepackage[colorlinks=false]{hyperref}
\begin{document}
hello world
Reference C \cite{Verstraete:2004d},
\bibliography{old}
\end{document}

with old.bib file


@article{Verstraete:2004d,
    Author = {Verstraete, F. and Garc\'ia-Ripoll, J. J. and Cirac, J. I.},
    Journal = {Phys. Rev. Lett.},
    Month = {Nov},
    Pages = {207204},
    Title = {Matrix Product Density Operators: Simulation of Finite-Temperature and Dissipative Systems},
    Volume = {93},
    Year = {2004}}

new.tex file

\documentclass[prl]{revtex4-1}
\usepackage[colorlinks=false]{hyperref}
\begin{document}
hello world
Reference A \cite{Czarnik:2015}.
Reference B \cite{Czarnik:2012}.
\bibliography{new}
\end{document}

new.bib file

@article{Czarnik:2012,
  title = {Projected entangled pair states at finite temperature: Imaginary time evolution with ancillas},
  author = {Czarnik, Piotr and Cincio, Lukasz and Dziarmaga, Jacek},
  journal = {Phys. Rev. B},
  volume = {86},
  issue = {24},
  pages = {245101},
  numpages = {6},
  year = {2012},
  month = {Dec},
  publisher = {American Physical Society},
  doi = {10.1103/PhysRevB.86.245101},
  url = {https://link.aps.org/doi/10.1103/PhysRevB.86.245101}
}

@article{Czarnik:2015,
  title = {Variational approach to projected entangled pair states at finite temperature},
  author = {Czarnik, Piotr and Dziarmaga, Jacek},
  journal = {Phys. Rev. B},
  volume = {92},
  issue = {3},
  pages = {035152},
  numpages = {8},
  year = {2015},
  month = {Jul},
  publisher = {American Physical Society},
  doi = {10.1103/PhysRevB.92.035152},
  url = {https://link.aps.org/doi/10.1103/PhysRevB.92.035152}
}

I have also tried to run

latexpand --expand-bbl old.bbl old.tex > old-fl.tex
pdflatex old-fl.tex
latexpand --expand-bbl old.bbl old.tex > new-fl.tex
pdflatex new-fl.tex

old-fl.tex file

\documentclass[prl]{revtex4-1}
\usepackage[colorlinks=false]{hyperref}
\begin{document}
hello world
Reference C \cite{Verstraete:2004d},
\begin{thebibliography}{1}
\makeatletter
\providecommand \@ifxundefined [1]{
 \@ifx{#1\undefined}
}
\providecommand \@ifnum [1]{
 \ifnum #1\expandafter \@firstoftwo
 \else \expandafter \@secondoftwo
 \fi
}
\providecommand \@ifx [1]{
 \ifx #1\expandafter \@firstoftwo
 \else \expandafter \@secondoftwo
 \fi
}
\providecommand \natexlab [1]{#1}
\providecommand \enquote  [1]{``#1''}
\providecommand \bibnamefont  [1]{#1}
\providecommand \bibfnamefont [1]{#1}
\providecommand \citenamefont [1]{#1}
\providecommand \href@noop [0]{\@secondoftwo}
\providecommand \href [0]{\begingroup \@sanitize@url \@href}
\providecommand \@href[1]{\@@startlink{#1}\@@href}
\providecommand \@@href[1]{\endgroup#1\@@endlink}
\providecommand \@sanitize@url [0]{\catcode `\\12\catcode `\$12\catcode
  `\&12\catcode `\#12\catcode `\^12\catcode `\_12\catcode `\%12\relax}
\providecommand \@@startlink[1]{}
\providecommand \@@endlink[0]{}
\providecommand \url  [0]{\begingroup\@sanitize@url \@url }
\providecommand \@url [1]{\endgroup\@href {#1}{\urlprefix }}
\providecommand \urlprefix  [0]{URL }
\providecommand \Eprint [0]{\href }
\providecommand \doibase [0]{http://dx.doi.org/}
\providecommand \selectlanguage [0]{\@gobble}
\providecommand \bibinfo  [0]{\@secondoftwo}
\providecommand \bibfield  [0]{\@secondoftwo}
\providecommand \translation [1]{[#1]}
\providecommand \BibitemOpen [0]{}
\providecommand \bibitemStop [0]{}
\providecommand \bibitemNoStop [0]{.\EOS\space}
\providecommand \EOS [0]{\spacefactor3000\relax}
\providecommand \BibitemShut  [1]{\csname bibitem#1\endcsname}
\let\auto@bib@innerbib\@empty
\bibitem [{\citenamefont {Verstraete}\ \emph {et~al.}(2004)\citenamefont
  {Verstraete}, \citenamefont {Garc\'ia-Ripoll},\ and\ \citenamefont
  {Cirac}}]{Verstraete:2004d}
  \BibitemOpen
  \bibfield  {author} {\bibinfo {author} {\bibfnamefont {F.}~\bibnamefont
  {Verstraete}}, \bibinfo {author} {\bibfnamefont {J.~J.}\ \bibnamefont
  {Garc\'ia-Ripoll}}, \ and\ \bibinfo {author} {\bibfnamefont {J.~I.}\
  \bibnamefont {Cirac}},\ }\href@noop {} {\bibfield  {journal} {\bibinfo
  {journal} {Phys. Rev. Lett.}\ }\textbf {\bibinfo {volume} {93}},\ \bibinfo
  {pages} {207204} (\bibinfo {year} {2004})}\BibitemShut {NoStop}
\end{thebibliography}

\end{document}

and new-fl.tex file

\documentclass[prl]{revtex4-1}

\usepackage[colorlinks=false]{hyperref}

\begin{document}
hello world

Reference A \cite{Czarnik:2015}.
Reference B \cite{Czarnik:2012}.

\begin{thebibliography}{2}
\makeatletter
\providecommand \@ifxundefined [1]{
 \@ifx{#1\undefined}
}
\providecommand \@ifnum [1]{
 \ifnum #1\expandafter \@firstoftwo
 \else \expandafter \@secondoftwo
 \fi
}
\providecommand \@ifx [1]{
 \ifx #1\expandafter \@firstoftwo
 \else \expandafter \@secondoftwo
 \fi
}
\providecommand \natexlab [1]{#1}
\providecommand \enquote  [1]{``#1''}
\providecommand \bibnamefont  [1]{#1}
\providecommand \bibfnamefont [1]{#1}
\providecommand \citenamefont [1]{#1}
\providecommand \href@noop [0]{\@secondoftwo}
\providecommand \href [0]{\begingroup \@sanitize@url \@href}
\providecommand \@href[1]{\@@startlink{#1}\@@href}
\providecommand \@@href[1]{\endgroup#1\@@endlink}
\providecommand \@sanitize@url [0]{\catcode `\\12\catcode `\$12\catcode
  `\&12\catcode `\#12\catcode `\^12\catcode `\_12\catcode `\%12\relax}
\providecommand \@@startlink[1]{}
\providecommand \@@endlink[0]{}
\providecommand \url  [0]{\begingroup\@sanitize@url \@url }
\providecommand \@url [1]{\endgroup\@href {#1}{\urlprefix }}
\providecommand \urlprefix  [0]{URL }
\providecommand \Eprint [0]{\href }
\providecommand \doibase [0]{http://dx.doi.org/}
\providecommand \selectlanguage [0]{\@gobble}
\providecommand \bibinfo  [0]{\@secondoftwo}
\providecommand \bibfield  [0]{\@secondoftwo}
\providecommand \translation [1]{[#1]}
\providecommand \BibitemOpen [0]{}
\providecommand \bibitemStop [0]{}
\providecommand \bibitemNoStop [0]{.\EOS\space}
\providecommand \EOS [0]{\spacefactor3000\relax}
\providecommand \BibitemShut  [1]{\csname bibitem#1\endcsname}
\let\auto@bib@innerbib\@empty
\bibitem [{\citenamefont {Czarnik}\ and\ \citenamefont
  {Dziarmaga}(2015)}]{Czarnik:2015}
  \BibitemOpen
  \bibfield  {author} {\bibinfo {author} {\bibfnamefont {Piotr}\ \bibnamefont
  {Czarnik}}\ and\ \bibinfo {author} {\bibfnamefont {Jacek}\ \bibnamefont
  {Dziarmaga}},\ }\bibfield  {title} {\enquote {\bibinfo {title} {Variational
  approach to projected entangled pair states at finite temperature},}\ }\href
  {\doibase 10.1103/PhysRevB.92.035152} {\bibfield  {journal} {\bibinfo
  {journal} {Phys. Rev. B}\ }\textbf {\bibinfo {volume} {92}},\ \bibinfo
  {pages} {035152} (\bibinfo {year} {2015})}\BibitemShut {NoStop}
\bibitem [{\citenamefont {Czarnik}\ \emph {et~al.}(2012)\citenamefont
  {Czarnik}, \citenamefont {Cincio},\ and\ \citenamefont
  {Dziarmaga}}]{Czarnik:2012}
  \BibitemOpen
  \bibfield  {author} {\bibinfo {author} {\bibfnamefont {Piotr}\ \bibnamefont
  {Czarnik}}, \bibinfo {author} {\bibfnamefont {Lukasz}\ \bibnamefont
  {Cincio}}, \ and\ \bibinfo {author} {\bibfnamefont {Jacek}\ \bibnamefont
  {Dziarmaga}},\ }\bibfield  {title} {\enquote {\bibinfo {title} {Projected
  entangled pair states at finite temperature: Imaginary time evolution with
  ancillas},}\ }\href {\doibase 10.1103/PhysRevB.86.245101} {\bibfield
  {journal} {\bibinfo  {journal} {Phys. Rev. B}\ }\textbf {\bibinfo {volume}
  {86}},\ \bibinfo {pages} {245101} (\bibinfo {year} {2012})}\BibitemShut
  {NoStop}
\end{thebibliography}

\end{document}

They also works perfectly. However, there is error when running

latexdiff old-fl.tex new-fl.tex >diff.tex

Here is the generated diff.tex

\documentclass[prl]{revtex4-1}
%DIF LATEXDIFF DIFFERENCE FILE
%DIF DEL old-fl.tex   Mon Mar 30 20:11:56 2020
%DIF ADD new-fl.tex   Mon Mar 30 20:12:34 2020

\usepackage[colorlinks=false]{hyperref}
%DIF PREAMBLE EXTENSION ADDED BY LATEXDIFF
%DIF UNDERLINE PREAMBLE %DIF PREAMBLE
\RequirePackage[normalem]{ulem} %DIF PREAMBLE
\RequirePackage{color}\definecolor{RED}{rgb}{1,0,0}\definecolor{BLUE}{rgb}{0,0,1} %DIF PREAMBLE
\providecommand{\DIFaddtex}[1]{{\protect\color{blue}\uwave{#1}}} %DIF PREAMBLE
\providecommand{\DIFdeltex}[1]{{\protect\color{red}\sout{#1}}}                      %DIF PREAMBLE
%DIF SAFE PREAMBLE %DIF PREAMBLE
\providecommand{\DIFaddbegin}{} %DIF PREAMBLE
\providecommand{\DIFaddend}{} %DIF PREAMBLE
\providecommand{\DIFdelbegin}{} %DIF PREAMBLE
\providecommand{\DIFdelend}{} %DIF PREAMBLE
%DIF FLOATSAFE PREAMBLE %DIF PREAMBLE
\providecommand{\DIFaddFL}[1]{\DIFadd{#1}} %DIF PREAMBLE
\providecommand{\DIFdelFL}[1]{\DIFdel{#1}} %DIF PREAMBLE
\providecommand{\DIFaddbeginFL}{} %DIF PREAMBLE
\providecommand{\DIFaddendFL}{} %DIF PREAMBLE
\providecommand{\DIFdelbeginFL}{} %DIF PREAMBLE
\providecommand{\DIFdelendFL}{} %DIF PREAMBLE
%DIF HYPERREF PREAMBLE %DIF PREAMBLE
\providecommand{\DIFadd}[1]{\texorpdfstring{\DIFaddtex{#1}}{#1}} %DIF PREAMBLE
\providecommand{\DIFdel}[1]{\texorpdfstring{\DIFdeltex{#1}}{}} %DIF PREAMBLE
%DIF END PREAMBLE EXTENSION ADDED BY LATEXDIFF

\begin{document}
hello world

Reference \DIFdelbegin \DIFdel{C \mbox{%DIFAUXCMD
\cite{Verstraete:2004d}}%DIFAUXCMD
,
}\DIFdelend \DIFaddbegin \DIFadd{A \mbox{%DIFAUXCMD
\cite{Czarnik:2015}}%DIFAUXCMD
.
Reference B \mbox{%DIFAUXCMD
\cite{Czarnik:2012}}%DIFAUXCMD
.
}\DIFaddend 

\DIFdelbegin %DIFDELCMD < \begin{thebibliography}{1}
%DIFDELCMD < %%%
\DIFdelend \DIFaddbegin \begin{thebibliography}{2}
\DIFaddend \makeatletter
\providecommand \@ifxundefined [1]{
 \@ifx{#1\undefined}
}
\providecommand \@ifnum [1]{
 \ifnum #1\expandafter \@firstoftwo
 \else \expandafter \@secondoftwo
 \fi
}
\providecommand \@ifx [1]{
 \ifx #1\expandafter \@firstoftwo
 \else \expandafter \@secondoftwo
 \fi
}
\providecommand \natexlab [1]{#1}
\providecommand \enquote  [1]{``#1''}
\providecommand \bibnamefont  [1]{#1}
\providecommand \bibfnamefont [1]{#1}
\providecommand \citenamefont [1]{#1}
\providecommand \href@noop [0]{\@secondoftwo}
\providecommand \href [0]{\begingroup \@sanitize@url \@href}
\providecommand \@href[1]{\@@startlink{#1}\@@href}
\providecommand \@@href[1]{\endgroup#1\@@endlink}
\providecommand \@sanitize@url [0]{\catcode `\\12\catcode `\$12\catcode
  `\&12\catcode `\#12\catcode `\^12\catcode `\_12\catcode `\%12\relax}
\providecommand \@@startlink[1]{}
\providecommand \@@endlink[0]{}
\providecommand \url  [0]{\begingroup\@sanitize@url \@url }
\providecommand \@url [1]{\endgroup\@href {#1}{\urlprefix }}
\providecommand \urlprefix  [0]{URL }
\providecommand \Eprint [0]{\href }
\providecommand \doibase [0]{http://dx.doi.org/}
\providecommand \selectlanguage [0]{\@gobble}
\providecommand \bibinfo  [0]{\@secondoftwo}
\providecommand \bibfield  [0]{\@secondoftwo}
\providecommand \translation [1]{[#1]}
\providecommand \BibitemOpen [0]{}
\providecommand \bibitemStop [0]{}
\providecommand \bibitemNoStop [0]{.\EOS\space}
\providecommand \EOS [0]{\spacefactor3000\relax}
\providecommand \BibitemShut  [1]{\csname bibitem#1\endcsname}
\let\auto@bib@innerbib\@empty
\bibitem [{\citenamefont {\DIFdelbegin \DIFdel{Verstraete}\DIFdelend \DIFaddbegin \DIFadd{Czarnik}\DIFaddend }\ \DIFaddbegin \DIFadd{and\ \mbox{%DIFAUXCMD
\citenamefont
  }%DIFAUXCMD
}{\DIFadd{Dziarmaga}}\DIFadd{(2015)}}]{\DIFadd{Czarnik:2015}}
  \BibitemOpen
  \bibfield  {\DIFadd{author}} {\bibinfo {\DIFadd{author}} {\bibfnamefont {\DIFadd{Piotr}}\DIFadd{\ }\bibnamefont
  {\DIFadd{Czarnik}}}\DIFadd{\ and\ }\bibinfo {\DIFadd{author}} {\bibfnamefont {\DIFadd{Jacek}}\DIFadd{\ }\bibnamefont
  {\DIFadd{Dziarmaga}}}\DIFadd{,\ }}\bibfield  {\DIFadd{title}} {\enquote {\bibinfo {\DIFadd{title}} {\DIFadd{Variational
  approach to projected entangled pair states at finite temperature}}\DIFadd{,}}\DIFadd{\ }}\href
  {\doibase \DIFadd{10.1103/PhysRevB.92.035152}} {\bibfield  {\DIFadd{journal}} {\bibinfo
  {\DIFadd{journal}} {\DIFadd{Phys. Rev. B}}\DIFadd{\ }}\textbf {\bibinfo {\DIFadd{volume}} {\DIFadd{92}}}\DIFadd{,\ }\bibinfo
  {\DIFadd{pages}} {\DIFadd{035152}} \DIFadd{(}\bibinfo {\DIFadd{year}} {\DIFadd{2015}}\DIFadd{)}}\BibitemShut {\DIFadd{NoStop}}
\bibitem [{\DIFadd{\mbox{%DIFAUXCMD
\citenamefont }%DIFAUXCMD
}{\DIFadd{Czarnik}}\DIFadd{\ }\DIFaddend \emph {et~al.}(\DIFdelbegin \DIFdel{2004}\DIFdelend \DIFaddbegin \DIFadd{2012}\DIFaddend )\citenamefont
  {\DIFdelbegin \DIFdel{Verstraete}\DIFdelend \DIFaddbegin \DIFadd{Czarnik}\DIFaddend }, \citenamefont {\DIFdelbegin \DIFdel{Garc\'ia-Ripoll}\DIFdelend \DIFaddbegin \DIFadd{Cincio}\DIFaddend },\ and\ \citenamefont
  {\DIFdelbegin \DIFdel{Cirac}\DIFdelend \DIFaddbegin \DIFadd{Dziarmaga}\DIFaddend }}]{\DIFdelbegin \DIFdel{Verstraete:2004d}\DIFdelend \DIFaddbegin \DIFadd{Czarnik:2012}\DIFaddend }
  \BibitemOpen
  \bibfield  {author} {\bibinfo {author} {\bibfnamefont {\DIFdelbegin \DIFdel{F.}\DIFdelend \DIFaddbegin \DIFadd{Piotr}\DIFaddend }\DIFdelbegin \DIFdel{~}\DIFdelend \DIFaddbegin \DIFadd{\ }\DIFaddend \bibnamefont
  {\DIFdelbegin \DIFdel{Verstraete}\DIFdelend \DIFaddbegin \DIFadd{Czarnik}\DIFaddend }}, \bibinfo {author} {\bibfnamefont {\DIFdelbegin \DIFdel{J.~J.}\DIFdelend \DIFaddbegin \DIFadd{Lukasz}\DIFaddend }\ \bibnamefont
  {\DIFdelbegin \DIFdel{Garc\'ia-Ripoll}\DIFdelend \DIFaddbegin \DIFadd{Cincio}\DIFaddend }}, \ and\ \bibinfo {author} {\bibfnamefont {\DIFdelbegin \DIFdel{J.~I.}\DIFdelend \DIFaddbegin \DIFadd{Jacek}\DIFaddend }\ \bibnamefont
  {\DIFdelbegin \DIFdel{Cirac}\DIFdelend \DIFaddbegin \DIFadd{Dziarmaga}\DIFaddend }},\ }\DIFaddbegin \bibfield  {\DIFadd{title}} {\enquote {\bibinfo {\DIFadd{title}} {\DIFadd{Projected
  entangled pair states at finite temperature: Imaginary time evolution with
  ancillas}}\DIFadd{,}}\DIFadd{\ }}\DIFaddend \href \DIFdelbegin \DIFdel{@noop }\DIFdelend {\DIFaddbegin \doibase \DIFadd{10.1103/PhysRevB.86.245101}\DIFaddend } {\bibfield
  {journal} {\bibinfo  {journal} {Phys. Rev. \DIFdelbegin \DIFdel{Lett.}\DIFdelend \DIFaddbegin \DIFadd{B}\DIFaddend }\ }\textbf {\bibinfo {volume}
  {\DIFdelbegin \DIFdel{93}\DIFdelend \DIFaddbegin \DIFadd{86}\DIFaddend }},\ \bibinfo {pages} {\DIFdelbegin \DIFdel{207204}\DIFdelend \DIFaddbegin \DIFadd{245101}\DIFaddend } (\bibinfo {year} {\DIFdelbegin \DIFdel{2004}\DIFdelend \DIFaddbegin \DIFadd{2012}\DIFaddend })}\BibitemShut
  {NoStop}
\end{thebibliography}

\end{document}
yzcj105 commented 4 years ago

error information

ftilmann commented 4 years ago

The problem is that [prl]revtex4-1 puts a space between \bibitem and its arguments. It is a known and documented limitation of latexdiff that this is not allowed and will generally lead to confusion. You can work around this by using --allow-spaces option but I don't consider it fully satisfactory because it can have negative side effects for your main text, and deleted references are not marked up. Depending on your workflow and programming skills I would recommend to either write a little pre-processor that removes the spaces between the arguments in the bbl file, or change the bibliography style to one that does not have these spurious spaces (note that in your toy example it still fails because there is a problem if the first item in the bibliography is deleted - that's a bug really, but I hope that situation is quite rare in real cases)

ftilmann commented 4 years ago

Note that I changed the title of this issue to better reflect the root cause. I will leave the issue open (as the pre-processor mentioned above could theoretically be integrated into latexdiff, but as "Low" priority, meaning I will not be working on it in the foreseeable future. Still you can let me know if you found a workable solution (and if you do write a pre-processor, please let me have a copy)

yzcj105 commented 4 years ago

@ftilmann Thank you very much. Here is some quick feedback. I tested with --allow-space and get

\documentclass[prl]{revtex4-1}
%DIF LATEXDIFF DIFFERENCE FILE
%DIF DEL old-fl.tex   Tue Mar 31 04:49:32 2020
%DIF ADD new-fl.tex   Tue Mar 31 04:49:32 2020

\usepackage[colorlinks=false]{hyperref}
%DIF PREAMBLE EXTENSION ADDED BY LATEXDIFF
%DIF UNDERLINE PREAMBLE %DIF PREAMBLE
\RequirePackage[normalem]{ulem} %DIF PREAMBLE
\RequirePackage{color}\definecolor{RED}{rgb}{1,0,0}\definecolor{BLUE}{rgb}{0,0,1} %DIF PREAMBLE
\providecommand{\DIFaddtex}[1]{{\protect\color{blue}\uwave{#1}}} %DIF PREAMBLE
\providecommand{\DIFdeltex}[1]{{\protect\color{red}\sout{#1}}}                      %DIF PREAMBLE
%DIF SAFE PREAMBLE %DIF PREAMBLE
\providecommand{\DIFaddbegin}{} %DIF PREAMBLE
\providecommand{\DIFaddend}{} %DIF PREAMBLE
\providecommand{\DIFdelbegin}{} %DIF PREAMBLE
\providecommand{\DIFdelend}{} %DIF PREAMBLE
%DIF FLOATSAFE PREAMBLE %DIF PREAMBLE
\providecommand{\DIFaddFL}[1]{\DIFadd{#1}} %DIF PREAMBLE
\providecommand{\DIFdelFL}[1]{\DIFdel{#1}} %DIF PREAMBLE
\providecommand{\DIFaddbeginFL}{} %DIF PREAMBLE
\providecommand{\DIFaddendFL}{} %DIF PREAMBLE
\providecommand{\DIFdelbeginFL}{} %DIF PREAMBLE
\providecommand{\DIFdelendFL}{} %DIF PREAMBLE
%DIF HYPERREF PREAMBLE %DIF PREAMBLE
\providecommand{\DIFadd}[1]{\texorpdfstring{\DIFaddtex{#1}}{#1}} %DIF PREAMBLE
\providecommand{\DIFdel}[1]{\texorpdfstring{\DIFdeltex{#1}}{}} %DIF PREAMBLE
%DIF END PREAMBLE EXTENSION ADDED BY LATEXDIFF

\begin{document}
hello world

Reference \DIFdelbegin \DIFdel{C \mbox{%DIFAUXCMD
\cite{Verstraete:2004d}}%DIFAUXCMD
,
}\DIFdelend \DIFaddbegin \DIFadd{A \mbox{%DIFAUXCMD
\cite{Czarnik:2015}}%DIFAUXCMD
.
Reference B \mbox{%DIFAUXCMD
\cite{Czarnik:2012}}%DIFAUXCMD
.
}\DIFaddend 

\DIFdelbegin %DIFDELCMD < \begin{thebibliography}{1}
%DIFDELCMD < %%%
\DIFdelend \DIFaddbegin \begin{thebibliography}{2}
\DIFaddend \makeatletter
\providecommand \@ifxundefined [1]{
 \@ifx{#1\undefined}
}
\providecommand \@ifnum [1]{
 \ifnum #1\expandafter \@firstoftwo
 \else \expandafter \@secondoftwo
 \fi
}
\providecommand \@ifx [1]{
 \ifx #1\expandafter \@firstoftwo
 \else \expandafter \@secondoftwo
 \fi
}
\providecommand \natexlab [1]{#1}
\providecommand \enquote  [1]{``#1''}
\providecommand \bibnamefont  [1]{#1}
\providecommand \bibfnamefont [1]{#1}
\providecommand \citenamefont [1]{#1}
\providecommand \href@noop [0]{\@secondoftwo}
\providecommand \href [0]{\begingroup \@sanitize@url \@href}
\providecommand \@href[1]{\@@startlink{#1}\@@href}
\providecommand \@@href[1]{\endgroup#1\@@endlink}
\providecommand \@sanitize@url [0]{\catcode `\\12\catcode `\$12\catcode
  `\&12\catcode `\#12\catcode `\^12\catcode `\_12\catcode `\%12\relax}
\providecommand \@@startlink[1]{}
\providecommand \@@endlink[0]{}
\providecommand \url  [0]{\begingroup\@sanitize@url \@url }
\providecommand \@url [1]{\endgroup\@href {#1}{\urlprefix }}
\providecommand \urlprefix  [0]{URL }
\providecommand \Eprint [0]{\href }
\providecommand \doibase [0]{http://dx.doi.org/}
\providecommand \selectlanguage [0]{\@gobble}
\providecommand \bibinfo  [0]{\@secondoftwo}
\providecommand \bibfield  [0]{\@secondoftwo}
\providecommand \translation [1]{[#1]}
\providecommand \BibitemOpen [0]{}
\providecommand \bibitemStop [0]{}
\providecommand \bibitemNoStop [0]{.\EOS\space}
\providecommand \EOS [0]{\spacefactor3000\relax}
\providecommand \BibitemShut  [1]{\csname bibitem#1\endcsname}
\let\auto@bib@innerbib\@empty
\DIFdelbegin %DIFDELCMD < \bibitem [{\citenamefont {Verstraete}\ \emph {et~al.}(2004)\citenamefont
%DIFDELCMD <   {Verstraete}, \citenamefont {Garc\'ia-Ripoll},\ and\ \citenamefont
%DIFDELCMD <   {Cirac}}]{Verstraete:2004d}
%DIFDELCMD <   %%%
\DIFdelend \DIFaddbegin \bibitem [{\citenamefont {Czarnik}\ and\ \citenamefont
  {Dziarmaga}(2015)}]{Czarnik:2015}
  \DIFaddend \BibitemOpen
  \DIFdelbegin %DIFDELCMD < \bibfield  {author} {\bibinfo {author} {\bibfnamefont {F.}~\bibnamefont
%DIFDELCMD <   {Verstraete}}, \bibinfo {author} {\bibfnamefont {J.~J.}\ \bibnamefont
%DIFDELCMD <   {Garc\'ia-Ripoll}}, \ and\ \bibinfo {author} {\bibfnamefont {J.~I.}\
%DIFDELCMD <   \bibnamefont {Cirac}},\ }\href%%%
\DIFdel{@noop }%DIFDELCMD < {} {\bibfield  {journal} {\bibinfo
%DIFDELCMD <   {journal} {Phys. Rev. Lett.}\ }%%%
\textbf {%DIFDELCMD < \bibinfo {volume} {93}%%%
}%DIFAUXCMD
\DIFdel{,\ }%DIFDELCMD < \bibinfo
%DIFDELCMD <   {pages} {207204} %%%
\DIFdel{(}%DIFDELCMD < \bibinfo {year} {2004}%%%
\DIFdel{)}%DIFDELCMD < }%%%
\DIFdelend \DIFaddbegin \bibfield  {author} {\bibinfo {author} {\bibfnamefont {Piotr}\ \bibnamefont
  {Czarnik}}\ and\ \bibinfo {author} {\bibfnamefont {Jacek}\ \bibnamefont
  {Dziarmaga}},\ }\bibfield  {title} {\enquote {\bibinfo {title} {Variational
  approach to projected entangled pair states at finite temperature},}\ }\href
  {\doibase 10.1103/PhysRevB.92.035152} {\bibfield  {journal} {\bibinfo
  {journal} {Phys. Rev. B}\ }\textbf {\bibinfo {volume} {92}},\ \bibinfo
  {pages} {035152} (\bibinfo {year} {2015})}\BibitemShut {NoStop}
\bibitem [{\citenamefont {Czarnik}\ \emph {et~al.}(2012)\citenamefont
  {Czarnik}, \citenamefont {Cincio},\ and\ \citenamefont
  {Dziarmaga}}]{Czarnik:2012}
  \BibitemOpen
  \bibfield  {author} {\bibinfo {author} {\bibfnamefont {Piotr}\ \bibnamefont
  {Czarnik}}, \bibinfo {author} {\bibfnamefont {Lukasz}\ \bibnamefont
  {Cincio}}, \ and\ \bibinfo {author} {\bibfnamefont {Jacek}\ \bibnamefont
  {Dziarmaga}},\ }\bibfield  {title} {\enquote {\bibinfo {title} {Projected
  entangled pair states at finite temperature: Imaginary time evolution with
  ancillas},}\ }\href {\doibase 10.1103/PhysRevB.86.245101} {\bibfield
  {journal} {\bibinfo  {journal} {Phys. Rev. B}\ }\textbf {\bibinfo {volume}
  {86}},\ \bibinfo {pages} {245101} (\bibinfo {year} {2012})}\DIFaddend \BibitemShut
  {NoStop}
\end{thebibliography}

\end{document}

The generated pdf file has only two references. I put the diff-fl.pdf in the repo. The problem seems like \href@noop has been split into \href and @noop. Both \href and \href@noop have been individually defined as commands.

yzcj105 commented 4 years ago

diff-fl.pdf

ftilmann commented 4 years ago

The problem with @ in commands is fixed in the master. I know a new release is overdue.

ftilmann commented 4 years ago

After the commit referenced above, at least the test example worked. Hopefully, it also works for longer documents