From 0e9519fa29b1c9c5abe2fe50bd53e253b65684fe Mon Sep 17 00:00:00 2001 From: Robert Alessi Date: Thu, 14 Mar 2019 15:19:53 +0100 Subject: not-a-bugfix: biblatex citation commands cannot be found inside \if ... \fi, otherwise autopunct becomes inoperative --- samples/icite-biblatex.tex | 33 +++++++++++++++++++++++---------- samples/icite-nobiblatex.tex | 34 ++++++++++++++++++++++++---------- 2 files changed, 47 insertions(+), 20 deletions(-) (limited to 'samples') diff --git a/samples/icite-biblatex.tex b/samples/icite-biblatex.tex index e52cb8b..678f9f4 100644 --- a/samples/icite-biblatex.tex +++ b/samples/icite-biblatex.tex @@ -1,3 +1,8 @@ +\RequirePackage{filecontents} +\begin{filecontents*}{\jobname.xdy} +(merge-rule "\*" "" :eregexp) +(markup-locclass-list :open ": " :sep ", ") +\end{filecontents*} % Compile with --shell-escape \documentclass{article} \usepackage[english]{babel} @@ -20,7 +25,11 @@ \IndexSubtypeAs{ancient}{pr-sources} \bibinput{bibsample} -\usepackage[xindy]{imakeidx} +\usepackage{classics} +\newclassic{plat}{#1|#1|#1} +\newclassic{arist}{#1|\textit{#1}|#1} + +\usepackage[xindy,nonewpage]{imakeidx} \makeindex[name=pr-sources, title={Index locorum citatorum}] \usepackage[style=oxnotes]{biblatex} @@ -43,6 +52,10 @@ The relevant part of the preamble which is used here follows: \IndexSubtypeAs{ancient}{pr-sources} \bibinput{bibsample} +\usepackage{classics} +\newclassic{plat}{#1|#1|#1} +\newclassic{arist}{#1|\textit{#1}|#1} + \usepackage[xindy]{imakeidx} \makeindex[name=pr-sources, title={Index locorum citatorum}] @@ -65,19 +78,19 @@ The relevant part of the preamble which is used here follows: \section*{Body text} Plato, \emph{Laches}: first -citation\icite[179a1--4]{Plato:Laches}. And -another\icite[179c5--180a1]{Plato:Laches}, and -another\icite[181b5--181c3]{Plato:Laches}. +citation\icite[\plat{179}[a][1--4]]{Plato:Laches}. And +another\icite[\plat*{179}[c][5]{180}[a][1]]{Plato:Laches}, and +another\icite[\plat*{181}[b][5]{181}[c][3]]{Plato:Laches}. Plato, \emph{Theaetetus}: first -citation\icite[142c2--142d3]{Plato:Theaetetus}. And -another\icite[142d4--5]{Plato:Theaetetus}, and -another\icite[143b5]{Plato:Theaetetus}. +citation\icite[\plat*{142}[c][2]{142}[d][3]]{Plato:Theaetetus}. And +another\icite[\plat{142}[d][4--5]]{Plato:Theaetetus}, and +another\icite[\plat{143}[b][5]]{Plato:Theaetetus}. Aristotle, \emph{Politica}: first -citation\icite[1252a25--1252.b27]{Aristotle:Politica}. And -another\icite[1253a5]{Aristotle:Politica}, and -another\icite[1253a30--39]{Aristotle:Politica}. +citation\icite[\arist*{1252}[a][25]{1252}[b][27]]{Aristotle:Politica}. And +another\icite[\arist{1253}[a][5]]{Aristotle:Politica}, and +another\icite[\arist{1253}[a][30--39]]{Aristotle:Politica}. This passage should not be indexed\icite[44--78]{Reynolds.Wilson1994}. diff --git a/samples/icite-nobiblatex.tex b/samples/icite-nobiblatex.tex index 6893247..baf2973 100644 --- a/samples/icite-nobiblatex.tex +++ b/samples/icite-nobiblatex.tex @@ -1,3 +1,8 @@ +\RequirePackage{filecontents} +\begin{filecontents*}{\jobname.xdy} +(merge-rule "\*" "" :eregexp) +(markup-locclass-list :open ": " :sep ", ") +\end{filecontents*} % Compile with --shell-escape \documentclass{article} \usepackage[english]{babel} @@ -21,7 +26,11 @@ \IndexSubtypeAs{ancient}{pr-sources} \bibinput{bibsample} -\usepackage[xindy]{imakeidx} +\usepackage{classics} +\newclassic{plat}{#1|#1|#1} +\newclassic{arist}{#1|\textit{#1}|#1} + +\usepackage[xindy,nonewpage]{imakeidx} \makeindex[name=pr-sources, title={Index locorum citatorum}] \begin{document} @@ -42,6 +51,10 @@ The relevant part of the preamble which is used here follows: \IndexSubtypeAs{ancient}{pr-sources} \bibinput{bibsample} +\usepackage{classics} +\newclassic{plat}{#1|#1|#1} +\newclassic{arist}{#1|\textit{#1}|#1} + \usepackage[xindy]{imakeidx} \makeindex[name=pr-sources, title={Index locorum citatorum}] \end{Verbatim} @@ -61,19 +74,20 @@ The relevant part of the preamble which is used here follows: \section*{Body text} Plato, \emph{Laches}: first -citation.\footnote{\icite[179a1--4]{Plato:Laches}.} And -another,\footnote{\icite[179c5--180a1]{Plato:Laches}.} -and another.\footnote{\icite[181b5--c3]{Plato:Laches}.} +citation.\footnote{\icite[\plat{179}[a][1--4]]{Plato:Laches}.} And +another,\footnote{\icite[\plat*{179}[c][5]{180}[a][1]]{Plato:Laches}.} +and another.\footnote{\icite[\plat*{181}[b][5]{181}[c][3]]{Plato:Laches}.} Plato, \emph{Theaetetus}: first -citation.\footnote{\icite[142c2--d3]{Plato:Theaetetus}.} -And another,\footnote{\icite[142d4--5]{Plato:Theaetetus}.} -and another.\footnote{\icite[143b5]{Plato:Theaetetus}.} +citation.\footnote{\icite[\plat*{142}[c][2]{142}[d][3]]{Plato:Theaetetus}.} +And another,\footnote{\icite[\plat{142}[d][4--5]]{Plato:Theaetetus}.} +and another.\footnote{\icite[\plat{143}[b][5]]{Plato:Theaetetus}.} Aristotle, \emph{Politica}: first citation.\footnote{% - \icite[1252a25--b27]{Aristotle:Politica}.} And -another,\footnote{\icite[1253a5]{Aristotle:Politica}.} and -another.\footnote{\icite[1253a30--39]{Aristotle:Politica}.} + \icite[\arist*{1252}[a][25]{1252}[b][27]]{Aristotle:Politica}.} And +another,\footnote{\icite[\arist{1253}[a][5]]{Aristotle:Politica}.} +and another.\footnote{% + \icite[\arist{1253}[a][30--39]]{Aristotle:Politica}.} This passage should not be indexed.\footnote{\icite[44--78]{Reynolds.Wilson1994}.} -- cgit v1.2.3