Debian Codegraph @

texmf-dist/source/latex/icite/icite.dtx

raw
1 % \iffalse meta-comment
2 % icite -- Indices locorum citatorum
3 % Copyright (C) 2019--2020 Robert Alesssi
4 %
5 % Please send error reports and suggestions for improvements to Robert
6 % Alessi <[email protected]>
7 %
8 % This program is free software: you can redistribute it and/or modify
9 % it under the terms of the GNU General Public License as published by
10 % the Free Software Foundation, either version 3 of the License, or
11 % (at your option) any later version.
12 %
13 % This program is distributed in the hope that it will be useful, but
14 % WITHOUT ANY WARRANTY; without even the implied warranty of
15 % MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 % General Public License for more details.
17 %
18 % You should have received a copy of the GNU General Public License
19 % along with this program. If not, see
20 % <http://www.gnu.org/licenses/>.
21 % \fi
22 %
23 % \iffalse
24 %<*driver>
25 \ProvidesFile{icite.dtx}
26 %</driver>
27 %<package>\NeedsTeXFormat{LaTeX2e}[1999/12/01]
28 %<package>\ProvidesPackage{icite}
29 %<*package>
30 [2020/03/05 v1.3a Make Indices locorum citatorum]
31 %</package>
32 %<*driver>
33 \documentclass{ltxdoc}
34 \usepackage{filecontents}
35 \begin{filecontents*}{\jobname.xdy}
36 (merge-rule "\*" "" :eregexp)
37 (markup-locclass-list :open "\tabto{3.5cm}" :sep ", ")
38 \end{filecontents*}
39 \begin{filecontents*}{\jobname.bib}
40 @Book{Aristotle:Politica,
41 title = {Politica},
42 date = 1964,
43 author = {Aristotle},
44 editor = {Ross, W. D.},
45 origdate = 1957,
46 entrysubtype = {classical},
47 publisher = {Clarendon Press},
48 location = {Oxford}
49 }
50
51 @Book{Bürgel2016,
52 shorttitle = {Ärztliches Leben\ldots},
53 editortype = {reviser},
54 editor = {Käs, Fabian},
55 number = 135,
56 series = {Islamic History and Civilization},
57 location = {Leiden},
58 publisher = {Brill},
59 date = 2016,
60 title = {Ärztliches Leben und Denken im arabischen
61 Mittelalter},
62 author = {Bürgel, Johann Christoph}
63 }
64
65 @Software{classics,
66 title = {The Classics package},
67 subtitle = {Cite classic works},
68 author = {Lourenço de Lima, Eduardo C.},
69 publisher = {CTAN},
70 url = {http://www.ctan.org/pkg/classics},
71 date = {2013-02-02},
72 version = {0.1}
73 }
74
75 @Article{Dols1987,
76 author = {Dols, Michael W.},
77 title = {The Origins of the Islamic Hospital: Myth and
78 Reality},
79 shorttitle = {The Origins of the Islamic Hospital},
80 journaltitle = {Bulletin of the History of Medicine},
81 date = 1987,
82 volume = 61,
83 pages = {367--390}
84 }
85
86 @InBook{Endress1992,
87 title = {Die Wissenschaftliche Literatur},
88 date = 1992,
89 author = {Endress, Gerhard},
90 booktitle = {Grundriß der arabischen Philologie},
91 editor = {Fisher, Wolfdietrich},
92 volume = 3,
93 note = {Supplement},
94 publisher = {Reichert},
95 location = {Wiesbaden},
96 pages = {3--152}
97 }
98
99 @Book{IAUMuller,
100 sortname = {{ibn abi usaybia}},
101 editor = {Müller, August},
102 author = {\prname{ibn 'abI 'u.saybi`aT}},
103 shorteditor = {Müller},
104 date = {1882/1884},
105 title = {\arb[trans]{\uc{`u}yUn al-'anbA' fI .tabaqAt
106 al-'a.tibbA'}},
107 shorttitle = {\arb[trans]{\uc{`u}yUn al-'anbA'}},
108 shorthand = {\prname{ibn 'abI 'u.saybi`aT},
109 \arb[trans]{\uc{`u}yUn al-'anbA'}},
110 entrysubtype = {classical},
111 location = {Königsberg and Cairo},
112 volumes = 2
113 }
114
115 @Software{imakeidx,
116 title = {The Imakeidx package},
117 subtitle = {A package for producing multiple indexes},
118 author = {Gregorio, Enrico and Beccari, Claudio},
119 publisher = {CTAN},
120 url = {http://www.ctan.org/pkg/imakeidx},
121 date = {2016-10-15},
122 version = {1.3e}
123 }
124
125 @Book{RaziShukuk,
126 author = {\prname{al-rAziyy}, \prname{mu.hammad ibn
127 zakariyyA'}},
128 title = {\arb[trans]{\uc{k}itAb al-^sukUk `al_A
129 \uc{^g}AlInUs}},
130 indextitle = {\arb[trans]{\uc{^s}ukUk}},
131 sortname = {razi},
132 date = 1993,
133 shorthand = {\prname{al-rAziyy}, \arb[trans]{\uc{^s}ukUk}},
134 editor = {Mehdi Mohaghegh},
135 publisher = {International Institute of Islamic Thought and
136 Civilization},
137 location = {Tehran},
138 entrysubtype = {classical}
139 }
140
141 @Book{Ullmann1970,
142 location = {Leiden},
143 publisher = {Brill},
144 title = {Die Medizin im Islam},
145 date = 1970,
146 author = {Ullmann, Manfred},
147 }
148
149 @MVBook{al-Nadim,
150 author = {\prname{ibn al-nadIm}},
151 title = {\arb[trans]{\uc{f}ihrist}},
152 sortname = {{ibn al-nadim}},
153 date = {1871/1872},
154 shorthand = {\arb[trans]{\uc{f}ihrist}},
155 editor = {Flügel, Gustav},
156 volumes = 2,
157 location = {Leipzig},
158 entrysubtype = {classical}
159 }
160
161 @Book{al-Qifti,
162 sortname = {{ibn al-qifti}},
163 entrysubtype = {classical},
164 shorthand = {\prname{al-qif.tiyy}, \arb[trans]{\uc{t}a'rI_h}},
165 location = {Leipzig},
166 editor = {Lippert, Julius},
167 date = 1903,
168 title = {\arb[trans]{\uc{t}a'rI_h al-.hukamA'}},
169 author = {\prname{ibn al-qif.tiyy}}
170 }
171
172 @Software{usebib,
173 title = {The Usebib package},
174 subtitle = {A simple bibliography processor},
175 author = {Gregorio, Enrico},
176 publisher = {CTAN},
177 url = {http://www.ctan.org/pkg/usebib},
178 date = {2012-04-13},
179 version = {1.0a}
180 }
181 \end{filecontents*}
182 \usepackage{fontspec}
183 \usepackage[english]{babel}
184 \usepackage[letterpaper,margin=25mm,left=50mm,nohead]{geometry}
185 \babelfont{rm}{Old Standard}
186 \babelfont{sf}{NewComputerModern Sans}
187 \babelfont{tt}{NewComputerModern Mono}
188 \usepackage{arabluatex}
189 \SetTranslitConvention{loc}
190 \usepackage{xurl}
191 \usepackage{uri}
192 \usepackage{hyperxmp}
193 \usepackage{varioref}
194 \usepackage{latexcolors}
195 \usepackage[numbered]{hypdoc}
196 \hypersetup{unicode=true, colorlinks, allcolors=cinnamon,
197 linktocpage=true, pdfauthor={Robert Alessi}, pdftitle={The
198 icite package}, pdfcontactemail={[email protected]},
199 pdfcontacturl={http://www.robertalessi.net/icite},
200 pdfcopyright={Copyright (C) 2019--2020 Robert Alessi
201 <[email protected]>. This document is licensed under the
202 Creative Commons Attribution-ShareAlike 4.0 International
203 License. To view a copy of this license, visit
204 http://creativecommons.org/licenses/by-sa/4.0/ or send a letter to
205 Creative Commons, PO Box 1866, Mountain View, CA 94042, USA.},
206 pdflicenseurl={https://creativecommons.org/licenses/by-sa/4.0/legalcode},
207 pdfmetalang={en-US}, pdftype={Text}, pdfkeywords={bibtex, biblatex,
208 indexing}}
209 \usepackage{amsmath}
210 \usepackage{cleveref}
211 \CodelineIndex
212 \usepackage[citecmd=autocite,defaultindex]{\jobname}
213 \IndexSubtypeAs{classical}{primary}
214 \bibinput{icite}
215 \usepackage[nonewpage,xindy]{imakeidx}
216 \newcommand{\donothing}[1]{}
217 \indexsetup{level=\donothing}
218 \makeindex
219 \makeindex[name=loccit]
220 \makeindex[name=primary]
221 \usepackage{needspace}
222 \usepackage{tabto}
223 \usepackage{classics}
224 \newclassic{iau}{\classicsRoman{#1}|, #1|.#1}
225 \newclassic{razi}{#1|.#1}
226 \newclassic{nadim}{\classicsRoman{#1}|.#1|, #1}
227 \newclassic{aristotle}{#1|\textit{#1}|#1}
228 \usepackage[scale=1.5]{ccicons}
229 \usepackage{dox}
230 \doxitem{Option}{option}{options}
231 \usepackage{enumitem}
232 \setlist{nosep}
233 \setlist[itemize]{label=\textendash}
234 \setlist[enumerate,1]{label=(\alph*)}
235 \setlist[enumerate,2]{label=\roman*.}
236 \usepackage[lot]{multitoc}
237 \usepackage{nameref}
238 \usepackage{csquotes}
239 \usepackage[style=oxnotes, hyperref=false]{biblatex}
240 \DeclareFieldFormat{postnote}{\mkpageprefix[pagination][\mknormrange]{#1}}
241 \addbibresource{icite.bib}
242 \usepackage{hologo,metalogox}
243 \usepackage{relsize}
244 \usepackage{units}
245 \usepackage{minted}
246 \usepackage[contents]{colordoc}
247 \newcommand{\package}[1]{\textsf{#1}\index{#1=#1 (package)}}
248 \usepackage{tikz}
249 \usepackage[breakable, skins, xparse, minted]{tcolorbox}
250 \tcbset{colback=white, boxrule=.15mm, colframe=cinnamon,
251 breakable}
252 \newtcblisting{example}{minted options={linenos, numbersep=0mm}}
253 \newtcblisting{code}{minted options={linenos, numbersep=0mm}, listing
254 only}
255 \usepackage{etoc}
256 \etocsettocdepth{paragraph}
257 \newcommand{\icitetableofcontents}{%
258 \begingroup
259 \etocsetstyle{section}{}{}
260 {\etocsavedsectiontocline{%
261 \numberline{\etocnumber}\etocname}{\etocpage}}{}
262 \etocsetstyle{subsection}{}{}
263 {\etocsavedsubsectiontocline{%
264 \numberline{\etocnumber}\etocname}{\etocpage}}{}%
265 \etocsetstyle{subsubsection}{}{}
266 {\etocsavedsubsubsectiontocline{%
267 \numberline{\etocnumber}\etocname}{\etocpage}}{}%
268 \etocsetstyle{paragraph}{}{\leftskip2cm\rightskip 2.2em \parfillskip
269 0pt plus 1fil\relax \nobreak}
270 {\noindent\etocname{} \etocpage{} }{\par}%
271 \etocmulticolstyle[2]{\section*{Contents}}
272 \pdfbookmark[1]{Contents}{toc}
273 \tableofcontents
274 \endgroup}
275 \EnableCrossrefs
276 %\CodelineIndex
277 \RecordChanges
278 %\OnlyDescription
279 \begin{document}
280 \DocInput{\jobname.dtx}
281 \PrintChanges
282 \section{Index}
283 \indexprologue{Numbers written in italic refer to the page where the
284 corresponding entry is described; numbers underlined refer to the
285 code line of the definition; numbers in roman refer to the code
286 lines where the entry is used.}
287 \printindex
288 %\PrintIndex
289 \end{document}
290 %</driver>
291 % \fi
292 %
293 % \CheckSum{360}
294 %
295 % \CharacterTable
296 % {Upper-case \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z
297 % Lower-case \a\b\c\d\e\f\g\h\i\j\k\l\m\n\o\p\q\r\s\t\u\v\w\x\y\z
298 % Digits \0\1\2\3\4\5\6\7\8\9
299 % Exclamation \! Double quote \" Hash (number) \#
300 % Dollar \$ Percent \% Ampersand \&
301 % Acute accent \' Left paren \( Right paren \)
302 % Asterisk \* Plus \+ Comma \,
303 % Minus \- Point \. Solidus \/
304 % Colon \: Semicolon \; Less than \<
305 % Equals \= Greater than \> Question mark \?
306 % Commercial at \@ Left bracket \[ Backslash \\
307 % Right bracket \] Circumflex \^ Underscore \_
308 % Grave accent \` Left brace \{ Vertical bar \|
309 % Right brace \} Tilde \~}
310 %
311 % \makeatletter
312 % \let\org@changes@\changes@
313 % \def\my@changes v#1.#2.#3\@nil{%
314 % \org@changes@{v#1.\six@digits{#2}.#3=v#1.#2.#3}%
315 % }%
316 % \newcommand*{\six@digits}[1]{%
317 % \ifnum#1<100000 0\fi
318 % \ifnum#1<10000 0\fi
319 % \ifnum#1<1000 0\fi
320 % \ifnum#1<100 0\fi
321 % \two@digits{#1}%
322 % }%
323 % \renewcommand*{\changes@}[1]{%
324 % \my@changes#1.\@nil
325 % }%
326 % \makeatother
327 %
328 % \GetFileInfo{\jobname.dtx}
329 % \DoNotIndex{\newcommand,\newenvironment}
330 %
331 % \newcommand*{\NEWfeature}[1]{%
332 % \hskip 1sp \marginpar{\small\sffamily\raggedright
333 % New feature\\#1}}
334 %
335 % \title{\tcbox[colframe=black, enhanced, tikznode, drop lifted
336 % shadow, colback=white, boxrule=.25mm]{%
337 % The \textsf{icite} package\\
338 % \emph{Indices locorum citatorum}\\
339 % \fileversion\ --- \filedate}}
340 %
341 % \author{Robert Alessi \\
342 % \href{mailto:[email protected]?Subject=icite package}%
343 % {\texttt{[email protected]}}}
344 %
345 % \date{}
346 %
347 % \maketitle
348 % \footnotesize
349 % \icitetableofcontents
350 % \normalsize
351 %
352 % \changes{v1.00}{2019/03/07}{First public release}
353 %
354 % \begin{abstract}
355 % \package{icite} is designed to produce from \hologo{BibTeX} or
356 % Bib\LaTeX\ bibliographical databases the different indices of
357 % authors and works cited which are called \emph{indices locorum
358 % citatorum}. It relies on a specific \cs{icite} command and can
359 % operate with either \hologo{BibTeX} or Bib\LaTeX.
360 % \end{abstract}
361 %
362 % \section*{License and disclamer}
363 % \addcontentsline{toc}{section}{License and disclamer}
364 % \subsection*{License applicable to the software}
365 % \label{sec:license-software}
366 %
367 % \package{icite} --- \emph{Indices locorum citatorum}\\
368 % Copyright \textcopyright\ 2019--2020 Robert Alessi
369 %
370 % Please send error reports and suggestions for improvements to Robert
371 % Alessi:
372 % \begin{itemize}
373 % \item email: \mailto[icite package]{[email protected]}
374 % \item website: \url{http://www.robertalessi.net/icite}
375 % \item development: \url{http://git.robertalessi.net/icite}
376 % \item comments, feature requests, bug reports:
377 % \url{https://gitlab.com/ralessi/icite/issues}
378 % \end{itemize}
379 %
380 % \marginpar{\texttt{gpl3+}}
381 % This program is free software: you can redistribute it and/or modify
382 % it under the terms of the GNU General Public License as published by
383 % the Free Software Foundation, either version 3 of the License, or
384 % (at your option) any later version.
385 %
386 % This program is distributed in the hope that it will be useful, but
387 % WITHOUT ANY WARRANTY; without even the implied warranty of
388 % MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
389 % General Public License for more details.
390 %
391 % You should have received a copy of the GNU General Public License
392 % along with this program. If not, see
393 % <http://www.gnu.org/licenses/>.
394 %
395 % This release of \package{icite} consists of the following
396 % source files:
397 % \begin{itemize}
398 % \item |icite.dtx|
399 % \item |icite.ins|
400 % \item |Makefile|
401 % \end{itemize}
402 %
403 % \subsection*{License applicable to this document}
404 % \label{sec:documentation-license}
405 % Copyright \textcopyright\ 2019--2020 Robert Alessi
406 %
407 % \ccbysa\marginpar{\texttt{CC BY-SA 4.0}}
408 % This document is licensed under the Creative Commons
409 % Attribution-ShareAlike 4.0 International License. To view a copy of
410 % this license, visit
411 % \url{http://creativecommons.org/licenses/by-sa/4.0/} or send a
412 % letter to Creative Commons, PO Box 1866, Mountain View, CA 94042,
413 % USA.
414 %
415 % \section{Introduction}
416 % \label{sec:introduction}
417 % Bib\LaTeX\ features a very powerful internal mechanism which
418 % supports indexing of citations and bibliographic entries and can be
419 % activated by a simple |indexing| option in the preamble. However, by
420 % default, only the authors and the works cited are inserted in the
421 % index. Furthermore, authors and works are indexed separately and
422 % only inserted in the global index that is generated by
423 % \cs{makeindex}. Another limitation is that the references are also
424 % excluded from the index.
425 %
426 % Notwithstanding these limitations, it is quite possible to typeset
427 % \emph{indices locorum citatorum} with Bib\LaTeX, but this remains an
428 % intricate business and requires knowing how to redefine and/or patch
429 % standard and internal Bib\LaTeX\ commands.
430 %
431 % The \package{icite} package is but a modest piece of software which
432 % addresses this situation. It relies on citation commands, but does
433 % not require Bib\LaTeX. Instead, \hologo{BibTeX} can be used as
434 % \package{icite} uses the \package{usebib}
435 % package\footnote{\cite{usebib}} to build the indices by drawing
436 % directly from the bibliographical database.
437 %
438 %
439 % \section[The \package{icite} package]{The \textsf{icite} package}
440 % The \package{icite} package is loaded as usual like so:---
441 % \iffalse
442 %<*example>
443 % \fi
444 \begin{code}
445 \usepackage[<options>]{icite}
446 \end{code}
447 % \iffalse
448 %</example>
449 % \fi
450 %
451 % \package{icite} may be loaded with three optional \enquote*{named
452 % arguments} either of which is set using the syntax
453 % \meta{key}$=$\meta{value}. The description of the optional arguments
454 % follows:---
455 %
456 % \DescribeOption{citecmd}\label{ref:citecmd}
457 % |citecmd|$=$\meta{command}\hfill\tcboxverb{Default: cite}\\
458 % \meta{command} may be any citation command accepted by
459 % \hologo{BibTeX} or Bib\LaTeX. This option is used by the \cs{icite}
460 % command that is described below. By default, \cs{icite} uses the
461 % \cs{cite} command to insert citations in the body text.
462 %
463 % \DescribeOption{defaultindex}
464 % |defaultindex|$=$|none|\verb+|+\meta{index\_name}\hfill%
465 % \tcboxverb{Default: not set}\\
466 % \meta{index\_name} is the name of the index in which all passages
467 % cited with the \cs{icite} command are to be found by default. As
468 % this option is not initially set, \cs{icite} naturally inserts cited
469 % passages in the default general index, unless |defaultindex| is set
470 % to the value |none|, in which case indexing is disabled. It must be
471 % noted that this named argument does not need a value as it defaults
472 % to |loccit| if it is used alone. This is an easy way to have all
473 % passages cited indexed in a separate index named |loccit|.
474 %
475 % \DescribeOption{nobibengine}\NEWfeature{v1.1}
476 % \changes{v1.1}{2019/03/12}{New global option \texttt{nobibengine}}%
477 % |nobibengine|$=$|true|\verb+|+|false|\hfill%
478 % \tcboxverb{Default: not set}\\
479 % This named argument does not need a value as it defaults to |true|
480 % if it is used. When this option is activated, \package{icite} does
481 % not use \hologo{BibTeX} or Bib\LaTeX\ to insert the citations in the
482 % body text---even if either is loaded in the preamble---and pulls the
483 % necessary information directly from the bibliographical
484 % database. For this reason, \cs{bibinput} described below is of
485 % course still required. The citations inserted consist of the
486 % elements described below \vref{sec:entry-fields}
487 % \vpageref{sec:entry-fields}. However, it must be noted that if the
488 % entry field |shorthand| of any author/work be set in the database,
489 % it takes precedence over the fields used to define author names and
490 % titles.
491 %
492 % \paragraph{Bibliographical database}
493 % \DescribeMacro{\bibinput} Once \package{icite} is loaded, it must be
494 % connected to at least one bibliographic |.bib| file. To that end,
495 % \package{icite} uses the same \cs{bibinput} command as
496 % \package{usebib}.\footnote{Please refer to \cite[1]{usebib} for
497 % more detailed information on how to use this command.} An example
498 % follows:--- %
499 % \iffalse
500 %<*example>
501 % \fi
502 \begin{code}
503 % load icite, have \icite use \autocite by default, and insert cited
504 % passages in a separate index named 'loccit':
505 \usepackage[citecmd=autocite, defaultindex]{icite}
506 % note that the .bib file must be stripped of its extension:
507 \bibinput{bibliography} % that is: load bibliography.bib
508 \end{code}
509 % \iffalse
510 %</example>
511 % \fi
512 %
513 % \subsection{Preamble-only commands}
514 % The following commands may be found in the preamble only.
515 % \paragraph{Styling the titles}
516 % \DescribeMacro{\SetTitleStyle} By default, \package{icite} prints
517 % the titles of the works cited in italics.\\
518 % \cs{SetTitleStyle}\marg{formatting directives} can be used in the
519 % preamble only to customize the way titles are displayed in the
520 % indices, like so:--- %
521 % \iffalse
522 %<*example>
523 % \fi
524 \begin{code}
525 \SetTitleStyle{\textbf{#1}}
526 \end{code}
527 % \iffalse
528 %</example>
529 % \fi
530 % As this example shows, |#1| is the token that is replaced with the
531 % actual title in the formatting directives of the \cs{SetTitleStyle}
532 % command.
533 %
534 % \paragraph{Delimiters}
535 % \NEWfeature{v1.2}\DescribeMacro{\AuthorTitleDelim}
536 % \cs{AuthorTitleDelim}\marg{delimiter} sets the delimiter between
537 % authors and titles in the body text when the |nobibengine| option is
538 % set to |true|. The default delimiter is a comma and a space.
539 %
540 % \DescribeMacro{\TitlePageDelim}
541 % \cs{TitlePageDelim}\marg{delimiter} sets the delimiter between
542 % titles and pages in the body text when the |nobibengine| option is
543 % set to |true|. The default delimiter is a comma and a space.
544 %
545 % \subsection[\textsf{icite} for the Impatient]%
546 % {\package{icite} for the Impatient}
547 % Read \href{samples/icite-minimal.pdf}{\texttt{icite-minimal.pdf}}.
548 %
549 % \subsection{Entry fields}
550 % \label{sec:entry-fields}
551 % \subsubsection{Author names}
552 % To process author names, \package{icite} uses the following entry
553 % fields:
554 % \begin{description}
555 % \item[author] As for example in |author = {Ullmann, Manfred}|, which
556 % is satisfactory in most cases.
557 % \item[indexauthor] This field is not set by Bib\LaTeX. However, it
558 % may be used as a fallback field for multiple or complex names.
559 % \item[sortname] This standard Bib\LaTeX\ field which is never
560 % printed may be used to modify the sorting order of the index
561 % entries.
562 % \end{description}
563 %
564 % \paragraph{Example}
565 % From a given entry such as: \\[1ex]%
566 % |author = {|\prname{.hunayn ibn 'is.hAq al-`ibAdiyy, 'abU
567 % zayd}|}|\\[1ex]%
568 % it may prove useful to define an additional |indexauthor| field to
569 % have printed in the index only the relevant part of the name, like
570 % so: \\[1ex]%
571 % |indexauthor = {|\prname{.hunayn ibn 'is.hAq}|}| or
572 % |indexauthor = {|\prname{.hunayn}|}|\\[1ex]
573 % But in the end, the |sortname| field is also needed because the
574 % diacritics must be discarded so that the name be sorted
575 % properly:\\[1ex]%
576 % |sortname = {{|Hunayn ibn Ishaq|}}|
577 %
578 % \subsection{Titles}
579 % To process titles, \package{icite} uses the following entry fields:
580 % \begin{description}
581 % \item[title] The full title of the work.
582 % \item[shorttitle] The title in an abbriged form. If this entry is
583 % set, it takes precedence over the |title| field in the printed index.
584 % \item[indextitle] This field may be used to have a title such as
585 % \emph{The {\TeX}Book} printed in the index as \emph{{\TeX}Book, The}.
586 % \item[indexsorttitle] Like |sortname| for author names, this field is
587 % used for sorting only and is never printed. From the previous
588 % example, it may be used like so: \\%
589 % |indexsorttitle = {TEXBook}|
590 % \end{description}
591 %
592 % \section{Basic use}
593 % \DescribeMacro{\icite} \package{icite} provides the \cs{icite}
594 % command which both inserts a formatted citation in the body text and
595 % an entry corresponding to the passage cited in the index. This
596 % command is to be used in place of any \hologo{BibTeX} or Bib\LaTeX\
597 % citation command the syntax of which is
598 % \cs{command}\oarg{pre}\oarg{post}\marg{key}. It must be noted that
599 % only standard citation commands are supported, with the exception of
600 % those mentioned as qualified citation lists or so-called
601 % \enquote*{multicite} commands. The full syntax of \cs{icite}
602 % follows:--- %
603 % \iffalse
604 %<*example>
605 % \fi
606 \begin{code}
607 \icite[<pre>][<post>]{<key>}[<command>]
608 \end{code}
609 % \iffalse
610 %</example>
611 % \fi
612 % Where \oarg{command} can be used as a further optional argument to
613 % specify a standard citation command that \cs{icite} should emulate
614 % instead of the default \cs{cite} command or any other command set as
615 % default in the preamble by means of the |citecmd| global
616 % option.\footnote{See above, \vref{ref:citecmd}.}
617 %
618 % \paragraph{Example} The following example illustrates how
619 % \package{icite} can be used in combination with Bib\LaTeX\ and the
620 % \package{imakeidx} package to have the passages cited sorted and
621 % printed in a separate, specific \enquote*{Index of Passages
622 % Cited}:--- %
623 % \iffalse
624 %<*example>
625 % \fi
626 \begin{code}
627 % preamble
628 % load icite, have \icite use \autocite by default, and insert cited
629 % passages in a separate index named 'loccit':
630 \usepackage[citecmd=autocite, defaultindex]{icite}
631 % load bibliography.bib
632 \bibinput{bibliography}
633
634 % load biblatex (with oxnotes, \autocite acts as \footcite)
635 \usepackage[style=oxnotes]{biblatex}
636 \addbibresource{bibliography.bib} % mind the extension here
637
638 % load imakeidx and use xindy to have the numbers sorted properly
639 \usepackage[xindy]{imakeidx}
640 \makeindex[name=loccit, title=Index of Passages Cited (modern authors)]
641 \end{code}
642 % \iffalse
643 %</example>
644 % \fi
645 %
646 % Then \cs{icite} can be used like so:--- %
647 % \iffalse
648 %<*example>
649 % \fi
650 \begin{code}
651 \section*{\cs{icite} in action}
652 Let us start with four citations of the same reference, to make sure
653 that they are all indexed and sorted properly:
654 one\icite[123]{Ullmann1970}, two\icite[231]{Ullmann1970},
655 three\icite[81]{Ullmann1970} and four\icite[18]{Ullmann1970}.
656
657 Let us continue with four other citations out of two other
658 references: one\icite[90]{Bürgel2016}, two\icite[370]{Dols1987},
659 three\icite[205]{Bürgel2016} and four\icite[380]{Dols1987}.
660
661 Finally, let us have \cs{icite} use \cs{textcite} to cite
662 \icite[123]{Endress1992}[textcite], and again, this time in a
663 footnote\icite[86]{Endress1992}.
664 \end{code}
665 % \iffalse
666 %</example>
667 % \fi
668 %
669 % \begin{tcblisting}{text only}
670 % \section*{\cs{icite} in action}
671 % Let us start with four citations of the same reference, to make
672 % sure that they are all indexed and sorted properly:
673 % one\icite[123]{Ullmann1970}, two\icite[231]{Ullmann1970},
674 % three\icite[81]{Ullmann1970} and four\icite[18]{Ullmann1970}.
675 %
676 % Let us continue with four other citations out of two other
677 % references: one\icite[90]{Bürgel2016}, two\icite[370]{Dols1987},
678 % three\icite[205]{Bürgel2016} and four\icite[380]{Dols1987}.
679 %
680 % Finally, let us have \cs{icite} use \cs{textcite} to cite
681 % \icite[123]{Endress1992}[textcite], and again, this time in a
682 % footnote\icite[86]{Endress1992}.
683 % \end{tcblisting}
684 %
685 % All indices and the contents of the \hologo{BibTeX} file that has
686 % been used can be found below in the appendix
687 % (\vrefrange{ref:indices}{ref:icite-bib} respectively). As can be
688 % seen by comparing the bibliography generated in the footnotes with
689 % the text printed in the index, \package{icite} prints as expected
690 % the abbridged forms of the titles when they are
691 % available. Furthermore, as a default citation command set in the
692 % preamble, the \enquote*{oxnotes} Bib\LaTeX\ option of
693 % \package{biblatex-oxref} style package makes \cs{autocite} behave
694 % like \cs{footcite}. Finally, the page numbers in the index are
695 % sorted properly: for example, two-digit numbers, like 81, are listed
696 % before 123.
697 %
698 % \section{Refined use}
699 % When references are made not only to modern authors but also to
700 % authors and works from classical antiquity or from the Middle Ages,
701 % it is commonly agreed that at least two separate indices of passages
702 % cited should be made. Another option is not to index passages cited
703 % from modern authors at all.
704 %
705 % \DescribeMacro{\IndexSubtypeAs} \package{icite} is able to
706 % differentiate between sources by drawing from the bibliographical
707 % database the exact string that may be found in the |entrysubtype|
708 % entry field. To that end, the \cs{IndexSubtypeAs} command is
709 % provided. It takes to mandatory arguments, like so:--- %
710 % \iffalse
711 %<*example>
712 % \fi
713 \begin{code}
714 \IndexSubtypeAs{<subtype>}{<index_name>}
715 \end{code}
716 % \iffalse
717 %</example>
718 % \fi
719 % Where |<subtype>| is any given string used to specify an
720 % |entrysubtype| in the bibliographical database, and |<index_name>|
721 % the name of the index which the authors matching that subtype must
722 % go into. This command is to be found in the preamble only.
723 %
724 % Of course different subtypes can be associated with a single index
725 % or with different indices. That said, one should keep in mind that
726 % any entry the actual subtype of which is not associated with an
727 % index is processed as if it had no subtype at all. Examples
728 % follow:--- %
729 % \iffalse
730 %<*example>
731 % \fi
732 \begin{code}
733 % load icite, and have cited authors indexed in an index named
734 % 'secondary':
735 \usepackage[defaultindex=secondary]{icite}
736 % except for authors whose 'entrysubtype' field matches the string
737 % 'classical': have them indexed in an index named 'primary':
738 \IndexSubtypeAs{classical}{primary}
739 % authors whose 'entrysubtype' field matches the string 'medieval'
740 % should go into the same index:
741 \IndexSubtypeAs{medieval}{primary}
742 \end{code}
743 % \iffalse
744 %</example>
745 % \fi
746 % Or:
747 % \iffalse
748 %<*example>
749 % \fi
750 \begin{code}
751 % load icite, but do not index passages cited with \icite:
752 \usepackage[defaultindex=none]{icite}
753 % except for authors whose 'entrysubtype' field matches the string
754 % 'classical': have them indexed in an index named 'primary':
755 \IndexSubtypeAs{classical}{primary}
756 % authors whose 'entrysubtype' field matches the string 'medieval'
757 % should go into the same index:
758 \IndexSubtypeAs{medieval}{primary}
759 \end{code}
760 % \iffalse
761 %</example>
762 % \fi
763 %
764 % \paragraph{Example} In the following example, modern authors, namely
765 % those whose |entrysubtype| field does not match the string
766 % |classical| should go into the default |loccit| index. As for those
767 % whose |entrysubtype| matches |classical|, they should to into an
768 % index named |primary|. \label{ref:classics-pkg}Furthermore, the
769 % \package{classics} package is used to format references in which a
770 % volume number is used.\footnote{For more information, see below
771 % \vref{sec:classics-usage}.} In this way, \package{xindy} only has
772 % numbers to handle:--- %
773 % \iffalse
774 %<*example>
775 % \fi
776 \begin{code}
777 % preamble
778 \usepackage[style=oxnotes]{biblatex}
779 \addbibresource{bibliography.bib}
780
781 \usepackage[xindy]{imakeidx}
782 \makeindex[name=loccit, title=Index of passages cited (modern authors)]
783 \makeindex[name=primary, title=\emph{Index locorum citatorum}]
784
785 \usepackage{classics}
786 \newclassic{iau}{\classicsRoman{#1}|, #1|.#1}
787 \newclassic{razi}{#1|.#1}
788 \newclassic{nadim}{\classicsRoman{#1}|.#1|, #1}
789
790 \usepackage[citecmd=autocite,defaultindex]{icite}
791 \IndexSubtypeAs{classical}{primary}
792 \end{code}
793 % \iffalse
794 %</example>
795 % \fi
796 %
797 % Then \cs{icite} can be used like so:--- %
798 % \iffalse
799 %<*example>
800 % \fi
801 \begin{code}
802 \section*{\cs{icite} in action}
803 Let us start with four citations of the same reference, to make sure
804 that they are all indexed and sorted properly:
805 one\icite[123]{Ullmann1970}, two\icite[231]{Ullmann1970},
806 three\icite[81]{Ullmann1970} and four\icite[18]{Ullmann1970}.
807
808 Let us continue with four other citations out of two other
809 references: one\icite[90]{Bürgel2016}, two\icite[370]{Dols1987},
810 three\icite[205]{Bürgel2016} and four\icite[380]{Dols1987}.
811
812 Before concluding, let us insert a few references to medieval Arabic
813 authors: one\icite[\iau{1}[81][32]]{IAUMuller},
814 two\icite[\razi{5}[7--10]]{RaziShukuk}, three\icite[133]{al-Qifti},
815 four\icite[\nadim{3}[7][286]]{al-Nadim},
816 five\icite[\iau{2}[214][20]]{IAUMuller},
817 six\icite[\razi{1}[6--20]]{RaziShukuk},
818 seven\icite[126.15--20]{al-Qifti} and
819 eight\icite[\nadim{3}[7][291]]{al-Nadim}.
820
821 Finally, let us have \cs{icite} use \cs{textcite} to cite
822 \icite[123]{Endress1992}[textcite], and again, this time in a
823 footnote\icite[86]{Endress1992}.
824 \end{code}
825 % \iffalse
826 %</example>
827 % \fi
828 %
829 % \begin{tcblisting}{text only}
830 % \section*{\cs{icite} in action}
831 % Let us start with four citations of the same reference, to make
832 % sure that they are all indexed and sorted properly:
833 % one\icite[123]{Ullmann1970}, two\icite[231]{Ullmann1970},
834 % three\icite[81]{Ullmann1970} and four\icite[18]{Ullmann1970}.
835 %
836 % Let us continue with four other citations out of two other
837 % references: one\icite[90]{Bürgel2016}, two\icite[370]{Dols1987},
838 % three\icite[205]{Bürgel2016} and four\icite[380]{Dols1987}.
839 %
840 % Before concluding, let us insert a few references to medieval
841 % Arabic authors: one\icite[\iau{1}[81][32]]{IAUMuller},
842 % two\icite[\razi{5}[7--10]]{RaziShukuk},
843 % three\icite[133]{al-Qifti},
844 % four\icite[\nadim{3}[7][286]]{al-Nadim},
845 % five\icite[\iau{2}[214][20]]{IAUMuller},
846 % six\icite[\razi{1}[6--20]]{RaziShukuk},
847 % seven\icite[126.15--20]{al-Qifti} and
848 % eight\icite[\nadim{3}[7][291]]{al-Nadim}.
849 %
850 % Finally, let us have \cs{icite} use \cs{textcite} to cite
851 % \icite[123]{Endress1992}[textcite], and again, this time in a
852 % footnote\icite[86]{Endress1992}.
853 % \end{tcblisting}
854 %
855 % As already said above, all indices and the contents of the
856 % \hologo{BibTeX} file that has been used can be found below in the
857 % appendix (\vrefrange{ref:indices}{ref:icite-bib} respectively). As
858 % one can see, \prname{al-rAziyy} has been sorted under the letter R
859 % and references to classical works have been formatted properly.
860 %
861 %
862 % \subsection[The \textsf{classics} package]%
863 % {The \package{classics} package} %
864 % \label{sec:classics-usage}
865 % As said above \vpageref{ref:classics-pkg}, it is advisable to use
866 % the \package{classics} package to format volume, page, column, line
867 % numbers and the like which are inserted in the \meta{post} optional
868 % argument of the \cs{icite} command\autocite{classics}. An example of
869 % using \package{classics} to format references to Aristotle according
870 % to Bekker pagination follows:\footnote{See \cite[2]{classics} for
871 % more information.}--- %
872 % \iffalse
873 %<*example>
874 % \fi
875 \begin{code}
876 % preamble:
877 \usepackage{classics}
878 \newclassic{aristotle}{#1|\textit{#1}|#1}
879 \end{code}
880 % \iffalse
881 %</example>
882 % \fi
883 % \iffalse
884 %<*example>
885 % \fi
886 \begin{example}
887 In \emph{Politics}, Aristotle says that man is by nature a political
888 animal in the following passages: \aristotle{1253}[a][2--9] (Book~1)
889 and again in \aristotle{1278}[b][19] (Book~3). The latter passage
890 shows that one should read the whole section of Book~1 concerning
891 household management and the control of slaves
892 (\aristotle*{1253}[b][1]{1253}[b][39]).
893 \end{example}
894 % \iffalse
895 %</example>
896 % \fi
897 % The following prints the same body text while using \package{icite}
898 % to have the passages cited inserted in the \emph{Index locorum
899 % citatorum} (see below \vref{sec:index-loc-cit}):--- %
900 % \iffalse
901 %<*example>
902 % \fi
903 \begin{example}
904 In \emph{Politics}, Aristotle says that man is by nature a political
905 animal in the following passages:
906 \icite[\aristotle{1253}[a][2--9]]{Aristotle:Politica}[notecite]
907 (Book~1) and again in \icite[\aristotle{1278}[b][19]]%
908 {Aristotle:Politica}[notecite] (Book~3). The latter passage shows
909 that one should read the whole section of Book~1 concerning
910 household management and the control of slaves
911 \icite[\aristotle*{1253}[b][1]{1253}[b][39]]%
912 {Aristotle:Politica}[pnotecite].
913 \end{example}
914 % \iffalse
915 %</example>
916 % \fi
917 % As can be seen, the \cs{notecite} and \cs{pnotecite} commands have
918 % been used to insert only the references in the body text.
919 %
920 % It is also advisable to use \package{xindy} to compile indices of
921 % passages cited because \package{xindy}, unlike \package{makeindex}
922 % or \package{xindex}, is able to sort numbers properly: for example,
923 % with \package{xindy}, such a number as 81 will come before 100, but
924 % will be sorted after 100 with the other two engines.
925 % \begin{tcblisting}{text only, title=Caveat}
926 % \package{xindy} (actually |texindy|) is also designed to ignore
927 % \TeX\ commands by default. However, due to a missing line in
928 % |xindy/modules/base/tex.xdy|,\footnote{As the time of writing, in
929 % \package{xindy} v2.5.1.} this does not apply to so-called
930 % \enquote*{starred} \TeX\ commands, such as \cs{aristotle*} from
931 % the example above.
932 % \end{tcblisting}
933 % One easy way to get around this issue is to create a style file with
934 % a single line that instructs \package{xindy} to ignore the asterisk
935 % when processing the index, like so:--- %
936 % \iffalse
937 %<*example>
938 % \fi
939 \begin{tcblisting}{minted language=lisp, listing only, title=icite.xdy}
940 (merge-rule "\*" "" :eregexp)
941 \end{tcblisting}
942 % \iffalse
943 %</example>
944 % \fi
945 %
946 % The following example shows how this simple rule can be
947 % applied:--- %
948 % \iffalse
949 %<*example>
950 % \fi
951 \begin{code}
952 % preamble:
953 \usepackage[xindy]{imakeidx}
954 \makeindex[name=loccit, options=-M icite.xdy]
955 % document:
956 \printindex[loccit]
957 \end{code}
958 % \iffalse
959 %</example>
960 % \fi
961 % Of course, the document itself must be compiled with
962 % |--shell-escape|.\footnote{See \cite[2--4]{imakeidx}.}
963 %
964 % \section{Appendix}
965 % Designing the layout of indices is out of the scope of this
966 % documentation. For information, the \package{tabto} package has been
967 % used in the preamble in combination with the following |xindy| style
968 % file:--- %
969 % \iffalse
970 %<*example>
971 % \fi
972 \begin{tcblisting}{minted language=lisp, listing only,
973 title=icite.xdy}
974 (markup-locclass-list :open "\tabto{3.5cm}" :sep ", ")
975 \end{tcblisting}
976 % \iffalse
977 %</example>
978 % \fi
979 %
980 % \subsection{Indices}
981 % \label{ref:indices}
982 % \subsubsection{Index of Passages Cited (modern authors)}
983 % \printindex[loccit]
984 % \needspace{8\baselineskip}
985 % \subsubsection{\emph{Index locorum citatorum}}
986 % \label{sec:index-loc-cit}
987 % \printindex[primary]
988 %
989 % \subsection{\texorpdfstring{\hologo{BibTeX}
990 % file used in this document}{BibTeX file used in this document}}
991 % \label{ref:icite-bib}
992 % \tcbinputlisting{minted options={linenos, numbersep=1.5mm}, minted
993 % language=bibtex, listing file=icite.bib, listing only}
994 %
995 %\StopEventually{}
996 %
997 % \section{Implementation}
998 %
999 % \iffalse
1000 %<*package>
1001 % \fi
1002 % Declare the global options, and define them:
1003 % \begin{macrocode}
1004 \RequirePackage{xkeyval}
1005 \DeclareOptionX{citecmd}[cite]{\def\ic@dfltcit{#1}}
1006 \newif\ifdefault@index
1007 \newif\ifno@index
1008 \DeclareOptionX{defaultindex}[loccit]{
1009 \edef\@tempa{#1}
1010 \edef\@none{none}
1011 \ifx\@tempa\@none
1012 \no@indextrue
1013 \else
1014 \default@indextrue
1015 \def\ic@dfltind{#1}
1016 \fi
1017 }
1018 \newif\ifno@bibengine
1019 \define@boolkey{icite.sty}[@pkg@]{nobibengine}[true]{%
1020 \if@pkg@nobibengine\no@bibenginetrue\else\fi}
1021 \ExecuteOptionsX{citecmd}
1022 \ProcessOptionsX\relax
1023 % \end{macrocode}
1024 % The following packages are required by \package{icite}:
1025 % \begin{macrocode}
1026 \RequirePackage{xparse}
1027 \RequirePackage{datatool}
1028 \RequirePackage{usebib}
1029 % \end{macrocode}
1030 % If |nobibengine| is set to true, then \cs{ic@dfltcit} will be
1031 % redefined by \cs{icite} to \cs{ic@nullcmd} which does nothing.
1032 % \begin{macrocode}
1033 \NewDocumentCommand{\ic@nullcmd}{O{}O{}m}{}
1034 % \end{macrocode}
1035 % Define fields to be used by \package{icite}:
1036 % \begin{macrocode}
1037 \define@reuse@key{author}
1038 \define@reuse@key{indexauthor}
1039 \define@reuse@key{sortname}
1040 \define@reuse@key{title}
1041 \define@reuse@key{shorttitle}
1042 \define@reuse@key{indextitle}
1043 \define@reuse@key{indexsorttitle}
1044 \define@reuse@key{entrysubtype}
1045 \define@reuse@key{shorthand}
1046 % \end{macrocode}
1047 % This is the same as \cs{usebibentry} from \package{ebib}, but it
1048 % does not return an error if the entry field is not found:
1049 % \begin{macrocode}
1050 \def\get@bibentry#1#2{\@ifundefined{reuse@#1@#2}{}
1051 {\@nameuse{reuse@#1@#2}}}
1052 % \end{macrocode}
1053 % Create a new database which \package{icite} will use to connect
1054 % Bib\LaTeX\ \enquote*{subtypes} to indices.
1055 % \begin{macrocode}
1056 \DTLnewdb{icite@indices}
1057 % \end{macrocode}
1058 % \DescribeMacro{\IndexSubtypeAs} \cs{IndexSubtypeAs} takes two
1059 % mandatory arguments: 1. Any given keyword used to specify an
1060 % \enquote*{entrysubtype} in the bibliographical database and 2. The
1061 % index which the authors matching that subtype must go into. This
1062 % command is to be found in the preamble only.
1063 % \begin{macrocode}
1064 \NewDocumentCommand{\IndexSubtypeAs}{m m}{%
1065 \DTLnewrow{icite@indices}
1066 \DTLnewdbentry{icite@indices}{subtype}{#1}
1067 \DTLnewdbentry{icite@indices}{index}{#2}
1068 }
1069 \@onlypreamble\IndexSubtypeAs
1070 % \end{macrocode}
1071 % \DescribeMacro{\SetTitleStyle} By default, titles are printed in
1072 % italics. This can be changed in the preamble by \cs{SetTitleStyle}.
1073 % \begin{macrocode}
1074 \NewDocumentCommand{\TitleStyle}{m}{\emph{#1}}
1075 \NewDocumentCommand{\SetTitleStyle}{m}{%
1076 \RenewDocumentCommand{\TitleStyle}{m}{#1}
1077 }
1078 \@onlypreamble\SetTitleStyle
1079 % \end{macrocode}
1080 % \DescribeMacro{\AuthorTitleDelim}
1081 % \changes{v1.2}{2019/03/17}{\cs{AuthorTitleDelim}: delimiter
1082 % between authors and titles}\cs{AuthorTitleDelim}\marg{delimiter}
1083 % sets the delimiter between authors and titles in the body text when
1084 % the |nobibengine| option is set to |true|. The default delimiter is
1085 % a comma.
1086 % \begin{macrocode}
1087 \def\ic@authtitdelim{, }
1088 \NewDocumentCommand{\AuthorTitleDelim}{m}{%
1089 \def\ic@authtitdelim{#1}
1090 }
1091 \@onlypreamble\AuthorTitleDelim
1092 % \end{macrocode}
1093 % \DescribeMacro{\TitlePageDelim}
1094 % \changes{v1.2}{2019/03/17}{\cs{TitlePageDelim}: the delimiter
1095 % between titles and pages}\cs{TitlePageDelim}\marg{delimiter} sets
1096 % the delimiter between titles and pages in the body text when the
1097 % |nobibengine| option is set to |true|. The default delimiter is a
1098 % comma.
1099 % \begin{macrocode}
1100 \def\ic@titpgdelim{, }
1101 \NewDocumentCommand{\TitlePageDelim}{m}{%
1102 \def\ic@titpgdelim{#1}
1103 }
1104 \@onlypreamble\TitlePageDelim
1105 % \end{macrocode}
1106 % \DescribeMacro{\icite} \cs{icite} both inserts a formatted citation
1107 % and an entry in the \emph{index locorum citatorum}. It is to be used
1108 % in place of any \hologo{BibTeX} or Bib\LaTeX\ citation command the
1109 % syntax of which is
1110 % \cs{command}\oarg{pre}\oarg{post}\marg{key}. \cs{icite} further
1111 % accepts an optional argument should one wish to specify the
1112 % citation command to be used, like so:\\
1113 % \cs{icite}\oarg{pre}\oarg{post}\marg{key}\oarg{command}\\
1114 % Only standard citation commands are accepted, with the exception of
1115 % qualified citation lists or so-called \enquote*{multicite} commands.
1116 % \begin{macrocode}
1117 \NewDocumentCommand{\icite}{o o m O{\ic@dfltcit}}{%
1118 \edef\ic@argiv{#4}%
1119 \edef\ic@null{ic@nullcmd}%
1120 \ifno@bibengine\let\ic@argiv\ic@null\else\fi%
1121 \edef\@shorthand{\get@bibentry{#3}{shorthand}}%
1122 \edef\@subtype{\get@bibentry{#3}{entrysubtype}}%
1123 \edef\@author{\get@bibentry{#3}{author}}%
1124 \edef\@indexauthor{\get@bibentry{#3}{indexauthor}}%
1125 \edef\@sortname{\get@bibentry{#3}{sortname}}%
1126 \edef\@indexsorttitle{\get@bibentry{#3}{indexsorttitle}}%
1127 \edef\@indextitle{\get@bibentry{#3}{indextitle}}%
1128 \edef\@shorttitle{\get@bibentry{#3}{shorttitle}}%
1129 \edef\@title{\get@bibentry{#3}{title}}%
1130 \ifx\@indexauthor\empty
1131 \def\@useauthor{\@author}%
1132 \else
1133 \def\@useauthor{\@indexauthor}%
1134 \fi
1135 \ifx\@sortname\empty
1136 \def\@sortedauthor{\@useauthor}%
1137 \else
1138 \def\@sortedauthor{{\@sortname}@\@useauthor}%
1139 \fi
1140 \ifx\@indextitle\empty
1141 \ifx\@shorttitle\empty
1142 \def\@usetitle{\@title}%
1143 \else
1144 \def\@usetitle{\@shorttitle}%
1145 \fi
1146 \else
1147 \def\@usetitle{\@indextitle}%
1148 \fi
1149 \ifx\@indexsorttitle\empty
1150 \def\@sortedtitle{{\@usetitle}@\TitleStyle{\@usetitle}}%
1151 \else
1152 \def\@sortedtitle{{\@indexsorttitle}@\TitleStyle{\@usetitle}}%
1153 \fi
1154 \IfNoValueTF{#1}%
1155 {\DTLifdbempty{icite@indices}{%
1156 \ifno@index\else
1157 \ifdefault@index%
1158 \index[\ic@dfltind]{\@sortedauthor!\@sortedtitle}%
1159 \else%
1160 \index{\@sortedauthor!\@sortedtitle}%
1161 \fi\fi%
1162 }{%
1163 \bgroup%
1164 \DTLforeach*{icite@indices}{%
1165 \icite@subtype=subtype,\icite@index=index}{%
1166 \ifx\@subtype\icite@subtype%
1167 \index[\icite@index]{\@sortedauthor!\@sortedtitle}%
1168 \dtlbreak%
1169 \else%
1170 \ifno@index\else
1171 \ifdefault@index%
1172 \index[\ic@dfltind]{\@sortedauthor!\@sortedtitle}%
1173 \else%
1174 \index{\@sortedauthor!\@sortedtitle}%
1175 \fi\fi%
1176 \fi}%
1177 \egroup}%
1178 \ifno@bibengine
1179 \ifx\@shorthand\empty%
1180 \@useauthor\ic@authtitdelim\TitleStyle{\@usetitle}%
1181 \else%
1182 \@shorthand%
1183 \fi%
1184 \else%
1185 \fi%
1186 \csname\ic@argiv\endcsname{#3}%
1187 }
1188 {\IfNoValueTF{#2}%
1189 {\DTLifdbempty{icite@indices}{%
1190 \ifno@index\else
1191 \ifdefault@index%
1192 \index[\ic@dfltind]{\@sortedauthor!\@sortedtitle!#1}%
1193 \else%
1194 \index{\@sortedauthor!\@sortedtitle!#1}%
1195 \fi\fi%
1196 }{%
1197 \bgroup%
1198 \DTLforeach*{icite@indices}{%
1199 \icite@subtype=subtype,\icite@index=index}{%
1200 \ifx\@subtype\icite@subtype%
1201 \index[\icite@index]{\@sortedauthor!\@sortedtitle!#1}%
1202 \dtlbreak%
1203 \else%
1204 \ifno@index\else
1205 \ifdefault@index%
1206 \index[\ic@dfltind]{\@sortedauthor!\@sortedtitle!#1}%
1207 \else%
1208 \index{\@sortedauthor!\@sortedtitle!#1}%
1209 \fi\fi%
1210 \fi}%
1211 \egroup}%
1212 \ifno@bibengine
1213 \ifx\@shorthand\empty%
1214 \@useauthor\ic@authtitdelim\TitleStyle{\@usetitle}%
1215 \ic@titpgdelim{#1}%
1216 \else%
1217 \@shorthand\ic@titpgdelim{#1}%
1218 \fi%
1219 \else%
1220 \fi%
1221 \csname\ic@argiv\endcsname[{#1}]{#3}%
1222 }
1223 {\DTLifdbempty{icite@indices}{%
1224 \ifno@index\else
1225 \ifdefault@index%
1226 \index[\ic@dfltind]{\@sortedauthor!\@sortedtitle!#2}%
1227 \else%
1228 \index{\@sortedauthor!\@sortedtitle!#2}%
1229 \fi\fi%
1230 }{%
1231 \bgroup%
1232 \DTLforeach*{icite@indices}{%
1233 \icite@subtype=subtype,\icite@index=index}{%
1234 \ifx\@subtype\icite@subtype%
1235 \index[\icite@index]{\@sortedauthor!\@sortedtitle!#2}%
1236 \dtlbreak%
1237 \else%
1238 \ifno@index\else
1239 \ifdefault@index%
1240 \index[\ic@dfltind]{\@sortedauthor!\@sortedtitle!#2}%
1241 \else%
1242 \index{\@sortedauthor!\@sortedtitle!#2}%
1243 \fi\fi%
1244 \fi}%
1245 \egroup}%
1246 \ifno@bibengine
1247 \ifx\@shorthand\empty%
1248 #1 \@useauthor\ic@authtitdelim\TitleStyle{\@usetitle}%
1249 \ic@titpgdelim{#2}%
1250 \else%
1251 #1 \@shorthand\ic@titpgdelim{#2}%
1252 \fi
1253 \else%
1254 \fi%
1255 \csname\ic@argiv\endcsname[#1][{#2}]{#3}%
1256 }%
1257 }%
1258 }
1259 % \end{macrocode}
1260 % \iffalse
1261 %</package>
1262 % \fi
1263 %\Finale
1264 \endinput