diff --git a/pkgs/misc/tex/nix/run-latex.sh b/pkgs/misc/tex/nix/run-latex.sh index f7d642f6ea0..13948400489 100644 --- a/pkgs/misc/tex/nix/run-latex.sh +++ b/pkgs/misc/tex/nix/run-latex.sh @@ -37,7 +37,10 @@ showError() { runLaTeX() { if ! $latex $latexFlags $rootName >$tmpFile 2>&1; then showError; fi runNeeded= - if grep -q "LaTeX Warning: Label(s) may have changed." "$tmpFile"; then + if fgrep -q \ + -e "LaTeX Warning: Label(s) may have changed." \ + -e "Rerun to get citations correct." \ + "$tmpFile"; then runNeeded=1 fi }