diff options
author | Norbert Preining <norbert@preining.info> | 2019-09-02 13:46:59 +0900 |
---|---|---|
committer | Norbert Preining <norbert@preining.info> | 2019-09-02 13:46:59 +0900 |
commit | e0c6872cf40896c7be36b11dcc744620f10adf1d (patch) | |
tree | 60335e10d2f4354b0674ec22d7b53f0f8abee672 /macros/latex/contrib/icite |
Initial commit
Diffstat (limited to 'macros/latex/contrib/icite')
-rw-r--r-- | macros/latex/contrib/icite/Makefile | 113 | ||||
-rw-r--r-- | macros/latex/contrib/icite/README.md | 112 | ||||
-rw-r--r-- | macros/latex/contrib/icite/icite.dtx | 1418 | ||||
-rw-r--r-- | macros/latex/contrib/icite/icite.ins | 71 | ||||
-rw-r--r-- | macros/latex/contrib/icite/icite.pdf | bin | 0 -> 237025 bytes | |||
-rw-r--r-- | macros/latex/contrib/icite/samples/bibsample.bib | 46 | ||||
-rw-r--r-- | macros/latex/contrib/icite/samples/icite-biblatex.pdf | bin | 0 -> 60828 bytes | |||
-rw-r--r-- | macros/latex/contrib/icite/samples/icite-biblatex.tex | 102 | ||||
-rw-r--r-- | macros/latex/contrib/icite/samples/icite-minimal.pdf | bin | 0 -> 42307 bytes | |||
-rw-r--r-- | macros/latex/contrib/icite/samples/icite-minimal.tex | 72 | ||||
-rw-r--r-- | macros/latex/contrib/icite/samples/icite-nobiblatex.pdf | bin | 0 -> 57312 bytes | |||
-rw-r--r-- | macros/latex/contrib/icite/samples/icite-nobiblatex.tex | 100 |
12 files changed, 2034 insertions, 0 deletions
diff --git a/macros/latex/contrib/icite/Makefile b/macros/latex/contrib/icite/Makefile new file mode 100644 index 0000000000..35bf3e4a63 --- /dev/null +++ b/macros/latex/contrib/icite/Makefile @@ -0,0 +1,113 @@ +NAME = icite +SHELL = bash +PWD = $(shell pwd) +VERS = $(shell ltxfileinfo -v $(NAME).dtx|sed -e 's/^v//') +LOCAL = $(shell kpsewhich --var-value TEXMFLOCAL) +UTREE = $(shell kpsewhich --var-value TEXMFHOME) + +exts := md bib ins dtx html +texsamples := $(basename $(wildcard $(PWD)/samples/*.tex)) +findopts := $(foreach ext,$(exts),-or -iname "*.$(ext)") + + +# Look into this later +# $(if $(wildcard $(PWD)/TMP/$(notdir $1).bcf),biber $(PWD)/TMP/$(notdir $1),) + +define dosamples + lualatex --output-dir=$(PWD)/TMP --shell-escape $1 >/dev/null + lualatex --output-dir=$(PWD)/TMP --shell-escape $1 >/dev/null + if [ -f $(PWD)/TMP/$(notdir $1)-primary.idx ]; \ + then texindy -M $(PWD)/TMP/$(notdir $1).xdy $(PWD)/TMP/$(notdir $1)-primary.idx >/dev/null; fi + if [ -f $(PWD)/TMP/$(notdir $1).bcf ]; then biber $(PWD)/TMP/$(notdir $1) >/dev/null; fi + lualatex --output-dir=$(PWD)/TMP --shell-escape $1 >/dev/null + lualatex --output-dir=$(PWD)/TMP --shell-escape $1 >/dev/null +endef + +all: $(NAME).pdf +# test -e README.md || exit 0 +$(NAME).pdf: $(NAME).dtx + @ echo "Make documentation..." + lualatex --shell-escape --recorder --interaction=batchmode $(NAME).dtx >/dev/null + biber $(NAME) >/dev/null + lualatex --shell-escape --recorder --interaction=batchmode $(NAME).dtx >/dev/null + if [ -f $(NAME).glo ]; then makeindex -q -s gglo.ist -o $(NAME).gls $(NAME).glo; fi + if [ -f $(NAME).idx ]; then makeindex -q -s gind.ist -o $(NAME).ind $(NAME).idx; fi + if [ -f loccit.idx ]; then texindy -M icite.xdy loccit.idx >/dev/null; fi + if [ -f primary.idx ]; then texindy -M icite.xdy primary.idx >/dev/null; fi + lualatex --shell-escape --recorder --interaction=nonstopmode $(NAME).dtx > /dev/null + lualatex --shell-escape --recorder --interaction=nonstopmode $(NAME).dtx > /dev/null + @ echo "Make sample files..." + if [ ! -d $(PWD)/TMP ]; then mkdir $(PWD)/TMP; fi + cp $(PWD)/samples/*.bib $(PWD)/TMP + $(foreach file,$(texsamples), $(call dosamples, $(file))) + mv TMP/*.pdf samples/ + +samples: + if [ ! -d $(PWD)/TMP ]; then mkdir $(PWD)/TMP; fi + cp $(PWD)/samples/*.bib $(PWD)/TMP + $(foreach file,$(texsamples), $(call dosamples, $(file))) + mv TMP/*.pdf samples/ + +lualatex: + lualatex --shell-escape --recorder --interaction=batchmode $(NAME).dtx >/dev/null + +clean: lualatex + rm -f $(NAME).bib $(PWD)/TMP/*.bib + rm -rf .backup + find -iname "*~" -or -iname "*.pdf" | xargs rm -rf + find ./* -type f -iname "Makefile" $(findopts) > ls-R + find ./* -type f -iname "*.tex" | grep '/samples/' >> ls-R + rsync -avPr --files-from=ls-R . .backup + rm -rf * + cp -p -r .backup/* . + rm -rf .backup + pandoc -s README.md -o about.html + +distclean: clean uninst + +inst: uninst all + mkdir -p $(UTREE)/{tex,source,doc}/latex/$(NAME) + cp $(NAME).dtx $(UTREE)/source/latex/$(NAME) + cp $(NAME).sty $(UTREE)/tex/latex/$(NAME) + cp $(NAME).pdf $(UTREE)/doc/latex/$(NAME) + +local: uninst + lualatex $(NAME).ins + mkdir -p $(UTREE)/{tex,source,doc}/latex/$(NAME) + cp $(NAME).sty $(UTREE)/tex/latex/$(NAME) + +uninst: + rm -rf $(UTREE)/{tex,source,doc}/latex/$(NAME) + +install: all + sudo mkdir -p $(LOCAL)/{tex,source,doc}/latex/$(NAME) + sudo cp $(NAME).dtx $(LOCAL)/source/latex/$(NAME) + sudo cp $(NAME).sty $(LOCAL)/tex/latex/$(NAME) + sudo cp $(NAME).pdf $(LOCAL)/doc/latex/$(NAME) + +uninstall: + rm -rf $(LOCAL)/{tex,source,doc}/latex/$(NAME) + +zip: all + ln -sf . $(NAME) + zip -Drq $(PWD)/$(NAME)-$(VERS).zip $(NAME)/{samples,README.md,$(NAME).{pdf,dtx,ins}} + rm $(NAME) + +package: distclean all + mkdir $(NAME)/ + cp Makefile README.md $(NAME).{dtx,ins,pdf} $(NAME)/ + cp -r samples/ $(NAME)/ + mkdir -p tex/latex/$(NAME)/ + cp $(NAME).sty tex/latex/$(NAME)/ + mkdir -p doc/latex/$(NAME)/ + cp $(NAME).pdf doc/latex/$(NAME)/ + cp -r samples/ doc/latex/$(NAME)/ + mkdir -p source/latex/$(NAME)/ + cp Makefile README.md $(NAME).{dtx,ins} source/latex/$(NAME)/ + # zip -r $(NAME).tds.zip tex doc source + rm -rf tex/ source/ doc/ + # tar czf $(NAME)-$(VERS).tar.gz $(NAME).tds.zip $(NAME)/ + tar czf $(NAME)-$(VERS).tar.gz $(NAME)/ + rm -rf $(NAME)/ + +.PHONY: all lualatex clean distclean inst local uninst install uninstall zip package samples diff --git a/macros/latex/contrib/icite/README.md b/macros/latex/contrib/icite/README.md new file mode 100644 index 0000000000..05846e536a --- /dev/null +++ b/macros/latex/contrib/icite/README.md @@ -0,0 +1,112 @@ +--- +author: +- Robert Alessi +title: 'The icite package – README file' +--- + +Overview +======== + +`icite` is designed to produce from BibTeX or BibLaTeX bibliographical +databases the different indices of authors and works cited which are +called _indices locorum citatorum_. It relies on a specific +`\icite` command and can operate with either BibTeX or BibLaTeX. + +License and disclamer +===================== + +icite – Indices locorum citatorum + +Copyright ⓒ 2019 Robert Alessi + +Please send error reports and suggestions for improvements to Robert +Alessi: + +- email: <alessi@robertalessi.net> + +- website: <http://www.robertalessi.net/icite> + +- comments, feature requests, bug reports: + <https://gitlab.com/ralessi/icite/issues> + +This program is free software: you can redistribute it and/or modify it +under the terms of the GNU General Public License as published by the +Free Software Foundation, either version 3 of the License, or (at your +option) any later version. + +This program is distributed in the hope that it will be useful, but +WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General +Public License for more details. + +You should have received a copy of the GNU General Public License along +with this program. If not, see <http://www.gnu.org/licenses/>. + +This release of icite consists of the following source files: + +- `icite.dtx` + +- `icite.ins` + +- `Makefile` + +License applicable to the documentation +--------------------------------------- + +Copyright ⓒ 2019 Robert Alessi + +The documentation file `icite.pdf` that is generated from the +`icite.dtx` source file is licensed under the Creative Commons +Attribution-ShareAlike 4.0 International License. To view a copy of this +license, visit <http://creativecommons.org/licenses/by-sa/4.0/> or send +a letter to Creative Commons, PO Box 1866, Mountain View, CA 94042, USA. + +Installation +============ + +1. Run `'latex icite.ins'` to produce the `icite.sty` + file; + +2. To finish the installation you have to move the `icite.sty` file into + a directory where LaTeX can find them. See the FAQ on `texfaq.org` + at <https://texfaq.org/FAQ-inst-wlcf> for more on this. + +Development, Git Repository +=========================== + +Browse the code +--------------- + +You can browse icite repository on the web: +<http://git.robertalessi.net/icite> + +From this page, you can download all the releases of `icite`. For +instructions on how to install `icite`, please see above. + +Comments, Feature requests, Bug Reports +--------------------------------------- + +<https://gitlab.com/ralessi/icite/issues> + +Download the repository +----------------------- + +`icite` development is facilitated by git, a distributed version +control system. You will need to install git (most GNU/Linux +distributions package it in their repositories). + +Use this command to download the repository + + git clone http://git.robertalessi.net/icite + +A new directory named icite will have been created, containing +`icite`. + +Git hosting +----------- + +Make an account on <https://gitlab.com> and navigate (while logged in) +to <https://gitlab.com/ralessi/icite>. Click *Fork* and you will +have in your account your own repository of `icite` where you will +be able to make whatever changes you like to. + diff --git a/macros/latex/contrib/icite/icite.dtx b/macros/latex/contrib/icite/icite.dtx new file mode 100644 index 0000000000..1e61a15d9c --- /dev/null +++ b/macros/latex/contrib/icite/icite.dtx @@ -0,0 +1,1418 @@ +% \iffalse meta-comment +% vim: textwidth=75 +%<*internal> +\iffalse +%</internal> +%<*readme> +--- +author: +- Robert Alessi +title: 'The icite package – README file' +--- + +Overview +======== + +`icite` is designed to produce from BibTeX or BibLaTeX bibliographical +databases the different indices of authors and works cited which are +called _indices locorum citatorum_. It relies on a specific +`\icite` command and can operate with either BibTeX or BibLaTeX. + +License and disclamer +===================== + +icite – Indices locorum citatorum + +Copyright ⓒ 2019 Robert Alessi + +Please send error reports and suggestions for improvements to Robert +Alessi: + +- email: <alessi@robertalessi.net> + +- website: <http://www.robertalessi.net/icite> + +- comments, feature requests, bug reports: + <https://gitlab.com/ralessi/icite/issues> + +This program is free software: you can redistribute it and/or modify it +under the terms of the GNU General Public License as published by the +Free Software Foundation, either version 3 of the License, or (at your +option) any later version. + +This program is distributed in the hope that it will be useful, but +WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General +Public License for more details. + +You should have received a copy of the GNU General Public License along +with this program. If not, see <http://www.gnu.org/licenses/>. + +This release of icite consists of the following source files: + +- `icite.dtx` + +- `icite.ins` + +- `Makefile` + +License applicable to the documentation +--------------------------------------- + +Copyright ⓒ 2019 Robert Alessi + +The documentation file `icite.pdf` that is generated from the +`icite.dtx` source file is licensed under the Creative Commons +Attribution-ShareAlike 4.0 International License. To view a copy of this +license, visit <http://creativecommons.org/licenses/by-sa/4.0/> or send +a letter to Creative Commons, PO Box 1866, Mountain View, CA 94042, USA. + +Installation +============ + +1. Run `'latex icite.ins'` to produce the `icite.sty` + file; + +2. To finish the installation you have to move the `icite.sty` file into + a directory where LaTeX can find them. See the FAQ on `texfaq.org` + at <https://texfaq.org/FAQ-inst-wlcf> for more on this. + + +Development, Git Repository +=========================== + +Browse the code +--------------- + +You can browse icite repository on the web: +<http://git.robertalessi.net/icite> + +From this page, you can download all the releases of `icite`. For +instructions on how to install `icite`, please see above. + +Comments, Feature requests, Bug Reports +--------------------------------------- + +<https://gitlab.com/ralessi/icite/issues> + +Download the repository +----------------------- + +`icite` development is facilitated by git, a distributed version +control system. You will need to install git (most GNU/Linux +distributions package it in their repositories). + +Use this command to download the repository + + git clone http://git.robertalessi.net/icite + +A new directory named icite will have been created, containing +`icite`. + +Git hosting +----------- + +Make an account on <https://gitlab.com> and navigate (while logged in) +to <https://gitlab.com/ralessi/icite>. Click *Fork* and you will +have in your account your own repository of `icite` where you will +be able to make whatever changes you like to. + +%</readme> +%<*internal> +\fi +\def\nameofplainTeX{plain} +\ifx\fmtname\nameofplainTeX\else + \expandafter\begingroup +\fi +%</internal> +%<*install> +\input docstrip.tex +\keepsilent +\askforoverwritefalse +\preamble + +Copyright (C) 2019 by Robert Alessi <alessi@robertalessi.net> + +Please send error reports and suggestions for improvements to Robert +Alessi <alessi@robertalessi.net> + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 3 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, but +WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see +<http://www.gnu.org/licenses/>. + +This work consists of the file icite.dtx, icite.ins and a Makefile. +Running "make" generates the derived files README.md, icite.pdf and icite.sty. +Running "make inst" installs the files in the user's TeX tree. +Running "make install" installs the files in the local TeX tree. + +\endpreamble + +\usedir{tex/latex/icite} +\generate{ + \file{\jobname.sty}{\from{\jobname.dtx}{package}} +} +%</install> +%<install>\endbatchfile +%<*internal> +\usedir{source/latex/icite} +\generate{ + \file{\jobname.ins}{\from{\jobname.dtx}{install}} +} +\nopreamble\nopostamble +\usedir{doc/latex/icite} +\generate{ + \file{README.md}{\from{\jobname.dtx}{readme}} +} +\ifx\fmtname\nameofplainTeX + \expandafter\endbatchfile +\else + \expandafter\endgroup +\fi +%</internal> +% \fi +% +% \iffalse +%<*driver> +\ProvidesFile{icite.dtx} +%</driver> +%<package>\NeedsTeXFormat{LaTeX2e}[1999/12/01] +%<package>\ProvidesPackage{icite} +%<*package> + [2019/03/17 v1.2 Make Indices locorum citatorum] +%</package> +%<*driver> +\documentclass{ltxdoc} +\usepackage{filecontents} +\begin{filecontents*}{\jobname.xdy} +(merge-rule "\*" "" :eregexp) +(markup-locclass-list :open "\tabto{3.5cm}" :sep ", ") +\end{filecontents*} +\begin{filecontents*}{\jobname.bib} +@Book{Aristotle:Politica, + title = {Politica}, + date = 1964, + author = {Aristotle}, + editor = {Ross, W. D.}, + origdate = 1957, + entrysubtype = {classical}, + publisher = {Clarendon Press}, + location = {Oxford} +} + +@Book{Bürgel2016, + shorttitle = {Ärztliches Leben\ldots}, + editortype = {reviser}, + editor = {Käs, Fabian}, + number = 135, + series = {Islamic History and Civilization}, + location = {Leiden}, + publisher = {Brill}, + date = 2016, + title = {Ärztliches Leben und Denken im arabischen + Mittelalter}, + author = {Bürgel, Johann Christoph} +} + +@Software{classics, + title = {The Classics package}, + subtitle = {Cite classic works}, + author = {Lourenço de Lima, Eduardo C.}, + publisher = {CTAN}, + url = {http://www.ctan.org/pkg/classics}, + date = {2013-02-02}, + version = {0.1} +} + +@Article{Dols1987, + author = {Dols, Michael W.}, + title = {The Origins of the Islamic Hospital: Myth and + Reality}, + shorttitle = {The Origins of the Islamic Hospital}, + journaltitle = {Bulletin of the History of Medicine}, + date = 1987, + volume = 61, + pages = {367--390} +} + +@InBook{Endress1992, + title = {Die Wissenschaftliche Literatur}, + date = 1992, + author = {Endress, Gerhard}, + booktitle = {Grundriß der arabischen Philologie}, + editor = {Fisher, Wolfdietrich}, + volume = 3, + note = {Supplement}, + publisher = {Reichert}, + location = {Wiesbaden}, + pages = {3--152} +} + +@Book{IAUMuller, + sortname = {Ibn abi Usaybia}, + editor = {Müller, August}, + author = {\prname{ibn 'abI 'u.saybi`aT}}, + shorteditor = {Müller}, + date = {1882/1884}, + title = {\arb[trans]{\uc{`u}yUn al-'anbA' fI .tabaqAt + al-'a.tibbA'}}, + shorttitle = {\arb[trans]{\uc{`u}yUn al-'anbA'}}, + shorthand = {\prname{ibn 'abI 'u.saybi`aT}, + \arb[trans]{\uc{`u}yUn al-'anbA'}}, + entrysubtype = {classical}, + location = {Königsberg and Cairo}, + volumes = 2 +} + +@Software{imakeidx, + title = {The Imakeidx package}, + subtitle = {A package for producing multiple indexes}, + author = {Gregorio, Enrico and Beccari, Claudio}, + publisher = {CTAN}, + url = {http://www.ctan.org/pkg/imakeidx}, + date = {2016-10-15}, + version = {1.3e} +} + +@Book{RaziShukuk, + author = {\prname{al-rAziyy}, \prname{mu.hammad ibn + zakariyyA'}}, + title = {\arb[trans]{\uc{k}itAb al-^sukUk `al_A + \uc{^g}AlInUs}}, + indextitle = {\arb[trans]{\uc{^s}ukUk}}, + sortname = {Razi}, + date = 1993, + shorthand = {\prname{al-rAziyy}, \arb[trans]{\uc{^s}ukUk}}, + editor = {Mehdi Mohaghegh}, + publisher = {International Institute of Islamic Thought and + Civilization}, + location = {Tehran}, + entrysubtype = {classical} +} + +@Book{Ullmann1970, + location = {Leiden}, + publisher = {Brill}, + title = {Die Medizin im Islam}, + date = 1970, + author = {Ullmann, Manfred}, +} + +@MVBook{al-Nadim, + author = {\prname{ibn al-nadIm}}, + title = {\arb[trans]{\uc{f}ihrist}}, + sortname = {Ibn al-Nadim}, + date = {1871/1872}, + shorthand = {\arb[trans]{\uc{f}ihrist}}, + editor = {Flügel, Gustav}, + volumes = 2, + location = {Leipzig}, + entrysubtype = {classical} +} + +@Book{al-Qifti, + sortname = {Ibn al-Qifti}, + entrysubtype = {classical}, + shorthand = {\prname{al-qif.tiyy}, \arb[trans]{\uc{t}a'rI_h}}, + location = {Leipzig}, + editor = {Lippert, Julius}, + date = 1903, + title = {\arb[trans]{\uc{t}a'rI_h al-.hukamA'}}, + author = {\prname{ibn al-qif.tiyy}} +} + +@Software{usebib, + title = {The Usebib package}, + subtitle = {A simple bibliography processor}, + author = {Gregorio, Enrico}, + publisher = {CTAN}, + url = {http://www.ctan.org/pkg/usebib}, + date = {2012-04-13}, + version = {1.0a} +} +\end{filecontents*} +\usepackage[english]{babel} +\usepackage[letterpaper,margin=25mm,left=50mm,nohead]{geometry} +\usepackage{fontspec} +\setmainfont{Old Standard}[RawFeature={+ss05;+ss06}] +\usepackage{newunicodechar} +\newunicodechar{ǧ}{ǧ} % Old Standard does not include ǧ/Ǧ +\newunicodechar{Ǧ}{Ǧ} % +\usepackage{arabluatex} +\SetTranslitConvention{loc} +\usepackage{xurl} +\usepackage{uri} +\usepackage{hyperxmp} +\usepackage{varioref} +\usepackage[numbered]{hypdoc} +\hypersetup{unicode=true, colorlinks, allcolors=blue, + linktocpage=true, pdfauthor={Robert Alessi}, pdftitle={The + icite package}, pdfcontactemail={alessi@robertalessi.net}, + pdfcontacturl={http://www.robertalessi.net/icite}, + pdfcopyright={Copyright (C) 2019 Robert Alessi + <alessi@robertalessi.net>. This document is licensed under the + Creative Commons Attribution-ShareAlike 4.0 International + License. To view a copy of this license, visit + http://creativecommons.org/licenses/by-sa/4.0/ or send a letter to + Creative Commons, PO Box 1866, Mountain View, CA 94042, USA.}, + pdflicenseurl={https://creativecommons.org/licenses/by-sa/4.0/legalcode}, + pdfmetalang={en-US}, pdftype={Text}, pdfkeywords={bibtex, biblatex, + indexing}} +\usepackage{amsmath} +\usepackage{cleveref} +\CodelineIndex +\usepackage[citecmd=autocite,defaultindex]{\jobname} +\IndexSubtypeAs{classical}{primary} +\bibinput{icite} +\usepackage[nonewpage,xindy]{imakeidx} +\newcommand{\donothing}[1]{} +\indexsetup{level=\donothing} +\makeindex +\makeindex[name=loccit] +\makeindex[name=primary] +\usepackage{needspace} +\usepackage{tabto} +\usepackage{classics} +\newclassic{iau}{\classicsRoman{#1}|, #1|.#1} +\newclassic{razi}{#1|.#1} +\newclassic{nadim}{\classicsRoman{#1}|.#1|, #1} +\newclassic{aristotle}{#1|\textit{#1}|#1} +\usepackage[scale=1.5]{ccicons} +\usepackage{dox} +\doxitem{Option}{option}{options} +\usepackage{enumitem} +\setlist{nosep} +\setlist[itemize]{label=\textendash} +\setlist[enumerate,1]{label=(\alph*)} +\setlist[enumerate,2]{label=\roman*.} +\usepackage[lot]{multitoc} +\usepackage{nameref} +\usepackage{csquotes} +\usepackage[style=oxnotes, hyperref=false]{biblatex} +\DeclareFieldFormat{postnote}{\mkpageprefix[pagination][\mknormrange]{#1}} +\addbibresource{icite.bib} +\usepackage{hologo,metalogox} +\usepackage{relsize} +\usepackage{units} +\usepackage{minted} +\usepackage[contents]{colordoc} +\newcommand{\package}[1]{\textsf{#1}\index{#1=#1 (package)}} +\usepackage{tikz} +\usepackage[breakable, skins, xparse, minted]{tcolorbox} +\tcbset{colback=white, boxrule=.15mm, colframe=red!50!white, + breakable} +\newtcblisting{example}{minted options={linenos, numbersep=0mm}} +\newtcblisting{code}{minted options={linenos, numbersep=0mm}, listing + only} +\usepackage{etoc} +\etocsettocdepth{paragraph} +\newcommand{\icitetableofcontents}{% + \begingroup + \etocsetstyle{section}{}{} + {\etocsavedsectiontocline{% + \numberline{\etocnumber}\etocname}{\etocpage}}{} + \etocsetstyle{subsection}{}{} + {\etocsavedsubsectiontocline{% + \numberline{\etocnumber}\etocname}{\etocpage}}{}% + \etocsetstyle{subsubsection}{}{} + {\etocsavedsubsubsectiontocline{% + \numberline{\etocnumber}\etocname}{\etocpage}}{}% + \etocsetstyle{paragraph}{}{\leftskip2cm\rightskip 2.2em \parfillskip + 0pt plus 1fil\relax \nobreak} + {\noindent\etocname{} \etocpage{} }{\par}% + \etocmulticolstyle[2]{\section*{Contents}} + \pdfbookmark[1]{Contents}{toc} + \tableofcontents + \endgroup} +\EnableCrossrefs + %\CodelineIndex +\RecordChanges + %\OnlyDescription +\begin{document} + \DocInput{\jobname.dtx} + \PrintChanges + \section{Index} + \indexprologue{Numbers written in italic refer to the page where the + corresponding entry is described; numbers underlined refer to the + code line of the definition; numbers in roman refer to the code + lines where the entry is used.} + \printindex + %\PrintIndex +\end{document} +%</driver> +% \fi +% +% \CheckSum{352} +% +% \CharacterTable +% {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 +% 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 +% Digits \0\1\2\3\4\5\6\7\8\9 +% Exclamation \! Double quote \" Hash (number) \# +% Dollar \$ Percent \% Ampersand \& +% Acute accent \' Left paren \( Right paren \) +% Asterisk \* Plus \+ Comma \, +% Minus \- Point \. Solidus \/ +% Colon \: Semicolon \; Less than \< +% Equals \= Greater than \> Question mark \? +% Commercial at \@ Left bracket \[ Backslash \\ +% Right bracket \] Circumflex \^ Underscore \_ +% Grave accent \` Left brace \{ Vertical bar \| +% Right brace \} Tilde \~} +% +% \makeatletter +% \let\org@changes@\changes@ +% \def\my@changes v#1.#2.#3\@nil{% +% \org@changes@{v#1.\six@digits{#2}.#3=v#1.#2.#3}% +% }% +% \newcommand*{\six@digits}[1]{% +% \ifnum#1<100000 0\fi +% \ifnum#1<10000 0\fi +% \ifnum#1<1000 0\fi +% \ifnum#1<100 0\fi +% \two@digits{#1}% +% }% +% \renewcommand*{\changes@}[1]{% +% \my@changes#1.\@nil +% }% +% \makeatother +% +% \GetFileInfo{\jobname.dtx} +% \DoNotIndex{\newcommand,\newenvironment} +% +% \newcommand*{\NEWfeature}[1]{% +% \hskip 1sp \marginpar{\small\sffamily\raggedright +% New feature\\#1}} +% +% \title{\tcbox[colframe=black, enhanced, tikznode, drop lifted +% shadow, colback=white, boxrule=.25mm]{% +% The \textsf{icite} package\\ +% \emph{Indices locorum citatorum}\\ +% \fileversion\ --- \filedate}} +% +% \author{Robert Alessi \\ +% \href{mailto:alessi@robertalessi.net?Subject=icite package}% +% {\texttt{alessi@robertalessi.net}}} +% +% \date{} +% +% \maketitle +% \footnotesize +% \icitetableofcontents +% \normalsize +% +% \changes{v1.00}{2019/03/07}{First public release} +% +% \begin{abstract} +% \package{icite} is designed to produce from \hologo{BibTeX} or +% Bib\LaTeX\ bibliographical databases the different indices of +% authors and works cited which are called \emph{indices locorum +% citatorum}. It relies on a specific \cs{icite} command and can +% operate with either \hologo{BibTeX} or Bib\LaTeX. +% \end{abstract} +% +% \section*{License and disclamer} +% \addcontentsline{toc}{section}{License and disclamer} +% \subsection*{License applicable to the software} +% \label{sec:license-software} +% +% \package{icite} --- \emph{Indices locorum citatorum}\\ +% Copyright \textcopyright\ 2019 Robert Alessi +% +% Please send error reports and suggestions for improvements to Robert +% Alessi: +% \begin{itemize} +% \item email: \mailto[icite package]{alessi@roberalessi.net} +% \item website: \url{http://www.robertalessi.net/icite} +% \item development: \url{http://git.robertalessi.net/icite} +% \item comments, feature requests, bug reports: +% \url{https://gitlab.com/ralessi/icite/issues} +% \end{itemize} +% +% \marginpar{\texttt{gpl3+}} +% This program is free software: you can redistribute it and/or modify +% it under the terms of the GNU General Public License as published by +% the Free Software Foundation, either version 3 of the License, or +% (at your option) any later version. +% +% This program is distributed in the hope that it will be useful, but +% WITHOUT ANY WARRANTY; without even the implied warranty of +% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +% General Public License for more details. +% +% You should have received a copy of the GNU General Public License +% along with this program. If not, see +% <http://www.gnu.org/licenses/>. +% +% This release of \package{icite} consists of the following +% source files: +% \begin{itemize} +% \item |icite.dtx| +% \item |icite.ins| +% \item |Makefile| +% \end{itemize} +% +% \subsection*{License applicable to this document} +% \label{sec:documentation-license} +% Copyright \textcopyright\ 2019 Robert Alessi +% +% \ccbysa\marginpar{\texttt{CC BY-SA 4.0}} +% This document is licensed under the Creative Commons +% Attribution-ShareAlike 4.0 International License. To view a copy of +% this license, visit +% \url{http://creativecommons.org/licenses/by-sa/4.0/} or send a +% letter to Creative Commons, PO Box 1866, Mountain View, CA 94042, +% USA. +% +% \section{Introduction} +% \label{sec:introduction} +% Bib\LaTeX\ features a very powerful internal mechanism which +% supports indexing of citations and bibliographic entries and can be +% activated by a simple |indexing| option in the preamble. However, by +% default, only the authors and the works cited are inserted in the +% index. Furthermore, authors and works are indexed separately and +% only inserted in the global index that is generated by +% \cs{makeindex}. Another limitation is that the references are also +% excluded from the index. +% +% Notwithstanding these limitations, it is quite possible to typeset +% \emph{indices locorum citatorum} with Bib\LaTeX, but this remains an +% intricate business and requires knowing how to redefine and/or patch +% standard and internal Bib\LaTeX\ commands. +% +% The \package{icite} package is but a modest piece of software which +% addresses this situation. It relies on citation commands, but does +% not require Bib\LaTeX. Instead, \hologo{BibTeX} can be used as +% \package{icite} uses the \package{usebib} +% package\footnote{\cite{usebib}} to build the indices by drawing +% directly from the bibliographical database. +% +% +% \section[The \package{icite} package]{The \textsf{icite} package} +% The \package{icite} package is loaded as usual like so:--- +% \iffalse +%<*example> +% \fi +\begin{code} + \usepackage[<options>]{icite} +\end{code} +% \iffalse +%</example> +% \fi +% +% \package{icite} may be loaded with two optional \enquote*{named +% arguments} either of which is set using the syntax +% \meta{key}$=$\meta{value}. The description of the optional arguments +% follows:--- +% +% \DescribeOption{citecmd}\label{ref:citecmd} +% |citecmd|$=$\meta{command}\hfill\tcboxverb{Default: cite}\\ +% \meta{command} may be any citation command accepted by +% \hologo{BibTeX} or Bib\LaTeX. This option is used by the \cs{icite} +% command that is described below. By default, \cs{icite} uses the +% \cs{cite} command to insert citations in the body text. +% +% \DescribeOption{defaultindex} +% |defaultindex|$=$|none|\verb+|+\meta{index\_name}\hfill% +% \tcboxverb{Default: not set}\\ +% \meta{index\_name} is the name of the index in which all passages +% cited with the \cs{icite} command are to be found by default. As +% this option is not initally set, \cs{icite} naturally inserts cited +% passages in the default general index, unless |defaultindex| is set +% to the value |none|, in which case indexing is disabled. It must be +% noted that this named argument does not need a value as it defaults +% to |loccit| if it is used alone. This is an easy way to have all +% passages cited indexed in a separate index named |loccit|. +% +% \DescribeOption{nobibengine}\NEWfeature{v1.1} +% \changes{v1.1}{2019/03/12}{New global option \texttt{nobibengine}}% +% |nobibengine|$=$|true|\verb+|+|false|\hfill% +% \tcboxverb{Default: not set}\\ +% This named argument does not need a value as it defaults to |true| +% if it is used. When this option is activated, \package{icite} does +% not use \hologo{BibTeX} or Bib\LaTeX\ to insert the citations in the +% body text---even if either is loaded in the preamble---and pulls the +% necessary information directly from the bibliographical +% database. For this reason, \cs{bibinput} described below is of +% course still required. The citations inserted consist of the +% elements described below \vref{sec:entry-fields} +% \vpageref{sec:entry-fields}. However, it must be noted that if the +% entry field |shorthand| of any author/work be set in the database, +% it takes precedence over the fields used to define author names and +% titles. +% +% \paragraph{Bibliographical database} +% \DescribeMacro{\bibinput} Once \package{icite} is loaded, it must be +% connected to at least one bibliographic |.bib| file. To that end, +% \package{icite} uses the same \cs{bibinput} command as +% \package{usebib}.\footnote{Please refer to \cite[1]{usebib} for +% more detailed information on how to use this command.} An example +% follows:--- % +% \iffalse +%<*example> +% \fi +\begin{code} + % load icite, have \icite use \autocite by default, and insert cited + % passages in a separate index named 'loccit': + \usepackage[citecmd=autocite, defaultindex]{icite} + % note that the .bib file must be stripped of its extension: + \bibinput{bibliography} % that is: load bibliography.bib +\end{code} +% \iffalse +%</example> +% \fi +% +% \subsection{Preamble-only commands} +% The following commands may be found in the preamble only. +% \paragraph{Styling the titles} +% \DescribeMacro{\SetTitleStyle} By default, \package{icite} prints +% the titles of the works cited in italics.\\ +% \cs{SetTitleStyle}\marg{formatting directives} can be used in the +% preamble only to customize the way titles are displayed in the +% indices, like so:--- % +% \iffalse +%<*example> +% \fi +\begin{code} + \SetTitleStyle{\textbf{#1}} +\end{code} +% \iffalse +%</example> +% \fi +% As this example shows, |#1| is the token that is replaced with the +% actual title in the formatting directives of the \cs{SetTitleStyle} +% command. +% +% \paragraph{Delimiters} +% \NEWfeature{v1.2}\DescribeMacro{\AuthorTitleDelim} +% \cs{AuthorTitleDelim}\marg{delimiter} sets the delimiter between +% authors and titles in the body text when the |nobibengine| option is +% set to |true|. The default delimiter is a comma and a space. +% +% \DescribeMacro{\TitlePageDelim} +% \cs{TitlePageDelim}\marg{delimiter} sets the delimiter between +% titles and pages in the body text when the |nobibengine| option is +% set to |true|. The default delimiter is a comma and a space. +% +% \subsection[\textsf{icite} for the Impatient]% +% {\package{icite} for the Impatient} +% Read \href{samples/icite-minimal.pdf}{\texttt{icite-minimal.pdf}}. +% +% \subsection{Entry fields} +% \label{sec:entry-fields} +% \subsubsection{Author names} +% To process author names, \package{icite} uses the following entry +% fields: +% \begin{description} +% \item[author] As for example in |author = {Ullmann, Manfred}|, which +% is satisfactory in most cases. +% \item[indexauthor] This field is not set by Bib\LaTeX. However, it +% may be used as a fallback field for multiple or complex names. +% \item[sortname] This standard Bib\LaTeX\ which is never printed may +% be used to modify the sorting order of the index entries. +% \end{description} +% +% \paragraph{Example} +% From a given entry such as: \\[1ex]% +% |author = {|\prname{.hunayn ibn 'is.hAq al-`ibAdiyy, 'abU +% zayd}|}|\\[1ex]% +% it may prove useful to define an additional |indexauthor| field to +% have printed in the index only the relevant part of the name, like +% so: \\[1ex]% +% |indexauthor = {|\prname{.hunayn ibn 'is.hAq}|}| or +% |indexauthor = {|\prname{.hunayn}|}|\\[1ex] +% But in the end, the |sortname| field is also needed because the +% diacritics must be discarded so that the name be sorted +% properly:\\[1ex]% +% |sortname = {|Hunayn ibn Ishaq|}| +% +% \subsection{Titles} +% To process titles, \package{icite} uses the following entry fields: +% \begin{description} +% \item[title] The full title of the work. +% \item[shorttitle] The title in an abbriged form. If this entry is +% set, it takes precedence over the |title| field in the printed index. +% \item[indextitle] This field may be used to have a title such as +% \emph{The {\TeX}Book} printed in the index as \emph{{\TeX}Book, The}. +% \item[indexsorttitle] Like |sortname| for author names, this field is +% used for sorting only and is never printed. From the previous +% example, it may be used like so: \\% +% |indexsorttitle = {TEXBook}| +% \end{description} +% +% \section{Basic use} +% \DescribeMacro{\icite} \package{icite} provides the \cs{icite} +% command which both inserts a formatted citation in the body text and +% an entry corresponding to the passage cited in the index. This +% command is to be used in place of any \hologo{BibTeX} or Bib\LaTeX\ +% citation command the syntax of which is +% \cs{command}\oarg{pre}\oarg{post}\marg{key}. It must be noted that +% only standard citation commands are supported, with the exception of +% those mentioned as qualified citation lists or so-called +% \enquote*{multicite} commands. The full syntax of \cs{icite} +% follows:--- % +% \iffalse +%<*example> +% \fi +\begin{code} + \icite[<pre>][<post>]{<key>}[<command>] +\end{code} +% \iffalse +%</example> +% \fi +% Where \oarg{command} can be used as a further optional argument to +% specify a standard citation command that \cs{icite} should emulate +% instead of the default \cs{cite} command or any other command set as +% default in the preamble by means of the |citecmd| global +% option.\footnote{See above, \vref{ref:citecmd}.} +% +% \paragraph{Example} The following example illustrates how +% \package{icite} can be used in combination with Bib\LaTeX\ and the +% \package{imakeidx} package to have the passages cited sorted and +% printed in a separate, specific \enquote*{Index of Passages +% Cited}:--- % +% \iffalse +%<*example> +% \fi +\begin{code} + % preamble + % load icite, have \icite use \autocite by default, and insert cited + % passages in a separate index named 'loccit': + \usepackage[citecmd=autocite, defaultindex]{icite} + % load bibliography.bib + \bibinput{bibliography} + + % load biblatex (with oxnotes, \autocite acts as \footcite) + \usepackage[style=oxnotes]{biblatex} + \addbibresource{bibliography.bib} % mind the extension here + + % load imakeidx and use xindy to have the numbers sorted properly + \usepackage[xindy]{imakeidx} + \makeindex[name=loccit, title=Index of Passages Cited (modern authors)] +\end{code} +% \iffalse +%</example> +% \fi +% +% Then \cs{icite} can be used like so:--- % +% \iffalse +%<*example> +% \fi +\begin{code} + \section*{\cs{icite} in action} + Let us start with four citations of the same reference, to make sure + that they are all indexed and sorted properly: + one\icite[123]{Ullmann1970}, two\icite[231]{Ullmann1970}, + three\icite[81]{Ullmann1970} and four\icite[18]{Ullmann1970}. + + Let us continue with four other citations out of two other + references: one\icite[90]{Bürgel2016}, two\icite[370]{Dols1987}, + three\icite[205]{Bürgel2016} and four\icite[380]{Dols1987}. + + Finally, let us have \cs{icite} use \cs{textcite} to cite + \icite[123]{Endress1992}[textcite], and again, this time in a + footnote\icite[86]{Endress1992}. +\end{code} +% \iffalse +%</example> +% \fi +% +% \begin{tcblisting}{text only} +% \section*{\cs{icite} in action} +% Let us start with four citations of the same reference, to make +% sure that they are all indexed and sorted properly: +% one\icite[123]{Ullmann1970}, two\icite[231]{Ullmann1970}, +% three\icite[81]{Ullmann1970} and four\icite[18]{Ullmann1970}. +% +% Let us continue with four other citations out of two other +% references: one\icite[90]{Bürgel2016}, two\icite[370]{Dols1987}, +% three\icite[205]{Bürgel2016} and four\icite[380]{Dols1987}. +% +% Finally, let us have \cs{icite} use \cs{textcite} to cite +% \icite[123]{Endress1992}[textcite], and again, this time in a +% footnote\icite[86]{Endress1992}. +% \end{tcblisting} +% +% All indices and the contents of the \hologo{BibTeX} file that has +% been used can be found below in the appendix +% (\vrefrange{ref:indices}{ref:icite-bib} respectively). As can be +% seen by comparing the bibliography generated in the footnotes with +% the text printed in the index, \package{icite} prints as expected +% the abbridged forms of the titles when they are +% available. Furthermore, as a default citation command set in the +% preamble, the \enquote*{oxnotes} Bib\LaTeX\ option of +% \package{biblatex-oxref} style package makes \cs{autocite} behave +% like \cs{footcite}. Finally, the page numbers in the index are +% sorted properly: for example, two-digit numbers, like 81, are listed +% before 123. +% +% \section{Refined use} +% When references are made not only to modern authors but also to +% authors and works from classical antiquity or from the Middle Ages, +% it is commonly agreed that at least two separate indices of passages +% cited should be made. Another option is not to index passages cited +% from modern authors at all. +% +% \DescribeMacro{\IndexSubtypeAs} \package{icite} is able to +% differentiate between sources by drawing from the bibliographical +% database the exact string that may be found in the |entrysubtype| +% entry field. To that end, the \cs{IndexSubtypeAs} command is +% provided. It takes to mandatory arguments, like so:--- % +% \iffalse +%<*example> +% \fi +\begin{code} + \IndexSubtypeAs{<subtype>}{<index_name>} +\end{code} +% \iffalse +%</example> +% \fi +% Where |<subtype>| is any given string used to specify an +% |entrysubtype| in the bibliographical database, and |<index_name>| +% the name of the index which the authors matching that subtype must +% go into. This command is to be found in the preamble only. +% +% Of course different subtypes can be associated with a single index +% or with different indices. That said, one should keep in mind that +% any entry the actual subtype of which is not associated with an +% index is processed as if it had no subtype at all. Examples +% follow:--- % +% \iffalse +%<*example> +% \fi +\begin{code} + % load icite, and have cited authors indexed in an index named + % 'secondary': + \usepackage[defaultindex=secondary]{icite} + % except for authors whose 'entrysubtype' field matches the string + % 'classical': have them indexed in an index named 'primary': + \IndexSubtypeAs{classical}{primary} + % authors whose 'entrysubtype' field matches the string 'medieval' + % should go into the same index: + \IndexSubtypeAs{medieval}{primary} +\end{code} +% \iffalse +%</example> +% \fi +% Or: +% \iffalse +%<*example> +% \fi +\begin{code} + % load icite, but do not index passages cited with \icite: + \usepackage[defaultindex=none]{icite} + % except for authors whose 'entrysubtype' field matches the string + % 'classical': have them indexed in an index named 'primary': + \IndexSubtypeAs{classical}{primary} + % authors whose 'entrysubtype' field matches the string 'medieval' + % should go into the same index: + \IndexSubtypeAs{medieval}{primary} +\end{code} +% \iffalse +%</example> +% \fi +% +% \paragraph{Example} In the following example, modern authors, namely +% those whose |entrysubtype| field does not match the string +% |classical| should go into the default |loccit| index. As for those +% whose |entrysubtype| matches |classical|, they should to into an +% index named |primary|. \label{ref:classics-pkg}Furthermore, the +% \package{classics} package is used to format references in which a +% volume number is used.\footnote{For more information, see below +% \vref{sec:classics-usage}.} In this way, \package{xindy} only has +% numbers to handle:--- % +% \iffalse +%<*example> +% \fi +\begin{code} + % preamble + \usepackage[style=oxnotes]{biblatex} + \addbibresource{bibliography.bib} + + \usepackage[xindy]{imakeidx} + \makeindex[name=loccit, title=Index of passages cited (modern authors)] + \makeindex[name=primary, title=\emph{Index locorum citatorum}] + + \usepackage{classics} + \newclassic{iau}{\classicsRoman{#1}|, #1|.#1} + \newclassic{razi}{#1|.#1} + \newclassic{nadim}{\classicsRoman{#1}|.#1|, #1} + + \usepackage[citecmd=autocite,defaultindex]{icite} + \IndexSubtypeAs{classical}{primary} +\end{code} +% \iffalse +%</example> +% \fi +% +% Then \cs{icite} can be used like so:--- % +% \iffalse +%<*example> +% \fi +\begin{code} + \section*{\cs{icite} in action} + Let us start with four citations of the same reference, to make sure + that they are all indexed and sorted properly: + one\icite[123]{Ullmann1970}, two\icite[231]{Ullmann1970}, + three\icite[81]{Ullmann1970} and four\icite[18]{Ullmann1970}. + + Let us continue with four other citations out of two other + references: one\icite[90]{Bürgel2016}, two\icite[370]{Dols1987}, + three\icite[205]{Bürgel2016} and four\icite[380]{Dols1987}. + + Before concluding, let us insert a few references to medieval Arabic + authors: one\icite[\iau{1}[81][32]]{IAUMuller}, + two\icite[\razi{5}[7--10]]{RaziShukuk}, three\icite[133]{al-Qifti}, + four\icite[\nadim{3}[7][286]]{al-Nadim}, + five\icite[\iau{2}[214][20]]{IAUMuller}, + six\icite[\razi{1}[6--20]]{RaziShukuk}, + seven\icite[126.15--20]{al-Qifti} and + eight\icite[\nadim{3}[7][291]]{al-Nadim}. + + Finally, let us have \cs{icite} use \cs{textcite} to cite + \icite[123]{Endress1992}[textcite], and again, this time in a + footnote\icite[86]{Endress1992}. +\end{code} +% \iffalse +%</example> +% \fi +% +% \begin{tcblisting}{text only} +% \section*{\cs{icite} in action} +% Let us start with four citations of the same reference, to make +% sure that they are all indexed and sorted properly: +% one\icite[123]{Ullmann1970}, two\icite[231]{Ullmann1970}, +% three\icite[81]{Ullmann1970} and four\icite[18]{Ullmann1970}. +% +% Let us continue with four other citations out of two other +% references: one\icite[90]{Bürgel2016}, two\icite[370]{Dols1987}, +% three\icite[205]{Bürgel2016} and four\icite[380]{Dols1987}. +% +% Before concluding, let us insert a few references to medieval +% Arabic authors: one\icite[\iau{1}[81][32]]{IAUMuller}, +% two\icite[\razi{5}[7--10]]{RaziShukuk}, +% three\icite[133]{al-Qifti}, +% four\icite[\nadim{3}[7][286]]{al-Nadim}, +% five\icite[\iau{2}[214][20]]{IAUMuller}, +% six\icite[\razi{1}[6--20]]{RaziShukuk}, +% seven\icite[126.15--20]{al-Qifti} and +% eight\icite[\nadim{3}[7][291]]{al-Nadim}. +% +% Finally, let us have \cs{icite} use \cs{textcite} to cite +% \icite[123]{Endress1992}[textcite], and again, this time in a +% footnote\icite[86]{Endress1992}. +% \end{tcblisting} +% +% As already said above, all indices and the contents of the +% \hologo{BibTeX} file that has been used can be found below in the +% appendix (\vrefrange{ref:indices}{ref:icite-bib} respectively). As +% one can see, \prname{al-rAziyy} has been sorted under the letter R +% and references to classical works have been formatted properly. +% +% +% \subsection[The \textsf{classics} package]% +% {The \package{classics} package} % +% \label{sec:classics-usage} +% As said above \vpageref{ref:classics-pkg}, it is advisable to use +% the \package{classics} package to format volume, page, column, line +% numbers and the like which are inserted in the \meta{post} optional +% argument of the \cs{icite} command\autocite{classics}. An example of +% using \package{classics} to format references to Aristotle according +% to Bekker pagination follows:\footnote{See \cite[2]{classics} for +% more information.}--- % +% \iffalse +%<*example> +% \fi +\begin{code} + % preamble: + \usepackage{classics} + \newclassic{aristotle}{#1|\textit{#1}|#1} +\end{code} +% \iffalse +%</example> +% \fi +% \iffalse +%<*example> +% \fi +\begin{example} + In \emph{Politics}, Aristotle says that man is by nature a political + animal in the following passages: \aristotle{1253}[a][2--9] (Book~1) + and again in \aristotle{1278}[b][19] (Book~3). The latter passage + shows that one should read the whole section of Book~1 concerning + household management and the control of slaves + (\aristotle*{1253}[b][1]{1253}[b][39]). +\end{example} +% \iffalse +%</example> +% \fi +% The following prints the same body text while using \package{icite} +% to have the passages cited inserted in the \emph{Index locorum +% citatorum} (see below \vref{sec:index-loc-cit}):--- % +% \iffalse +%<*example> +% \fi +\begin{example} + In \emph{Politics}, Aristotle says that man is by nature a political + animal in the following passages: + \icite[\aristotle{1253}[a][2--9]]{Aristotle:Politica}[notecite] + (Book~1) and again in \icite[\aristotle{1278}[b][19]]% + {Aristotle:Politica}[notecite] (Book~3). The latter passage shows + that one should read the whole section of Book~1 concerning + household management and the control of slaves + \icite[\aristotle*{1253}[b][1]{1253}[b][39]]% + {Aristotle:Politica}[pnotecite]. +\end{example} +% \iffalse +%</example> +% \fi +% As can be seen, the \cs{notecite} and \cs{pnotecite} commands have +% been used to insert only the references in the body text. +% +% It is also advisable to use \package{xindy} to compile indices of +% passages cited because \package{xindy}, unlike \package{makeindex} +% or \package{xindex}, is able to sort numbers properly: for example, +% with \package{xindy}, such a number as 81 will come before 100, but +% will be sorted after 100 with the other two engines. +% \begin{tcblisting}{text only, title=Caveat} +% \package{xindy} (actually |texindy|) is also designed to ignore +% \TeX\ commands by default. However, due to a missing line in +% |xindy/modules/base/tex.xdy|,\footnote{As the time of writing, in +% \package{xindy} v2.5.1.} this does not apply to so-called +% \enquote*{starred} \TeX\ commands, such as \cs{aristotle*} from +% the example above. +% \end{tcblisting} +% One easy way to get around this issue is to create a style file with +% a single line that instructs \package{xindy} to ignore the asterisk +% when processing the index, like so:--- % +% \iffalse +%<*example> +% \fi +\begin{tcblisting}{minted language=lisp, listing only, title=icite.xdy} + (merge-rule "\*" "" :eregexp) +\end{tcblisting} +% \iffalse +%</example> +% \fi +% +% The following example shows how this simple rule can be +% applied:--- % +% \iffalse +%<*example> +% \fi +\begin{code} + % preamble: + \usepackage[xindy]{imakeidx} + \makeindex[name=loccit, options=-M icite.sty] + % document: + \printindex[loccit] +\end{code} +% \iffalse +%</example> +% \fi +% Of course, the document itself must be compiled with +% |--shell-escape|.\footnote{See \cite[2--4]{imakeidx}.} +% +% \section{Appendix} +% Designing the layout of indices is out of the scope of this +% documentation. For information, the \package{tabto} package has been +% used in the preamble in combination with the following |xindy| style +% file:--- % +% \iffalse +%<*example> +% \fi +\begin{tcblisting}{minted language=lisp, listing only, + title=icite.xdy} +(markup-locclass-list :open "\tabto{3.5cm}" :sep ", ") +\end{tcblisting} +% \iffalse +%</example> +% \fi +% +% \subsection{Indices} +% \label{ref:indices} +% \subsubsection{Index of Passages Cited (modern authors)} +% \printindex[loccit] +% \needspace{8\baselineskip} +% \subsubsection{\emph{Index locorum citatorum}} +% \label{sec:index-loc-cit} +% \printindex[primary] +% +% \subsection{\texorpdfstring{\hologo{BibTeX} +% file used in this document}{BibTeX file used in this document}} +% \label{ref:icite-bib} +% \tcbinputlisting{minted options={linenos, numbersep=1.5mm}, minted +% language=bibtex, listing file=icite.bib, listing only} +% +%\StopEventually{} +% +% \section{Implementation} +% +% \iffalse +%<*package> +% \fi +% Declare the global options, and define them: +% \begin{macrocode} +\RequirePackage{xkeyval} +\DeclareOptionX{citecmd}[cite]{\def\ic@dfltcit{#1}} +\newif\ifdefault@index +\newif\ifno@index +\DeclareOptionX{defaultindex}[loccit]{ + \edef\@tempa{#1} + \edef\@none{none} + \ifx\@tempa\@none + \no@indextrue + \else + \default@indextrue + \def\ic@dfltind{#1} + \fi +} +\newif\ifno@bibengine +\define@boolkey{icite.sty}[@pkg@]{nobibengine}[true]{% + \if@pkg@nobibengine\no@bibenginetrue\else\fi} +\ExecuteOptionsX{citecmd} +\ProcessOptionsX\relax +% \end{macrocode} +% The following packages are required by \package{icite}: +% \begin{macrocode} +\RequirePackage{xparse} +\RequirePackage{datatool} +\RequirePackage{usebib} +% \end{macrocode} +% If |nobibengine| is set to true, then \cs{ic@dfltcit} will be +% redefined by \cs{icite} to \cs{ic@nullcmd} which does nothing. +% \begin{macrocode} +\NewDocumentCommand{\ic@nullcmd}{O{}O{}m}{} +% \end{macrocode} +% Define fields to be used by \package{icite}: +% \begin{macrocode} +\define@reuse@key{author} +\define@reuse@key{indexauthor} +\define@reuse@key{sortname} +\define@reuse@key{title} +\define@reuse@key{shorttitle} +\define@reuse@key{indextitle} +\define@reuse@key{indexsorttitle} +\define@reuse@key{entrysubtype} +\define@reuse@key{shorthand} +% \end{macrocode} +% This is the same as \cs{usebibentry} from \package{ebib}, but it +% does not return an error if the entry field is not found: +% \begin{macrocode} +\def\get@bibentry#1#2{\@ifundefined{reuse@#1@#2}{} + {\@nameuse{reuse@#1@#2}}} +% \end{macrocode} +% Create a new database which \package{icite} will use to connect +% Bib\LaTeX\ \enquote*{subtypes} to indices. +% \begin{macrocode} +\DTLnewdb{icite@indices} +% \end{macrocode} +% \DescribeMacro{\IndexSubtypeAs} \cs{IndexSubtypeAs} takes two +% mandatory arguments: 1. Any given keyword used to specify an +% \enquote*{entrysubtype} in the bibliographical database and 2. The +% index which the authors matching that subtype must go into. This +% command is to be found in the preamble only. +% \begin{macrocode} +\NewDocumentCommand{\IndexSubtypeAs}{m m}{% + \DTLnewrow{icite@indices} + \DTLnewdbentry{icite@indices}{subtype}{#1} + \DTLnewdbentry{icite@indices}{index}{#2} +} +\@onlypreamble\IndexSubtypeAs +% \end{macrocode} +% \DescribeMacro{\SetTitleStyle} By default, titles are printed in +% italics. This can be changed in the preamble by \cs{SetTitleStyle}. +% \begin{macrocode} +\NewDocumentCommand{\TitleStyle}{m}{\emph{#1}} +\NewDocumentCommand{\SetTitleStyle}{m}{% + \RenewDocumentCommand{\TitleStyle}{m}{#1} +} +\@onlypreamble\SetTitleStyle +% \end{macrocode} +% \DescribeMacro{\AuthorTitleDelim} +% \changes{v1.2}{2019/03/17}{\cs{AuthorTitleDelim}: delimiter +% between authors and titles}\cs{AuthorTitleDelim}\marg{delimiter} +% sets the delimiter between authors and titles in the body text when +% the |nobibengine| option is set to |true|. The default delimiter is +% a comma. +% \begin{macrocode} +\def\ic@authtitdelim{, } +\NewDocumentCommand{\AuthorTitleDelim}{m}{% + \def\ic@authtitdelim{#1} +} +\@onlypreamble\AuthorTitleDelim +% \end{macrocode} +% \DescribeMacro{\TitlePageDelim} +% \changes{v1.2}{2019/03/17}{\cs{TitlePageDelim}: the delimiter +% between titles and pages}\cs{TitlePageDelim}\marg{delimiter} sets +% the delimiter between titles and pages in the body text when the +% |nobibengine| option is set to |true|. The default delimiter is a +% comma. +% \begin{macrocode} +\def\ic@titpgdelim{, } +\NewDocumentCommand{\TitlePageDelim}{m}{% + \def\ic@titpgdelim{#1} +} +\@onlypreamble\TitlePageDelim +% \end{macrocode} +% \DescribeMacro{\icite} \cs{icite} both inserts a formatted citation +% and an entry in the \emph{index locorum citatorum}. It is to be used +% in place of any \hologo{BibTeX} or Bib\LaTeX\ citation command the +% syntax of which is +% \cs{command}\oarg{pre}\oarg{post}\marg{key}. \cs{icite} further +% accepts an optional argument should one wish to specify the +% citation command to be used, like so:\\ +% \cs{icite}\oarg{pre}\oarg{post}\marg{key}\oarg{command}\\ +% Only standard citation commands are accepted, with the exception of +% qualified citation lists or so-called \enquote*{multicite} commands. +% \begin{macrocode} +\NewDocumentCommand{\icite}{o o m O{\ic@dfltcit}}{% + \edef\ic@argiv{#4}% + \edef\ic@null{ic@nullcmd}% + \ifno@bibengine\let\ic@argiv\ic@null\else\fi% + \edef\@shorthand{\get@bibentry{#3}{shorthand}}% + \edef\@subtype{\get@bibentry{#3}{entrysubtype}}% + \edef\@author{\get@bibentry{#3}{author}}% + \edef\@indexauthor{\get@bibentry{#3}{indexauthor}}% + \edef\@sortname{\get@bibentry{#3}{sortname}}% + \edef\@indexsorttitle{\get@bibentry{#3}{indexsorttitle}}% + \edef\@indextitle{\get@bibentry{#3}{indextitle}}% + \edef\@shorttitle{\get@bibentry{#3}{shorttitle}}% + \edef\@title{\get@bibentry{#3}{title}}% + \ifx\@indexauthor\empty + \def\@useauthor{\@author}% + \else + \def\@useauthor{\@indexauthor}% + \fi + \ifx\@sortname\empty + \def\@sortedauthor{\@useauthor}% + \else + \def\@sortedauthor{{\@sortname}@\@useauthor}% + \fi + \ifx\@indextitle\empty + \ifx\@shorttitle\empty + \def\@usetitle{\@title}% + \else + \def\@usetitle{\@shorttitle}% + \fi + \else + \def\@usetitle{\@indextitle}% + \fi + \ifx\@indexsorttitle\empty + \def\@sortedtitle{{\@usetitle}@\TitleStyle{\@usetitle}}% + \else + \def\@sortedtitle{{\@indexsorttitle}@\TitleStyle{\@usetitle}}% + \fi + \IfNoValueTF{#1}% + {\DTLifdbempty{icite@indices}{% + \ifno@index\else + \ifdefault@index% + \index[\ic@dfltind]{\@sortedauthor!\@sortedtitle}% + \else% + \index{\@sortedauthor!\@sortedtitle}% + \fi\fi% + }{% + \DTLforeach*{icite@indices}{% + \icite@subtype=subtype,\icite@index=index}{% + \ifx\@subtype\icite@subtype% + \index[\icite@index]{\@sortedauthor!\@sortedtitle}% + \dtlbreak% + \else% + \ifno@index\else + \ifdefault@index% + \index[\ic@dfltind]{\@sortedauthor!\@sortedtitle}% + \else% + \index{\@sortedauthor!\@sortedtitle}% + \fi\fi% + \fi}} + \ifno@bibengine + \ifx\@shorthand\empty% + \@useauthor\ic@authtitdelim\TitleStyle{\@usetitle}% + \else% + \@shorthand% + \fi% + \else% + \fi% + \csname\ic@argiv\endcsname{#3}% + } + {\IfNoValueTF{#2}% + {\DTLifdbempty{icite@indices}{% + \ifno@index\else + \ifdefault@index% + \index[\ic@dfltind]{\@sortedauthor!\@sortedtitle!#1}% + \else% + \index{\@sortedauthor!\@sortedtitle!#1}% + \fi\fi% + }{% + \DTLforeach*{icite@indices}{% + \icite@subtype=subtype,\icite@index=index}{% + \ifx\@subtype\icite@subtype% + \index[\icite@index]{\@sortedauthor!\@sortedtitle!#1}% + \dtlbreak% + \else% + \ifno@index\else + \ifdefault@index% + \index[\ic@dfltind]{\@sortedauthor!\@sortedtitle!#1}% + \else% + \index{\@sortedauthor!\@sortedtitle!#1}% + \fi\fi% + \fi}}% + \ifno@bibengine + \ifx\@shorthand\empty% + \@useauthor\ic@authtitdelim\TitleStyle{\@usetitle}% + \ic@titpgdelim{#1}% + \else% + \@shorthand, {#1}% + \fi% + \else% + \fi% + \csname\ic@argiv\endcsname[{#1}]{#3}% + } + {\DTLifdbempty{icite@indices}{% + \ifno@index\else + \ifdefault@index% + \index[\ic@dfltind]{\@sortedauthor!\@sortedtitle!#2}% + \else% + \index{\@sortedauthor!\@sortedtitle!#2}% + \fi\fi% + }{% + \DTLforeach*{icite@indices}{% + \icite@subtype=subtype,\icite@index=index}{% + \ifx\@subtype\icite@subtype% + \index[\icite@index]{\@sortedauthor!\@sortedtitle!#2}% + \dtlbreak% + \else% + \ifno@index\else + \ifdefault@index% + \index[\ic@dfltind]{\@sortedauthor!\@sortedtitle!#2}% + \else% + \index{\@sortedauthor!\@sortedtitle!#2}% + \fi\fi% + \fi}}% + \ifno@bibengine + \ifx\@shorthand\empty% + #1 \@useauthor\ic@authtitdelim\TitleStyle{\@usetitle}% + \ic@titpgdelim{#2}% + \else% + #1 \@shorthand, {#2}% + \fi + \else% + \fi% + \csname\ic@argiv\endcsname[#1][{#2}]{#3}% + }% + }% +} +% \end{macrocode} +% \iffalse +%</package> +% \fi +%\Finale +\endinput
\ No newline at end of file diff --git a/macros/latex/contrib/icite/icite.ins b/macros/latex/contrib/icite/icite.ins new file mode 100644 index 0000000000..176b1fd700 --- /dev/null +++ b/macros/latex/contrib/icite/icite.ins @@ -0,0 +1,71 @@ +%% +%% This is file `icite.ins', +%% generated with the docstrip utility. +%% +%% The original source files were: +%% +%% icite.dtx (with options: `install') +%% +%% Copyright (C) 2019 by Robert Alessi <alessi@robertalessi.net> +%% +%% Please send error reports and suggestions for improvements to Robert +%% Alessi <alessi@robertalessi.net> +%% +%% This program is free software: you can redistribute it and/or modify +%% it under the terms of the GNU General Public License as published by +%% the Free Software Foundation, either version 3 of the License, or +%% (at your option) any later version. +%% +%% This program is distributed in the hope that it will be useful, but +%% WITHOUT ANY WARRANTY; without even the implied warranty of +%% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +%% General Public License for more details. +%% +%% You should have received a copy of the GNU General Public License +%% along with this program. If not, see +%% <http://www.gnu.org/licenses/>. +%% +%% This work consists of the file icite.dtx, icite.ins and a Makefile. +%% Running "make" generates the derived files README.md, icite.pdf and icite.sty. +%% Running "make inst" installs the files in the user's TeX tree. +%% Running "make install" installs the files in the local TeX tree. +%% +\input docstrip.tex +\keepsilent +\askforoverwritefalse +\preamble + +Copyright (C) 2019 by Robert Alessi <alessi@robertalessi.net> + +Please send error reports and suggestions for improvements to Robert +Alessi <alessi@robertalessi.net> + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 3 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, but +WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see +<http://www.gnu.org/licenses/>. + +This work consists of the file icite.dtx, icite.ins and a Makefile. +Running "make" generates the derived files README.md, icite.pdf and icite.sty. +Running "make inst" installs the files in the user's TeX tree. +Running "make install" installs the files in the local TeX tree. + +\endpreamble + +\usedir{tex/latex/icite} +\generate{ + \file{\jobname.sty}{\from{\jobname.dtx}{package}} +} +\endbatchfile +\endinput +%% +%% End of file `icite.ins'. diff --git a/macros/latex/contrib/icite/icite.pdf b/macros/latex/contrib/icite/icite.pdf Binary files differnew file mode 100644 index 0000000000..c492cb5e31 --- /dev/null +++ b/macros/latex/contrib/icite/icite.pdf diff --git a/macros/latex/contrib/icite/samples/bibsample.bib b/macros/latex/contrib/icite/samples/bibsample.bib new file mode 100644 index 0000000000..5a1efb102f --- /dev/null +++ b/macros/latex/contrib/icite/samples/bibsample.bib @@ -0,0 +1,46 @@ +@Book{Aristotle:Politica, + title = {Politica}, + date = 1964, + author = {Aristotle}, + editor = {Ross, W. D.}, + origdate = 1957, + entrysubtype = {ancient}, + publisher = {Clarendon Press}, + location = {Oxford}} + +@BookInBook{Plato:Laches, + title = {Laches}, + date = 1968, + author = {Plato}, + booktitle = {Platonis opera}, + editor = {Burnet, J.}, + origdate = 1903, + entrysubtype = {ancient}, + volume = 3, + publisher = {Clarendon Press}, + location = {Oxford}} + +@BookInBook{Plato:Theaetetus, + title = {Theaetetus}, + date = 1967, + author = {Plato}, + booktitle = {Platonis opera}, + editor = {Burnet, J.}, + origdate = 1900, + entrysubtype = {ancient}, + volume = 1, + publisher = {Clarendon Press}, + location = {Oxford}} + +@Book{Reynolds.Wilson1994, + author = {Reynolds, L. D. and Wilson, N. G.}, + indexauthor = {L. D. Reynolds and N. G. Wilson}, + title = {Scribes and Scholars}, + date = 1994, + subtitle = {A Guide to the Transmission of Greek and Latin + Literature}, + edition = 3, + publisher = {Clarendon Press}, + location = {Oxford} +} + diff --git a/macros/latex/contrib/icite/samples/icite-biblatex.pdf b/macros/latex/contrib/icite/samples/icite-biblatex.pdf Binary files differnew file mode 100644 index 0000000000..f19d15473c --- /dev/null +++ b/macros/latex/contrib/icite/samples/icite-biblatex.pdf diff --git a/macros/latex/contrib/icite/samples/icite-biblatex.tex b/macros/latex/contrib/icite/samples/icite-biblatex.tex new file mode 100644 index 0000000000..b49bc3491c --- /dev/null +++ b/macros/latex/contrib/icite/samples/icite-biblatex.tex @@ -0,0 +1,102 @@ +\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} + +\usepackage{hyperref} +\hypersetup{colorlinks, hidelinks, pdfauthor={Robert + Alessi}, pdftitle={icite and BibLaTeX}} + +\usepackage{fancyvrb} +\fvset{numbers=left,obeytabs,frame=lines} + +\usepackage{ccicons} +\usepackage{enumitem} +\setlist{nosep} +\setlist[itemize]{label=\textendash} +\setlist[enumerate,1]{label=(\alph*)} +\setlist[enumerate,2]{label=\roman*.} + +\usepackage[citecmd=autocite, defaultindex=none]{icite} +\IndexSubtypeAs{ancient}{\jobname-primary} +\bibinput{bibsample} + +\usepackage{classics} +\newclassic{plat}{#1|#1|#1} +\newclassic{arist}{#1|\textit{#1}|#1} + +\usepackage[xindy,nonewpage]{imakeidx} +\makeindex[name=\jobname-primary, title={Index locorum citatorum}] + +\usepackage[style=oxnotes]{biblatex} +\addbibresource{bibsample.bib} + +\begin{document} +\DefineShortVerb{\|} +\vspace*{-.5in} +\noindent +\textbf{\textsf{icite sample file}} --- \cczero\ This +file is public domain + +\section*{Preamble} +This file demonstrates how \textsf{icite} can be used to produce an +index of passages cited in combination with Bib\LaTeX. + +The relevant part of the preamble which is used here follows: +\begin{Verbatim} +\usepackage[citecmd=autocite, defaultindex=none]{icite} +\IndexSubtypeAs{ancient}{icite-biblatex-primary} +\bibinput{bibsample} + +\usepackage{classics} +\newclassic{plat}{#1|#1|#1} +\newclassic{arist}{#1|\textit{#1}|#1} + +\usepackage[xindy]{imakeidx} +\makeindex[name=icite-biblatex-primary, title={Index locorum citatorum}] + +\usepackage[style=oxnotes]{biblatex} +\addbibresource{bibsample.bib} +\end{Verbatim} + +\paragraph{Remarks} +\begin{enumerate} +\item |citecmd=autocite| instructs \textsf{icite} to use the + |\autocite| command to insert the citations in the body text. +\item |defaultindex=none| disables indexing by default. +\item |\IndexSubtypeAs{ancient}{icite-biblatex-primary}| makes an + exception for authors whose |entrysubtype| field matches the string + |ancient| and instructs \textsf{icite} to have them indexed in an + index named\\ |icite-biblatex-primary|. +\item To actually produce the index, + |\printindex[icite-biblatex-primary]| is needed at the end of the + document. +\end{enumerate} + +\section*{Body text} +Plato, \emph{Laches}: first +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[\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[\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}. + +\printindex[\jobname-primary] + +\section*{Bibliographical database} +\VerbatimInput{bibsample.bib} +\end{document} diff --git a/macros/latex/contrib/icite/samples/icite-minimal.pdf b/macros/latex/contrib/icite/samples/icite-minimal.pdf Binary files differnew file mode 100644 index 0000000000..e010128479 --- /dev/null +++ b/macros/latex/contrib/icite/samples/icite-minimal.pdf diff --git a/macros/latex/contrib/icite/samples/icite-minimal.tex b/macros/latex/contrib/icite/samples/icite-minimal.tex new file mode 100644 index 0000000000..32bb4a29b9 --- /dev/null +++ b/macros/latex/contrib/icite/samples/icite-minimal.tex @@ -0,0 +1,72 @@ +\documentclass{article} +\usepackage[english]{babel} + +\usepackage[small]{titlesec} + +\usepackage{latexcolors} +\usepackage[outputdir=TMP/]{minted} +\setminted{bgcolor=lavendermist} + +\usepackage{ccicons} +\usepackage{enumitem} +\setlist{nosep} +\setlist[itemize]{label=\textendash} +\setlist[enumerate,1]{label=(\alph*)} +\setlist[enumerate,2]{label=\roman*.} + +\usepackage{xurl} +\usepackage[colorlinks]{hyperref} + +\begin{document} +\vspace*{-.5in} +\noindent +\textbf{\textsf{icite sample file}} --- \cczero\ This +file is public domain + +\section*{Instructions} +\begin{enumerate} +\item Start a new document, copy and paste the code that follows. +\item The default citation command used by \textsf{icite} has been set + to \verb|autocite|. Adapt. +\item The \textsf{biblatex} style file selected is + \verb|oxnotes|. Adapt. +\item Insert the citations in the body text with + \mint{latex}|\icite[<pre>][<post>]{<key>}| +\item Compile the document with \verb|--shell-escape|.\footnote{More + information on how to do this: \url{https://texfaq.org/FAQ-spawnprog}} +\end{enumerate} + +\begin{minted}{latex} +\RequirePackage{filecontents} +\begin{filecontents*}{\jobname.xdy} +(merge-rule "\*" "" :eregexp) +\end{filecontents*} +% +\documentclass{article} +\usepackage[english]{babel} + +% load icite +\usepackage[citecmd=autocite, defaultindex=loccit]{icite} +\bibinput{bibliography} + +% prepare the index +\usepackage[xindy]{imakeidx} +\makeindex[% + name=loccit, + title={Index locorum citatorum}, + options=-M \jobname.xdy] + +% load biblatex +\usepackage[style=oxnotes]{biblatex} +\addbibresource{bibliography.bib} + +\begin{document} + +Your document goes here. + +\printindex[loccit] +\printbibliography +\end{document} +\end{minted} + +\end{document} diff --git a/macros/latex/contrib/icite/samples/icite-nobiblatex.pdf b/macros/latex/contrib/icite/samples/icite-nobiblatex.pdf Binary files differnew file mode 100644 index 0000000000..ae93aa9deb --- /dev/null +++ b/macros/latex/contrib/icite/samples/icite-nobiblatex.pdf diff --git a/macros/latex/contrib/icite/samples/icite-nobiblatex.tex b/macros/latex/contrib/icite/samples/icite-nobiblatex.tex new file mode 100644 index 0000000000..d6f824d020 --- /dev/null +++ b/macros/latex/contrib/icite/samples/icite-nobiblatex.tex @@ -0,0 +1,100 @@ +\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} + +\usepackage{hyperref} +\hypersetup{colorlinks, hidelinks, pdfauthor={Robert + Alessi}, pdftitle={icite and BibLaTeX}} + +\usepackage{fancyvrb} +\fvset{numbers=left,obeytabs,frame=lines} + +\usepackage{ccicons} +\usepackage{hologo} +\usepackage{enumitem} +\setlist{nosep} +\setlist[itemize]{label=\textendash} +\setlist[enumerate,1]{label=(\alph*)} +\setlist[enumerate,2]{label=\roman*.} + +\usepackage[defaultindex=none, nobibengine]{icite} +\IndexSubtypeAs{ancient}{\jobname-primary} +\bibinput{bibsample} + +\usepackage{classics} +\newclassic{plat}{#1|#1|#1} +\newclassic{arist}{#1|\textit{#1}|#1} + +\usepackage[xindy,nonewpage]{imakeidx} +\makeindex[name=\jobname-primary, title={Index locorum citatorum}] + +\begin{document} +\DefineShortVerb{\|} +\vspace*{-.5in} +\noindent +\textbf{\textsf{icite sample file}} --- \cczero\ This +file is public domain + +\section*{Preamble} +This file demonstrates how \textsf{icite} can be used to produce an +index of passages cited without using either \hologo{BibTeX} or +Bib\LaTeX. + +The relevant part of the preamble which is used here follows: +\begin{Verbatim} +\usepackage[defaultindex=none, nobibengine]{icite} +\IndexSubtypeAs{ancient}{icite-nobiblatex-primary} +\bibinput{bibsample} + +\usepackage{classics} +\newclassic{plat}{#1|#1|#1} +\newclassic{arist}{#1|\textit{#1}|#1} + +\usepackage[xindy]{imakeidx} +\makeindex[name=icite-nobiblatex-primary, title={Index locorum citatorum}] +\end{Verbatim} + +\paragraph{Remarks} +\begin{enumerate} +\item |defaultindex=none| disables indexing by default. +\item |nobibengine| instructs \textsf{icite} to insert the citations + in the body text without using either \hologo{BibTeX} or Bib\LaTeX. +\item |\IndexSubtypeAs{ancient}{icite-nobiblatex-primary}| makes an + exception for authors whose |entrysubtype| field matches the string + |ancient| and instructs \textsf{icite} to have them indexed in an + index named\\ |icite-nobiblatex-primary|. +\item To actually produce the index, + |\printindex[icite-nobiblatex-primary]| is needed at the end of the + document. +\end{enumerate} + +\section*{Body text} +Plato, \emph{Laches}: first +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[\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[\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}.} + +\printindex[\jobname-primary] + +\section*{Bibliographical database} +\VerbatimInput{bibsample.bib} +\end{document} |