| 1 |
%% |
| 2 |
%% This is file `memoize-biblatex.code.tex', |
| 3 |
%% generated with the docstrip utility. |
| 4 |
%% |
| 5 |
%% The original source files were: |
| 6 |
%% |
| 7 |
%% memoize.dtx (with options: `biblatex') |
| 8 |
%% |
| 9 |
%% This file is a part of Memoize, a TeX package for externalization of |
| 10 |
%% graphics and memoization of compilation results in general, available at |
| 11 |
%% https://ctan.org/pkg/memoize and https://github.com/sasozivanovic/memoize. |
| 12 |
%% |
| 13 |
%% Copyright (c) 2020- Saso Zivanovic <[email protected]> |
| 14 |
%% (Sa\v{s}o \v{Z}ivanovi\'{c}) |
| 15 |
%% |
| 16 |
%% This work may be distributed and/or modified under the conditions of the |
| 17 |
%% LaTeX Project Public License, either version 1.3c of this license or (at |
| 18 |
%% your option) any later version. The latest version of this license is in |
| 19 |
%% https://www.latex-project.org/lppl.txt and version 1.3c or later is part of |
| 20 |
%% all distributions of LaTeX version 2008 or later. |
| 21 |
%% |
| 22 |
%% This work has the LPPL maintenance status `maintained'. |
| 23 |
%% The Current Maintainer of this work is Saso Zivanovic. |
| 24 |
%% |
| 25 |
%% The files belonging to this work and covered by LPPL are listed in |
| 26 |
%% (<texmf>/doc/generic/memoize/)FILES. |
| 27 |
\mmzset{% |
| 28 |
auto=\blx@bbl@entry{ |
| 29 |
inner handler=\mmz@biblatex@entry, |
| 30 |
args={% |
| 31 |
m% |
| 32 |
&&{\collargsVerb |
| 33 |
\collargsAppendExpandablePostprocessor{{\the\collargsArg}}% |
| 34 |
}u{\endentry}% |
| 35 |
}, |
| 36 |
raw collector options=\collargsReturnPlain, |
| 37 |
}, |
| 38 |
auto/cite/.style={ |
| 39 |
run conditions=\mmz@biblatex@cite@rc, |
| 40 |
outer handler=\mmz@biblatex@cite@outer, |
| 41 |
args=l*m, |
| 42 |
raw collector options=\mmz@biblatex@def@star\collargsReturnNo, |
| 43 |
inner handler=\mmz@biblatex@cite@inner, |
| 44 |
}, |
| 45 |
auto/volcite/.style={ |
| 46 |
run if memoizing, |
| 47 |
outer handler=\mmz@biblatex@cite@outer, |
| 48 |
args=lml*m, |
| 49 |
raw collector options=\mmz@biblatex@def@star\collargsReturnNo, |
| 50 |
inner handler=\mmz@biblatex@cite@inner, |
| 51 |
}, |
| 52 |
auto/cites/.style={ |
| 53 |
run conditions=\mmz@biblatex@cites@rc, |
| 54 |
outer handler=\mmz@biblatex@cites@outer, |
| 55 |
args=l*m, |
| 56 |
raw collector options= |
| 57 |
\mmz@biblatex@def@star\collargsClearArgsfalse\collargsReturnNo, |
| 58 |
inner handler=\mmz@biblatex@cites@inner, |
| 59 |
}, |
| 60 |
auto/volcites/.style={ |
| 61 |
run if memoizing, |
| 62 |
outer handler=\mmz@biblatex@cites@outer, |
| 63 |
args=lml*m, |
| 64 |
raw collector options= |
| 65 |
\mmz@biblatex@def@star\collargsClearArgsfalse\collargsReturnNo, |
| 66 |
inner handler=\mmz@biblatex@cites@inner, |
| 67 |
}, |
| 68 |
biblatex ccmemo cite/.is choice, |
| 69 |
biblatex ccmemo cite/nocite/.code={% |
| 70 |
\let\mmz@biblatex@do@ccmemo\mmz@biblatex@do@nocite |
| 71 |
}, |
| 72 |
biblatex ccmemo cite/replicate/.code={% |
| 73 |
\let\mmz@biblatex@do@ccmemo\mmz@biblatex@do@replicate |
| 74 |
}, |
| 75 |
}% |
| 76 |
\def\mmz@biblatex@entry#1#2{% |
| 77 |
\edef\mmz@temp{\pdf@mdfivesum{#2}}% |
| 78 |
\global\cslet{mmz@bbl@#1}\mmz@temp |
| 79 |
\mmz@scantokens{\AdviceOriginal{#1}#2}% |
| 80 |
} |
| 81 |
\def\mmz@biblatex@cite@rc{% |
| 82 |
\ifmemoizing |
| 83 |
\ifx\blx@citeargs\blx@volciteargs |
| 84 |
\else |
| 85 |
\AdviceRuntrue |
| 86 |
\fi |
| 87 |
\fi |
| 88 |
} |
| 89 |
\def\mmz@biblatex@cites@rc{% |
| 90 |
\ifmemoizing |
| 91 |
\ifdef\blx@hook@mcite@before{}{\AdviceRuntrue}% |
| 92 |
\fi |
| 93 |
} |
| 94 |
\def\mmz@biblatex@cite@outer{% |
| 95 |
\gdef\mmz@biblatex@keys{}% |
| 96 |
\AdviceCollector |
| 97 |
} |
| 98 |
\def\mmz@biblatex@def@star{% |
| 99 |
\collargsAlias{*}{&&{\mmz@biblatex@mark@citation@key}}% |
| 100 |
} |
| 101 |
\def\mmz@biblatex@mark@citation@key{% |
| 102 |
\collargsAppendPreprocessor{\xappto\mmz@biblatex@keys{,\the\collargsArg}}% |
| 103 |
} |
| 104 |
\def\mmz@biblatex@cite@inner{% |
| 105 |
\mmz@biblatex@do@context |
| 106 |
\mmz@biblatex@do@ccmemo |
| 107 |
\expandafter\AdviceOriginal\the\collargsArgs |
| 108 |
} |
| 109 |
\def\mmz@biblatex@do@context{% |
| 110 |
\expandafter\forcsvlist |
| 111 |
\expandafter\mmz@biblatex@do@context@one |
| 112 |
\expandafter{\mmz@biblatex@keys}% |
| 113 |
} |
| 114 |
\def\mmz@biblatex@do@context@one#1{% |
| 115 |
\mmz@Cos |
| 116 |
\mmz@mtoc@csname{mmz@bbl@#1}% |
| 117 |
\ifcsdef{mmz@bbl@#1}{}{\mmzAbort}% |
| 118 |
} |
| 119 |
\def\mmz@biblatex@do@nocite{% |
| 120 |
\xtoksapp\mmzCCMemo{% |
| 121 |
\noexpand\nocite{\mmz@biblatex@keys}% |
| 122 |
}% |
| 123 |
} |
| 124 |
\def\mmz@biblatex@do@replicate{% |
| 125 |
\xtoksapp\mmzCCMemo{% |
| 126 |
{% |
| 127 |
\nullfont |
| 128 |
\expandonce\AdviceName\the\collargsArgs |
| 129 |
}% |
| 130 |
}% |
| 131 |
} |
| 132 |
\let\mmz@biblatex@do@ccmemo\mmz@biblatex@do@nocite |
| 133 |
\def\mmz@biblatex@cites@outer{% |
| 134 |
\global\collargsArgs{}% |
| 135 |
\gdef\mmz@biblatex@keys{}% |
| 136 |
\AdviceCollector |
| 137 |
} |
| 138 |
\def\mmz@biblatex@cites@inner{% |
| 139 |
\futurelet\mmz@temp\mmz@biblatex@cites@inner@again |
| 140 |
} |
| 141 |
\def\mmz@biblatex@cites@inner@again{% |
| 142 |
\mmz@tempfalse |
| 143 |
\ifx\mmz@temp\bgroup |
| 144 |
\mmz@temptrue |
| 145 |
\else |
| 146 |
\ifx\mmz@temp[%] |
| 147 |
\mmz@temptrue |
| 148 |
\fi |
| 149 |
\fi |
| 150 |
\ifmmz@temp |
| 151 |
\expandafter\AdviceCollector |
| 152 |
\else |
| 153 |
\expandafter\mmz@biblatex@cites@inner@finish |
| 154 |
\fi |
| 155 |
} |
| 156 |
\def\mmz@biblatex@cites@inner@finish{% |
| 157 |
\mmz@biblatex@do@context |
| 158 |
\mmz@biblatex@do@ccmemo |
| 159 |
\expandafter\AdviceOriginal\the\collargsArgs |
| 160 |
} |
| 161 |
\mmzset{ |
| 162 |
auto=\cite{cite}, |
| 163 |
auto=\Cite{cite}, |
| 164 |
auto=\parencite{cite}, |
| 165 |
auto=\Parencite{cite}, |
| 166 |
auto=\footcite{cite}, |
| 167 |
auto=\footcitetext{cite}, |
| 168 |
auto=\textcite{cite}, |
| 169 |
auto=\Textcite{cite}, |
| 170 |
auto=\smartcite{cite}, |
| 171 |
auto=\Smartcite{cite}, |
| 172 |
auto=\supercite{cite}, |
| 173 |
auto=\cites{cites}, |
| 174 |
auto=\Cites{cites}, |
| 175 |
auto=\parencites{cites}, |
| 176 |
auto=\Parencites{cites}, |
| 177 |
auto=\footcites{cites}, |
| 178 |
auto=\footcitetexts{cites}, |
| 179 |
auto=\smartcites{cites}, |
| 180 |
auto=\Smartcites{cites}, |
| 181 |
auto=\textcites{cites}, |
| 182 |
auto=\Textcites{cites}, |
| 183 |
auto=\supercites{cites}, |
| 184 |
auto=\autocite{cite}, |
| 185 |
auto=\Autocite{cite}, |
| 186 |
auto=\autocites{cites}, |
| 187 |
auto=\Autocites{cites}, |
| 188 |
auto=\citeauthor{cite}, |
| 189 |
auto=\Citeauthor{cite}, |
| 190 |
auto=\citetitle{cite}, |
| 191 |
auto=\citeyear{cite}, |
| 192 |
auto=\citedate{cite}, |
| 193 |
auto=\citeurl{cite}, |
| 194 |
auto=\nocite{cite}, |
| 195 |
auto=\fullcite{cite}, |
| 196 |
auto=\footfullcite{cite}, |
| 197 |
auto=\volcite{volcite}, |
| 198 |
auto=\Volcite{volcite}, |
| 199 |
auto=\volcites{volcites}, |
| 200 |
auto=\Volcites{volcites}, |
| 201 |
auto=\pvolcite{volcite}, |
| 202 |
auto=\Pvolcite{volcite}, |
| 203 |
auto=\pvolcites{volcites}, |
| 204 |
auto=\Pvolcites{volcites}, |
| 205 |
auto=\fvolcite{volcite}, |
| 206 |
auto=\Fvolcite{volcite}, |
| 207 |
auto=\fvolcites{volcites}, |
| 208 |
auto=\Fvolcites{volcites}, |
| 209 |
auto=\ftvolcite{volcite}, |
| 210 |
auto=\ftvolcites{volcites}, |
| 211 |
auto=\Ftvolcite{volcite}, |
| 212 |
auto=\Ftvolcites{volcites}, |
| 213 |
auto=\svolcite{volcite}, |
| 214 |
auto=\Svolcite{volcite}, |
| 215 |
auto=\svolcites{volcites}, |
| 216 |
auto=\Svolcites{volcites}, |
| 217 |
auto=\tvolcite{volcite}, |
| 218 |
auto=\Tvolcite{volcite}, |
| 219 |
auto=\tvolcites{volcites}, |
| 220 |
auto=\Tvolcites{volcites}, |
| 221 |
auto=\avolcite{volcite}, |
| 222 |
auto=\Avolcite{volcite}, |
| 223 |
auto=\avolcites{volcites}, |
| 224 |
auto=\Avolcites{volcites}, |
| 225 |
auto=\notecite{cite}, |
| 226 |
auto=\Notecite{cite}, |
| 227 |
auto=\pnotecite{cite}, |
| 228 |
auto=\Pnotecite{cite}, |
| 229 |
auto=\fnotecite{cite}, |
| 230 |
auto=\citename{cite, args=l*mlm}, |
| 231 |
auto=\citelist{cite, args=l*mlm}, |
| 232 |
auto=\citefield{cite, args=l*mlm}, |
| 233 |
} |
| 234 |
\endinput |
| 235 |
%% |
| 236 |
%% End of file `memoize-biblatex.code.tex'. |