Skip to content

Commit

Permalink
Fix problem with biblatex textcite command
Browse files Browse the repository at this point in the history
  • Loading branch information
ftilmann committed Jul 27, 2020
1 parent 75fb55d commit 30cbeb3
Show file tree
Hide file tree
Showing 4 changed files with 64 additions and 1 deletion.
2 changes: 2 additions & 0 deletions latexdiff
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
### - change meaning of --packages option such that this packages are used in addition of automatically detected packages (possibly introduce option --only-packages that overrides automatic choices completely
# Version 1.3.2
# - extend CUSTOMDIFCMD related postprocessing to deal properly with multiline commands, or a sequence of several commands in the same line (see github issue #204)
# - fix a bug in biblatex mode, which prevented proper processing of modified \textcite (see: https://tex.stackexchange.com/questions/555157/latexdiff-and-biblatex-citation-commands)
#
# Version 1.3.1.1
# - remove spurious \n to fix error: Unknown regexp modifier "/n" at .../latexdiff line 1974, near "=~ " (see github issue #201)
Expand Down Expand Up @@ -1263,6 +1264,7 @@ if ( defined $packages{"apacite"} ) {
} elsif (defined $packages{"biblatex"}) {
print STDERR "biblatex package detected.\n" if $verbose ;
$citpat='(?:[cC]ites?|(?:[pP]aren|foot|[Tt]ext|[sS]mart|super)cites?\*?|footnotecitetex)';
push(@TEXTCMDEXCL, qr/^textcite$/);
} else {
# citation command pattern for all other citation schemes
### $citpatsafe=qr/^cite.*$/;
Expand Down
30 changes: 30 additions & 0 deletions testsuite/biblatex-new.tex
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
\documentclass[a4paper]{article}
\usepackage[utf8]{inputenc}
\usepackage{filecontents}
\begin{filecontents}{bibliography.bib}
@article{greenwade93,
author = "George D. Greenwade",
title = "The {C}omprehensive {T}ex {A}rchive {N}etwork ({CTAN})",
year = "1993",
journal = "TUGBoat",
volume = "14",
number = "3",
pages = "342--351"
}
@book{goossens93,
author = "Michel Goossens and Frank Mittelbach and Alexander Samarin",
title = "The LaTeX Companion",
year = "1993",
publisher = "Addison-Wesley",
address = "Reading, Massachusetts"
}
\end{filecontents}
\usepackage[style=apa,backend=biber]{biblatex}
\addbibresource{bibliography.bib}
\begin{document}

\textcite{goossens93} is the best book on \LaTeX \parencite{greenwade93}.

\printbibliography

\end{document}
31 changes: 31 additions & 0 deletions testsuite/biblatex-old.tex
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
\documentclass[a4paper]{article}
\usepackage[utf8]{inputenc}
\usepackage{filecontents}
\begin{filecontents}{bibliography.bib}
@article{greenwade93,
author = "George D. Greenwade",
title = "The {C}omprehensive {T}ex {A}rchive {N}etwork ({CTAN})",
year = "1993",
journal = "TUGBoat",
volume = "14",
number = "3",
pages = "342--351"
}
@book{goossens93,
author = "Michel Goossens and Frank Mittelbach and Alexander Samarin",
title = "The LaTeX Companion",
year = "1993",
publisher = "Addison-Wesley",
address = "Reading, Massachusetts"
}
\end{filecontents}
\usepackage[style=apa,backend=biber]{biblatex}
\addbibresource{bibliography.bib}
\begin{document}

\textcite{greenwade93} is the best article on \LaTeX \parencite{goossens93}.

\printbibliography

\end{document}

2 changes: 1 addition & 1 deletion testsuite/verify
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ delequ latin9 pollack move-equation nomarkup subscript doubledollar intertext \
DIFDELCMDBUG eqnarray eqnarray2 subscriptm delequ2 schneider gennady umesh underwood endfloat endfloat2 outerrise \
delequ3 delequ4 "simplefrac --allow-spaces" "master --flatten" "subfile --flatten" titlediffTest2 exampleDiff bornd2 \
"rolla --math-markup=2" mini "complex-maths --math-markup=1" margalit circonflex mwe-comment "apacite-test --flatten" quoteddollarunderscore units complicated-math move-equation2 lists "figures --graphics-markup=both" alignat "safecmd --append-safecmd=remark" verbatim verbatim2-is143 embedded-math-array "verbatim-input --flatten" anchordemo 'customdiffcmdtest --add-to-config "CUSTOMDIFCMD=blindtext;mypar;donothing;cmd"' description frac_w_space_comments \
"href-in-bibliography --append-safecmd=path" revtex-bibliography \
"href-in-bibliography --append-safecmd=path" revtex-bibliography biblatex \
)

#set testroots= ( test subscript )
Expand Down

0 comments on commit 30cbeb3

Please sign in to comment.