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

Added References out of page #188

Open zxdawn opened 4 years ago

zxdawn commented 4 years ago

Here's an example:

\begin{filecontents*}{my_bibtex.bib}
@article{Franklin1999,
        author = {Allen Franklin and Karjalainen Risto},
         title = {Using genetic algorithms to find technical trading rules},
          year = 1999,
        volume = 51,
         pages = {245--271},
  journaltitle = {Journal of Financial Economics}
}
\end{filecontents*}
\documentclass{article}
\usepackage[style=authoryear]{biblatex}

\addbibresource{my_bibtex.bib}

\begin{document}
Important result found by \cite{Franklin1999}.
\printbibliography
\end{document}

If I add the references like this:

Important result found by \cite{Franklin1999,Franklin1999,Franklin1999,Franklin1999,Franklin1999,Franklin1999,Franklin1999,Franklin1999}.

The result would be out of page like this: image

ftilmann commented 4 years ago

This is a known problem and results from incompatibility between ulem package and most citation packages. Only the author of ulem package can really solve this (but I guess it is quite hard to do).

There are two work-arounds, which both have their downsides:

  1. Use option -t CFONT : this is quite a similar mark-up style but you lose the underlining and strikeout, such that colour is the main marker (and different font size is used for deleted text)

  2. Use option --disable-citation-markup prevents the marking up of citations, which means they can wrap nicely (but of course you don't see which citations are new)

One could think about splitting citation commands with multiple arguments. But this would be undesirable in the case of citations in parenthesis, as each citation would then have its own parenthesis. I will leave the issue open but as I don't have a clear solution and it mostly affects appearances I out it to low priority.