aboutsummaryrefslogtreecommitdiff
path: root/icite.dtx
diff options
context:
space:
mode:
Diffstat (limited to 'icite.dtx')
-rw-r--r--icite.dtx281
1 files changed, 269 insertions, 12 deletions
diff --git a/icite.dtx b/icite.dtx
index 35d314d..f977239 100644
--- a/icite.dtx
+++ b/icite.dtx
@@ -92,6 +92,52 @@ Running "make install" installs the files in the local TeX tree.
92\documentclass{ltxdoc} 92\documentclass{ltxdoc}
93\usepackage{filecontents} 93\usepackage{filecontents}
94\begin{filecontents*}{\jobname.bib} 94\begin{filecontents*}{\jobname.bib}
95@Book{Bürgel2016,
96 shorttitle = {Ärztliches Leben\ldots},
97 editortype = {reviser},
98 editor = {Käs, Fabian},
99 number = 135,
100 series = {Islamic History and Civilization},
101 location = {Leiden},
102 publisher = {Brill},
103 date = 2016,
104 title = {Ärztliches Leben und Denken im arabischen
105 Mittelalter},
106 author = {Bürgel, Johann Christoph}
107}
108
109@Article{Dols1987,
110 author = {Dols, Michael W.},
111 title = {The Origins of the Islamic Hospital: Myth and
112 Reality},
113 shorttitle = {The Origins of the Islamic Hospital},
114 journaltitle = {Bulletin of the History of Medicine},
115 date = 1987,
116 volume = 61,
117 pages = {367--390}
118}
119
120@Book{Ullmann1970,
121 location = {Leiden},
122 publisher = {Brill},
123 title = {Die Medizin im Islam},
124 date = 1970,
125 author = {Ullmann, Manfred},
126}
127
128@InBook{Endress1992,
129 title = {Die Wissenschaftliche Literatur},
130 date = 1992,
131 author = {Endress, Gerhard},
132 booktitle = {Grundriß der arabischen Philologie},
133 editor = {Fisher, Wolfdietrich},
134 volume = 3,
135 note = {Supplement},
136 publisher = {Reichert},
137 location = {Wiesbaden},
138 pages = {3--152}
139}
140
95@software{usebib, 141@software{usebib,
96 title = {The Usebib package}, 142 title = {The Usebib package},
97 subtitle = {A simple bibliography processor}, 143 subtitle = {A simple bibliography processor},
@@ -109,6 +155,9 @@ Running "make install" installs the files in the local TeX tree.
109\usepackage{newunicodechar} 155\usepackage{newunicodechar}
110\newunicodechar{ǧ}{ǧ} % Old Standard does not include ǧ/Ǧ 156\newunicodechar{ǧ}{ǧ} % Old Standard does not include ǧ/Ǧ
111\newunicodechar{Ǧ}{Ǧ} % 157\newunicodechar{Ǧ}{Ǧ} %
158\usepackage{arabluatex}
159\SetTranslitConvention{loc}
160\usepackage{varioref}
112\usepackage{hyperxmp} 161\usepackage{hyperxmp}
113\usepackage{uri} 162\usepackage{uri}
114\usepackage[numbered]{hypdoc} 163\usepackage[numbered]{hypdoc}
@@ -126,12 +175,14 @@ Running "make install" installs the files in the local TeX tree.
126 pdfmetalang={en-US}, pdftype={Text}, pdfkeywords={bibtex, biblatex, 175 pdfmetalang={en-US}, pdftype={Text}, pdfkeywords={bibtex, biblatex,
127 indexing}} 176 indexing}}
128\CodelineIndex 177\CodelineIndex
129\usepackage[citecmd=footcite,defaultindex]{\jobname} 178\usepackage[citecmd=autocite,defaultindex]{\jobname}
179\usepackage{cleveref}
130\bibinput{icite} 180\bibinput{icite}
131\usepackage[nonewpage,xindy]{imakeidx} 181\usepackage[nonewpage,xindy]{imakeidx}
132\indexsetup{level=\section} 182\indexsetup{level=\section}
133\makeindex[intoc] 183\makeindex[columns=3]
134\makeindex[name=loccit, title=Modern Authors] 184\makeindex[columns=3,name=loccit, title=Index of Passages Cited
185(modern authors)\label{ind:loccit}]
135\usepackage[scale=1.5]{ccicons} 186\usepackage[scale=1.5]{ccicons}
136\usepackage{dox} 187\usepackage{dox}
137\doxitem{Option}{option}{options} 188\doxitem{Option}{option}{options}
@@ -143,7 +194,8 @@ Running "make install" installs the files in the local TeX tree.
143\usepackage[lot]{multitoc} 194\usepackage[lot]{multitoc}
144\usepackage{nameref} 195\usepackage{nameref}
145\usepackage{csquotes} 196\usepackage{csquotes}
146\usepackage[style=oxnotes]{biblatex} 197\usepackage[style=oxnotes, hyperref=false]{biblatex}
198\DeclareFieldFormat{postnote}{\mkpageprefix[pagination][\mknormrange]{#1}}
147\addbibresource{icite.bib} 199\addbibresource{icite.bib}
148\usepackage{hologo,metalogox} 200\usepackage{hologo,metalogox}
149\usepackage{relsize} 201\usepackage{relsize}
@@ -155,8 +207,8 @@ Running "make install" installs the files in the local TeX tree.
155\usepackage[breakable, skins, xparse, minted]{tcolorbox} 207\usepackage[breakable, skins, xparse, minted]{tcolorbox}
156\tcbset{colback=white, boxrule=.15mm, colframe=red!50!white, left=6mm, 208\tcbset{colback=white, boxrule=.15mm, colframe=red!50!white, left=6mm,
157 breakable} 209 breakable}
158\newtcblisting{iexample}{minted options=linenos} 210\newtcblisting{example}{minted options=linenos}
159\newtcblisting{icode}{minted options=linenos, listing only} 211\newtcblisting{code}{minted options=linenos, listing only}
160\usepackage{etoc} 212\usepackage{etoc}
161\etocsettocdepth{paragraph} 213\etocsettocdepth{paragraph}
162\newcommand{\icitetableofcontents}{% 214\newcommand{\icitetableofcontents}{%
@@ -178,9 +230,9 @@ Running "make install" installs the files in the local TeX tree.
178 \tableofcontents 230 \tableofcontents
179 \endgroup} 231 \endgroup}
180\EnableCrossrefs 232\EnableCrossrefs
181%\CodelineIndex 233 %\CodelineIndex
182\RecordChanges 234\RecordChanges
183%\OnlyDescription 235 %\OnlyDescription
184\begin{document} 236\begin{document}
185 \DocInput{\jobname.dtx} 237 \DocInput{\jobname.dtx}
186 \PrintChanges 238 \PrintChanges
@@ -330,12 +382,217 @@ Running "make install" installs the files in the local TeX tree.
330% The \package{icite} package is but a modest piece of software which 382% The \package{icite} package is but a modest piece of software which
331% addresses this situation. It relies on citation commands, but does 383% addresses this situation. It relies on citation commands, but does
332% not require Bib\LaTeX. Instead, \hologo{BibTeX} can be used as 384% not require Bib\LaTeX. Instead, \hologo{BibTeX} can be used as
333% \package{icite} uses the \package{usebib} package\icite{usebib} to 385% \package{icite} uses the \package{usebib}
334% build the indices by drawing directly from the bibliographic 386% package\footnote{\cite{usebib}} to build the indices by drawing
335% database. 387% directly from the bibliographic database.
388%
389%
390% \section[The \package{icite} package]{The \textsf{icite} package}
391% The \package{icite} package is loaded as usual like so:---
392% \iffalse
393%<*example>
394% \fi
395\begin{code}
396 \usepackage[<options>]{icite}
397\end{code}
398% \iffalse
399%</example>
400% \fi
401%
402% \package{icite} may be loaded with two optional \enquote*{named
403% arguments} either of which is set using the syntax
404% \meta{key}$=$\meta{value}. The description of the optional arguments
405% follows:---
406%
407% \DescribeOption{citecmd}
408% |citecmd|$=$\meta{command}\hfill\tcboxverb{Default: cite}\\
409% \meta{command} may be any citation command accepted by
410% \hologo{BibTeX} or Bib\LaTeX. This option is used by the \cs{icite}
411% command that is described below. By default, \cs{icite} uses the
412% \cs{cite} command to insert citations in the body text.
413%
414% \DescribeOption{defaultindex}
415% |defaultindex|$=$|none|\verb+|+\meta{index\_name}\hfill%
416% \tcboxverb{Default: not set}\\
417% \meta{index\_name} is the name of the index in which all passages
418% cited with the \cs{icite} command are to be found by default. As
419% this option is not initally set, \cs{icite} naturally inserts cited
420% passages in the default general index, unless |defaultindex| is set
421% to the value |none|, in which case indexing is disabled. It must be
422% noted that this named argument does not need a value as it defaults
423% to |loccit| if it is used alone. This is an easy way to have all
424% passages cited indexed in a separate index named |loccit|.
425%
426% \paragraph{Bibliographic database}
427% \DescribeMacro{\bibinput} Once \package{icite} is loaded, it must be
428% connected to at least one bibliographic |.bib| file. To that end,
429% \package{icite} uses the same \cs{bibinput} command as
430% \package{usebib}.\footnote{Please refer to \cite[1]{usebib} for more
431% detailed information on how to use this command.} An example
432% follows:---
433% \iffalse
434%<*example>
435% \fi
436\begin{code}
437 % load icite, have \icite use \autocite by default, and insert cited
438 % passages in a separate index named 'loccit':
439 \usepackage[citecmd=autocite, defaultindex]{icite}
440 % note that the .bib file must be stripped of its extension:
441 \usebib{bibliography} % that is: load bibliography.bib
442\end{code}
443% \iffalse
444%</example>
445% \fi
446%
447% \paragraph{Styling the titles}
448% \DescribeMacro{\SetTitleStyle} By default, \package{icite} prints
449% the titles of the works in
450% italics. \cs{SetTitleStyle}\marg{for\-matting directives} can be used
451% in the preamble only to customize the way titles are displayed in
452% the indices, like so:--- %
453% \iffalse
454%<*example>
455% \fi
456\begin{code}
457 \SetTitleStyle{\textbf{#1}}
458\end{code}
459% \iffalse
460%</example>
461% \fi
462% As this example shows, |#1| is the token that is replaced with the
463% actual title in the formatting directives of the \cs{SetTitleStyle}
464% command.
465%
466% \subsection{Entry fields}
467% \subsubsection{Author names}
468% To process author names, \package{icite} uses the following entry
469% fields:
470% \begin{description}
471% \item[author] As for example in |author = {Ullmann, Manfred}|, which
472% is satisfactory in most cases.
473% \item[indexauthor] This field is not set by Bib\LaTeX. However, it
474% may be used as a fallback field for multiple or complex names.
475% \item[sortname] This standard Bib\LaTeX\ which is never printed may
476% be used to modify the sorting order of the index entries.
477% \end{description}
478%
479% \paragraph{Example}
480% From a given entry such as: \\[1ex]%
481% |author = {|\prname{.hunayn ibn 'is.hAq al-`ibAdiyy, 'abU
482% zayd}|}|\\[1ex]%
483% it may prove useful to define an additional |indexauthor| field to
484% have printed in the index only the relevant part of the name, like
485% so: \\[1ex]%
486% |indexauthor = {|\prname{.hunayn ibn 'is.hAq}|}|\\[1ex]
487% But in the end, the |sortname| field is also needed because the name
488% must be sorted without the diacritics:\\[1ex]%
489% |sortname = {|Hunayn ibn Ishaq|}|
490%
491% \subsection{Titles}
492% To process titles, \package{icite} uses the following entry fields:
493% \begin{description}
494% \item[title] The full title of the work.
495% \item[shorttitle] The title in an abbriged form. If this entry is
496% set, it takes precedence over the |title| field in the printed index.
497% \item[indextitle] This field may be used to have a title such as
498% \emph{The {\TeX}Book} printed in the index as \emph{{\TeX}Book, The}.
499% \item[indexsorttitle] Like |sortname| for author names, this field is
500% used for sorting only and is never printed. From the previous
501% example, it may be used like so: \\%
502% |indexsorttitle = {TEXBook}|
503% \end{description}
504%
505% \section{Basic use}
506% \DescribeMacro{\icite} \package{icite} provides the \cs{icite}
507% command which both inserts a formatted citation in the body text and
508% an entry corresponding to the passage cited in the index. This
509% command is to be used in place of any \hologo{BibTeX} or Bib\LaTeX\
510% citation command the syntax of which is
511% \cs{command}\oarg{pre}\oarg{post}\marg{key}. It must be noted that
512% only standard citation commands are supported, with the exception of
513% those mentioned as qualified citation lists or so-called
514% \enquote*{multicite} commands. The full syntax of \cs{icite}
515% follows:--- %
516% \iffalse
517%<*example>
518% \fi
519\begin{code}
520 \icite[pre][post]{key}[command]
521\end{code}
522% \iffalse
523%</example>
524% \fi
525% Where \oarg{command} can be used as a further optional argument to
526% specify a standard citation command that \cs{icite} should emulate
527% instead of the default \cs{cite} command or any other command set as
528% default in the preamble by means of the |citecmd| global option.
529%
530% \paragraph{Example} The following example illustrates how
531% \package{icite} can be used in combination with Bib\LaTeX\ and the
532% \package{imakeidx} package to have the passages cited sorted and
533% printed in a separate, specific \enquote*{Index of Passages
534% Cited}:--- %
535% \iffalse
536%<*example>
537% \fi
538\begin{code}
539 % preamble
540 % load icite, have \icite use \autocite by default, and insert cited
541 % passages in a separate index named 'loccit':
542 \usepackage[citecmd=autocite, defaultindex]{icite}
543 % load bibliography.bib
544 \usebib{bibliography}
545
546 % load biblatex (with oxnotes, \autocite acts as \footcite)
547 \usepackage[style=oxnotes]{biblatex}
548 \addbibresource{bibliography.bib} % mind the extension here
549
550 % load imakeidx and use xindy to have the numbers sorted properly
551 \usepackage[xindy]{imakeidx}
552 \makeindex[name=loccit, title=Index of passages cited]
553\end{code}
554% \iffalse
555%</example>
556% \fi
557%
558% Then \cs{icite} can be used like so:--- %
559% \iffalse
560%<*example>
561% \fi
562\begin{example}
563 \section*{\cs{icite} in action}
564 Let us start with four citations of the same reference, to make sure
565 that they are all indexed and sorted properly:
566 one\icite[123]{Ullmann1970}, two,\icite[231]{Ullmann1970}
567 three,\icite[81]{Ullmann1970} and four.\icite[18]{Ullmann1970}
568
569 Let us continue with four other citations out of two other
570 references: one,\icite[90]{Bürgel2016} two,\icite[370]{Dols1987}
571 three,\icite[205]{Bürgel2016} and four.\icite[380]{Dols1987}
572
573 Finally, let us have \cs{icite} use \cs{textcite} to cite
574 \icite[123]{Endress1992}[textcite], and again, this time in a
575 footnote.\icite[86]{Endress1992}
576\end{example}
577% \iffalse
578%</example>
579% \fi
580%
581% The resulting \emph{Index of passages cited} can be found below
582% (\vref{ind:loccit} \vpageref{ind:loccit}). As can be seen from the
583% bibliography generated in the footnotes, \package{icite} prints as
584% expected the abbridged forms of the titles when they are
585% available. Furthermore, as a default citation command set in the
586% preamble, the \enquote*{oxnotes} Bib\LaTeX\ option of
587% \package{biblatex-oxref} style package makes \cs{autocite} behave
588% like \cs{footcite}. Finally, the page numbers in the index are
589% sorted properly: for example, two-digit numbers, like 81, are listed
590% before 123.
591%
592% \section{Refined use}
593%
336% 594%
337% \printindex[loccit] 595% \printindex[loccit]
338% \printbibliography[heading=bibnumbered]
339% 596%
340%\StopEventually{} 597%\StopEventually{}
341% 598%