diff options
author | Robert Alessi <alessi@robertalessi.net> | 2019-03-17 18:19:05 +0100 |
---|---|---|
committer | Robert Alessi <alessi@robertalessi.net> | 2019-03-17 18:19:05 +0100 |
commit | e4585f6ce56ce0d037a0f545f21f9c7d28767386 (patch) | |
tree | 7a51eef4e8de15c2b257280ba9b575c8794afd7e | |
parent | 2feb69c215e1551dd845edba984fd26f1495ea9f (diff) | |
download | icite-e4585f6ce56ce0d037a0f545f21f9c7d28767386.tar.gz |
done documenting and added a section on icite and classics. new functions \AuthorTitleDelim and \TitlePageDelim
-rw-r--r-- | Makefile | 48 | ||||
-rw-r--r-- | icite.dtx | 59 | ||||
-rw-r--r-- | samples/icite-biblatex.tex | 23 | ||||
-rw-r--r-- | samples/icite-minimal.tex | 72 | ||||
-rw-r--r-- | samples/icite-nobiblatex.tex | 23 |
5 files changed, 170 insertions, 55 deletions
@@ -6,13 +6,27 @@ LOCAL = $(shell kpsewhich --var-value TEXMFLOCAL) | |||
6 | UTREE = $(shell kpsewhich --var-value TEXMFHOME) | 6 | UTREE = $(shell kpsewhich --var-value TEXMFHOME) |
7 | 7 | ||
8 | exts := md bib ins dtx html | 8 | exts := md bib ins dtx html |
9 | extsi := tex | 9 | texsamples := $(basename $(wildcard $(PWD)/samples/*.tex)) |
10 | findopts := $(foreach ext,$(exts),-or -iname "*.$(ext)") | 10 | findopts := $(foreach ext,$(exts),-or -iname "*.$(ext)") |
11 | findoptsi := $(foreach ext,$(extsi),-or -iname "*.$(ext)") | 11 | |
12 | |||
13 | # Look into this later | ||
14 | # $(if $(wildcard $(PWD)/TMP/$(notdir $1).bcf),biber $(PWD)/TMP/$(notdir $1),) | ||
15 | |||
16 | define dosamples | ||
17 | lualatex --output-dir=$(PWD)/TMP --shell-escape $1 >/dev/null | ||
18 | lualatex --output-dir=$(PWD)/TMP --shell-escape $1 >/dev/null | ||
19 | if [ -f $(PWD)/TMP/$(notdir $1)-primary.idx ]; \ | ||
20 | then texindy -M $(PWD)/TMP/$(notdir $1).xdy $(PWD)/TMP/$(notdir $1)-primary.idx >/dev/null; fi | ||
21 | if [ -f $(PWD)/TMP/$(notdir $1).bcf ]; then biber $(PWD)/TMP/$(notdir $1) >/dev/null; fi | ||
22 | lualatex --output-dir=$(PWD)/TMP --shell-escape $1 >/dev/null | ||
23 | lualatex --output-dir=$(PWD)/TMP --shell-escape $1 >/dev/null | ||
24 | endef | ||
12 | 25 | ||
13 | all: $(NAME).pdf | 26 | all: $(NAME).pdf |
14 | # test -e README.md || exit 0 | 27 | # test -e README.md || exit 0 |
15 | $(NAME).pdf: $(NAME).dtx | 28 | $(NAME).pdf: $(NAME).dtx |
29 | @ echo "Make documentation..." | ||
16 | lualatex --shell-escape --recorder --interaction=batchmode $(NAME).dtx >/dev/null | 30 | lualatex --shell-escape --recorder --interaction=batchmode $(NAME).dtx >/dev/null |
17 | biber $(NAME) >/dev/null | 31 | biber $(NAME) >/dev/null |
18 | lualatex --shell-escape --recorder --interaction=batchmode $(NAME).dtx >/dev/null | 32 | lualatex --shell-escape --recorder --interaction=batchmode $(NAME).dtx >/dev/null |
@@ -22,35 +36,16 @@ $(NAME).pdf: $(NAME).dtx | |||
22 | if [ -f primary.idx ]; then texindy -M icite.xdy primary.idx >/dev/null; fi | 36 | if [ -f primary.idx ]; then texindy -M icite.xdy primary.idx >/dev/null; fi |
23 | lualatex --shell-escape --recorder --interaction=nonstopmode $(NAME).dtx > /dev/null | 37 | lualatex --shell-escape --recorder --interaction=nonstopmode $(NAME).dtx > /dev/null |
24 | lualatex --shell-escape --recorder --interaction=nonstopmode $(NAME).dtx > /dev/null | 38 | lualatex --shell-escape --recorder --interaction=nonstopmode $(NAME).dtx > /dev/null |
39 | @ echo "Make sample files..." | ||
25 | if [ ! -d $(PWD)/TMP ]; then mkdir $(PWD)/TMP; fi | 40 | if [ ! -d $(PWD)/TMP ]; then mkdir $(PWD)/TMP; fi |
26 | cp $(PWD)/samples/*.bib $(PWD)/TMP | 41 | cp $(PWD)/samples/*.bib $(PWD)/TMP |
27 | lualatex --output-dir=$(PWD)/TMP --shell-escape samples/icite-biblatex.tex | 42 | $(foreach file,$(texsamples), $(call dosamples, $(file))) |
28 | lualatex --output-dir=$(PWD)/TMP --shell-escape samples/icite-biblatex.tex | ||
29 | texindy -M $(PWD)/TMP/icite-biblatex.xdy $(PWD)/TMP/pr-sources.idx | ||
30 | biber $(PWD)/TMP/icite-biblatex | ||
31 | lualatex --output-dir=$(PWD)/TMP --shell-escape samples/icite-biblatex.tex | ||
32 | lualatex --output-dir=$(PWD)/TMP --shell-escape samples/icite-biblatex.tex | ||
33 | lualatex --output-dir=$(PWD)/TMP --shell-escape samples/icite-nobiblatex.tex | ||
34 | lualatex --output-dir=$(PWD)/TMP --shell-escape samples/icite-nobiblatex.tex | ||
35 | texindy -M $(PWD)/TMP/icite-nobiblatex.xdy $(PWD)/TMP/pr-sources.idx | ||
36 | lualatex --output-dir=$(PWD)/TMP --shell-escape samples/icite-nobiblatex.tex | ||
37 | lualatex --output-dir=$(PWD)/TMP --shell-escape samples/icite-nobiblatex.tex | ||
38 | mv TMP/*.pdf samples/ | 43 | mv TMP/*.pdf samples/ |
39 | 44 | ||
40 | samples: | 45 | samples: |
41 | if [ ! -d $(PWD)/TMP ]; then mkdir $(PWD)/TMP; fi | 46 | if [ ! -d $(PWD)/TMP ]; then mkdir $(PWD)/TMP; fi |
42 | cp $(PWD)/samples/*.bib $(PWD)/TMP | 47 | cp $(PWD)/samples/*.bib $(PWD)/TMP |
43 | lualatex --output-dir=$(PWD)/TMP --shell-escape samples/icite-biblatex.tex | 48 | $(foreach file,$(texsamples), $(call dosamples, $(file))) |
44 | lualatex --output-dir=$(PWD)/TMP --shell-escape samples/icite-biblatex.tex | ||
45 | texindy -M $(PWD)/TMP/icite-biblatex.xdy $(PWD)/TMP/pr-sources.idx | ||
46 | biber $(PWD)/TMP/icite-biblatex | ||
47 | lualatex --output-dir=$(PWD)/TMP --shell-escape samples/icite-biblatex.tex | ||
48 | lualatex --output-dir=$(PWD)/TMP --shell-escape samples/icite-biblatex.tex | ||
49 | lualatex --output-dir=$(PWD)/TMP --shell-escape samples/icite-nobiblatex.tex | ||
50 | lualatex --output-dir=$(PWD)/TMP --shell-escape samples/icite-nobiblatex.tex | ||
51 | texindy -M $(PWD)/TMP/icite-nobiblatex.xdy $(PWD)/TMP/pr-sources.idx | ||
52 | lualatex --output-dir=$(PWD)/TMP --shell-escape samples/icite-nobiblatex.tex | ||
53 | lualatex --output-dir=$(PWD)/TMP --shell-escape samples/icite-nobiblatex.tex | ||
54 | mv TMP/*.pdf samples/ | 49 | mv TMP/*.pdf samples/ |
55 | 50 | ||
56 | lualatex: | 51 | lualatex: |
@@ -109,9 +104,10 @@ package: distclean all | |||
109 | cp -r samples/ doc/latex/$(NAME)/ | 104 | cp -r samples/ doc/latex/$(NAME)/ |
110 | mkdir -p source/latex/$(NAME)/ | 105 | mkdir -p source/latex/$(NAME)/ |
111 | cp Makefile README.md $(NAME).{dtx,ins} source/latex/$(NAME)/ | 106 | cp Makefile README.md $(NAME).{dtx,ins} source/latex/$(NAME)/ |
112 | zip -r $(NAME).tds.zip tex doc source | 107 | # zip -r $(NAME).tds.zip tex doc source |
113 | rm -rf tex/ source/ doc/ | 108 | rm -rf tex/ source/ doc/ |
114 | tar czf $(NAME)-$(VERS).tar.gz $(NAME).tds.zip $(NAME)/ | 109 | # tar czf $(NAME)-$(VERS).tar.gz $(NAME).tds.zip $(NAME)/ |
110 | tar czf $(NAME)-$(VERS).tar.gz $(NAME)/ | ||
115 | rm -rf $(NAME)/ | 111 | rm -rf $(NAME)/ |
116 | 112 | ||
117 | .PHONY: all lualatex clean distclean inst local uninst install uninstall zip package samples | 113 | .PHONY: all lualatex clean distclean inst local uninst install uninstall zip package samples |
@@ -349,10 +349,10 @@ Running "make install" installs the files in the local TeX tree. | |||
349 | \newunicodechar{Ǧ}{Ǧ} % | 349 | \newunicodechar{Ǧ}{Ǧ} % |
350 | \usepackage{arabluatex} | 350 | \usepackage{arabluatex} |
351 | \SetTranslitConvention{loc} | 351 | \SetTranslitConvention{loc} |
352 | \usepackage{varioref} | ||
353 | \usepackage{xurl} | 352 | \usepackage{xurl} |
354 | \usepackage{uri} | 353 | \usepackage{uri} |
355 | \usepackage{hyperxmp} | 354 | \usepackage{hyperxmp} |
355 | \usepackage{varioref} | ||
356 | \usepackage[numbered]{hypdoc} | 356 | \usepackage[numbered]{hypdoc} |
357 | \hypersetup{unicode=true, colorlinks, allcolors=blue, | 357 | \hypersetup{unicode=true, colorlinks, allcolors=blue, |
358 | linktocpage=true, pdfauthor={Robert Alessi}, pdftitle={The | 358 | linktocpage=true, pdfauthor={Robert Alessi}, pdftitle={The |
@@ -367,9 +367,10 @@ Running "make install" installs the files in the local TeX tree. | |||
367 | pdflicenseurl={https://creativecommons.org/licenses/by-sa/4.0/legalcode}, | 367 | pdflicenseurl={https://creativecommons.org/licenses/by-sa/4.0/legalcode}, |
368 | pdfmetalang={en-US}, pdftype={Text}, pdfkeywords={bibtex, biblatex, | 368 | pdfmetalang={en-US}, pdftype={Text}, pdfkeywords={bibtex, biblatex, |
369 | indexing}} | 369 | indexing}} |
370 | \usepackage{amsmath} | ||
371 | \usepackage{cleveref} | ||
370 | \CodelineIndex | 372 | \CodelineIndex |
371 | \usepackage[citecmd=autocite,defaultindex]{\jobname} | 373 | \usepackage[citecmd=autocite,defaultindex]{\jobname} |
372 | \usepackage{cleveref} | ||
373 | \IndexSubtypeAs{classical}{primary} | 374 | \IndexSubtypeAs{classical}{primary} |
374 | \bibinput{icite} | 375 | \bibinput{icite} |
375 | \usepackage[nonewpage,xindy]{imakeidx} | 376 | \usepackage[nonewpage,xindy]{imakeidx} |
@@ -670,6 +671,8 @@ Running "make install" installs the files in the local TeX tree. | |||
670 | %</example> | 671 | %</example> |
671 | % \fi | 672 | % \fi |
672 | % | 673 | % |
674 | % \subsection{Preamble-only commands} | ||
675 | % The following commands may be found in the preamble only. | ||
673 | % \paragraph{Styling the titles} | 676 | % \paragraph{Styling the titles} |
674 | % \DescribeMacro{\SetTitleStyle} By default, \package{icite} prints | 677 | % \DescribeMacro{\SetTitleStyle} By default, \package{icite} prints |
675 | % the titles of the works cited in italics.\\ | 678 | % the titles of the works cited in italics.\\ |
@@ -688,6 +691,21 @@ Running "make install" installs the files in the local TeX tree. | |||
688 | % As this example shows, |#1| is the token that is replaced with the | 691 | % As this example shows, |#1| is the token that is replaced with the |
689 | % actual title in the formatting directives of the \cs{SetTitleStyle} | 692 | % actual title in the formatting directives of the \cs{SetTitleStyle} |
690 | % command. | 693 | % command. |
694 | % | ||
695 | % \paragraph{Delimiters} | ||
696 | % \NEWfeature{v1.2}\DescribeMacro{\AuthorTitleDelim} | ||
697 | % \cs{AuthorTitleDelim}\marg{delimiter} sets the delimiter between | ||
698 | % authors and titles in the body text when the |nobibengine| option is | ||
699 | % set to |true|. The default delimiter is a comma and a space. | ||
700 | % | ||
701 | % \DescribeMacro{\TitlePageDelim} | ||
702 | % \cs{TitlePageDelim}\marg{delimiter} sets the delimiter between | ||
703 | % titles and pages in the body text when the |nobibengine| option is | ||
704 | % set to |true|. The default delimiter is a comma and a space. | ||
705 | % | ||
706 | % \subsection[\textsf{icite} for the Impatient]% | ||
707 | % {\package{icite} for the Impatient} | ||
708 | % Read \href{samples/icite-minimal.pdf}{\texttt{icite-minimal.pdf}}. | ||
691 | % | 709 | % |
692 | % \subsection{Entry fields} | 710 | % \subsection{Entry fields} |
693 | % \label{sec:entry-fields} | 711 | % \label{sec:entry-fields} |
@@ -1004,7 +1022,7 @@ Running "make install" installs the files in the local TeX tree. | |||
1004 | % \subsection[The \textsf{classics} package]% | 1022 | % \subsection[The \textsf{classics} package]% |
1005 | % {The \package{classics} package} % | 1023 | % {The \package{classics} package} % |
1006 | % \label{sec:classics-usage} | 1024 | % \label{sec:classics-usage} |
1007 | % As said above on \cpageref{ref:classics-pkg}, it is advisable to use | 1025 | % As said above \vpageref{ref:classics-pkg}, it is advisable to use |
1008 | % the \package{classics} package to format volume, page, column, line | 1026 | % the \package{classics} package to format volume, page, column, line |
1009 | % numbers and the like which are inserted in the \meta{post} optional | 1027 | % numbers and the like which are inserted in the \meta{post} optional |
1010 | % argument of the \cs{icite} command\autocite{classics}. An example of | 1028 | % argument of the \cs{icite} command\autocite{classics}. An example of |
@@ -1219,7 +1237,32 @@ Running "make install" installs the files in the local TeX tree. | |||
1219 | } | 1237 | } |
1220 | \@onlypreamble\SetTitleStyle | 1238 | \@onlypreamble\SetTitleStyle |
1221 | % \end{macrocode} | 1239 | % \end{macrocode} |
1222 | % | 1240 | % \DescribeMacro{\AuthorTitleDelim} |
1241 | % \changes{v1.2}{2019/03/16}{\cs{AuthorTitleDelim}: delimiter | ||
1242 | % between authors and titles}\cs{AuthorTitleDelim}\marg{delimiter} | ||
1243 | % sets the delimiter between authors and titles in the body text when | ||
1244 | % the |nobibengine| option is set to |true|. The default delimiter is | ||
1245 | % a comma. | ||
1246 | % \begin{macrocode} | ||
1247 | \def\ic@authtitdelim{, } | ||
1248 | \NewDocumentCommand{\AuthorTitleDelim}{m}{% | ||
1249 | \def\ic@authtitdelim{#1} | ||
1250 | } | ||
1251 | \@onlypreamble\AuthorTitleDelim | ||
1252 | % \end{macrocode} | ||
1253 | % \DescribeMacro{\TitlePageDelim} | ||
1254 | % \changes{v1.2}{2019/03/16}{\cs{TitlePageDelim}: the delimiter | ||
1255 | % between titles and pages}\cs{TitlePageDelim}\marg{delimiter} sets | ||
1256 | % the delimiter between titles and pages in the body text when the | ||
1257 | % |nobibengine| option is set to |true|. The default delimiter is a | ||
1258 | % comma. | ||
1259 | % \begin{macrocode} | ||
1260 | \def\ic@titpgdelim{, } | ||
1261 | \NewDocumentCommand{\TitlePageDelim}{m}{% | ||
1262 | \def\ic@titpgdelim{#1} | ||
1263 | } | ||
1264 | \@onlypreamble\TitlePageDelim | ||
1265 | % \end{macrocode} | ||
1223 | % \DescribeMacro{\icite} \cs{icite} both inserts a formatted citation | 1266 | % \DescribeMacro{\icite} \cs{icite} both inserts a formatted citation |
1224 | % and an entry in the \emph{index locorum citatorum}. It is to be used | 1267 | % and an entry in the \emph{index locorum citatorum}. It is to be used |
1225 | % in place of any \hologo{BibTeX} or Bib\LaTeX\ citation command the | 1268 | % in place of any \hologo{BibTeX} or Bib\LaTeX\ citation command the |
@@ -1292,7 +1335,7 @@ Running "make install" installs the files in the local TeX tree. | |||
1292 | \fi}} | 1335 | \fi}} |
1293 | \ifno@bibengine | 1336 | \ifno@bibengine |
1294 | \ifx\@shorthand\empty% | 1337 | \ifx\@shorthand\empty% |
1295 | \@useauthor, \TitleStyle{\@usetitle}% | 1338 | \@useauthor\ic@authtitdelim\TitleStyle{\@usetitle}% |
1296 | \else% | 1339 | \else% |
1297 | \@shorthand% | 1340 | \@shorthand% |
1298 | \fi% | 1341 | \fi% |
@@ -1324,7 +1367,8 @@ Running "make install" installs the files in the local TeX tree. | |||
1324 | \fi}}% | 1367 | \fi}}% |
1325 | \ifno@bibengine | 1368 | \ifno@bibengine |
1326 | \ifx\@shorthand\empty% | 1369 | \ifx\@shorthand\empty% |
1327 | \@useauthor, \TitleStyle{\@usetitle}, {#1}% | 1370 | \@useauthor\ic@authtitdelim\TitleStyle{\@usetitle}% |
1371 | \ic@titpgdelim{#1}% | ||
1328 | \else% | 1372 | \else% |
1329 | \@shorthand, {#1}% | 1373 | \@shorthand, {#1}% |
1330 | \fi% | 1374 | \fi% |
@@ -1355,7 +1399,8 @@ Running "make install" installs the files in the local TeX tree. | |||
1355 | \fi}}% | 1399 | \fi}}% |
1356 | \ifno@bibengine | 1400 | \ifno@bibengine |
1357 | \ifx\@shorthand\empty% | 1401 | \ifx\@shorthand\empty% |
1358 | #1 \@useauthor, \TitleStyle{\@usetitle}, {#2}% | 1402 | #1 \@useauthor\ic@authtitdelim\TitleStyle{\@usetitle}% |
1403 | \ic@titpgdelim{#2}% | ||
1359 | \else% | 1404 | \else% |
1360 | #1 \@shorthand, {#2}% | 1405 | #1 \@shorthand, {#2}% |
1361 | \fi | 1406 | \fi |
diff --git a/samples/icite-biblatex.tex b/samples/icite-biblatex.tex index 678f9f4..b49bc34 100644 --- a/samples/icite-biblatex.tex +++ b/samples/icite-biblatex.tex | |||
@@ -22,7 +22,7 @@ | |||
22 | \setlist[enumerate,2]{label=\roman*.} | 22 | \setlist[enumerate,2]{label=\roman*.} |
23 | 23 | ||
24 | \usepackage[citecmd=autocite, defaultindex=none]{icite} | 24 | \usepackage[citecmd=autocite, defaultindex=none]{icite} |
25 | \IndexSubtypeAs{ancient}{pr-sources} | 25 | \IndexSubtypeAs{ancient}{\jobname-primary} |
26 | \bibinput{bibsample} | 26 | \bibinput{bibsample} |
27 | 27 | ||
28 | \usepackage{classics} | 28 | \usepackage{classics} |
@@ -30,7 +30,7 @@ | |||
30 | \newclassic{arist}{#1|\textit{#1}|#1} | 30 | \newclassic{arist}{#1|\textit{#1}|#1} |
31 | 31 | ||
32 | \usepackage[xindy,nonewpage]{imakeidx} | 32 | \usepackage[xindy,nonewpage]{imakeidx} |
33 | \makeindex[name=pr-sources, title={Index locorum citatorum}] | 33 | \makeindex[name=\jobname-primary, title={Index locorum citatorum}] |
34 | 34 | ||
35 | \usepackage[style=oxnotes]{biblatex} | 35 | \usepackage[style=oxnotes]{biblatex} |
36 | \addbibresource{bibsample.bib} | 36 | \addbibresource{bibsample.bib} |
@@ -49,7 +49,7 @@ index of passages cited in combination with Bib\LaTeX. | |||
49 | The relevant part of the preamble which is used here follows: | 49 | The relevant part of the preamble which is used here follows: |
50 | \begin{Verbatim} | 50 | \begin{Verbatim} |
51 | \usepackage[citecmd=autocite, defaultindex=none]{icite} | 51 | \usepackage[citecmd=autocite, defaultindex=none]{icite} |
52 | \IndexSubtypeAs{ancient}{pr-sources} | 52 | \IndexSubtypeAs{ancient}{icite-biblatex-primary} |
53 | \bibinput{bibsample} | 53 | \bibinput{bibsample} |
54 | 54 | ||
55 | \usepackage{classics} | 55 | \usepackage{classics} |
@@ -57,7 +57,7 @@ The relevant part of the preamble which is used here follows: | |||
57 | \newclassic{arist}{#1|\textit{#1}|#1} | 57 | \newclassic{arist}{#1|\textit{#1}|#1} |
58 | 58 | ||
59 | \usepackage[xindy]{imakeidx} | 59 | \usepackage[xindy]{imakeidx} |
60 | \makeindex[name=pr-sources, title={Index locorum citatorum}] | 60 | \makeindex[name=icite-biblatex-primary, title={Index locorum citatorum}] |
61 | 61 | ||
62 | \usepackage[style=oxnotes]{biblatex} | 62 | \usepackage[style=oxnotes]{biblatex} |
63 | \addbibresource{bibsample.bib} | 63 | \addbibresource{bibsample.bib} |
@@ -68,12 +68,13 @@ The relevant part of the preamble which is used here follows: | |||
68 | \item |citecmd=autocite| instructs \textsf{icite} to use the | 68 | \item |citecmd=autocite| instructs \textsf{icite} to use the |
69 | |\autocite| command to insert the citations in the body text. | 69 | |\autocite| command to insert the citations in the body text. |
70 | \item |defaultindex=none| disables indexing by default. | 70 | \item |defaultindex=none| disables indexing by default. |
71 | \item |\IndexSubtypeAs{ancient}{pr-sources}| makes an exception for | 71 | \item |\IndexSubtypeAs{ancient}{icite-biblatex-primary}| makes an |
72 | authors whose |entrysubtype| field matches the string |ancient| and | 72 | exception for authors whose |entrysubtype| field matches the string |
73 | instructs \textsf{icite} to have them indexed in an index named | 73 | |ancient| and instructs \textsf{icite} to have them indexed in an |
74 | |pr-sources|. | 74 | index named\\ |icite-biblatex-primary|. |
75 | \item To actually produce the index, |\printindex[pr-sources]| is needed | 75 | \item To actually produce the index, |
76 | at the end of the document. | 76 | |\printindex[icite-biblatex-primary]| is needed at the end of the |
77 | document. | ||
77 | \end{enumerate} | 78 | \end{enumerate} |
78 | 79 | ||
79 | \section*{Body text} | 80 | \section*{Body text} |
@@ -94,7 +95,7 @@ another\icite[\arist{1253}[a][30--39]]{Aristotle:Politica}. | |||
94 | 95 | ||
95 | This passage should not be indexed\icite[44--78]{Reynolds.Wilson1994}. | 96 | This passage should not be indexed\icite[44--78]{Reynolds.Wilson1994}. |
96 | 97 | ||
97 | \printindex[pr-sources] | 98 | \printindex[\jobname-primary] |
98 | 99 | ||
99 | \section*{Bibliographical database} | 100 | \section*{Bibliographical database} |
100 | \VerbatimInput{bibsample.bib} | 101 | \VerbatimInput{bibsample.bib} |
diff --git a/samples/icite-minimal.tex b/samples/icite-minimal.tex new file mode 100644 index 0000000..32bb4a2 --- /dev/null +++ b/samples/icite-minimal.tex | |||
@@ -0,0 +1,72 @@ | |||
1 | \documentclass{article} | ||
2 | \usepackage[english]{babel} | ||
3 | |||
4 | \usepackage[small]{titlesec} | ||
5 | |||
6 | \usepackage{latexcolors} | ||
7 | \usepackage[outputdir=TMP/]{minted} | ||
8 | \setminted{bgcolor=lavendermist} | ||
9 | |||
10 | \usepackage{ccicons} | ||
11 | \usepackage{enumitem} | ||
12 | \setlist{nosep} | ||
13 | \setlist[itemize]{label=\textendash} | ||
14 | \setlist[enumerate,1]{label=(\alph*)} | ||
15 | \setlist[enumerate,2]{label=\roman*.} | ||
16 | |||
17 | \usepackage{xurl} | ||
18 | \usepackage[colorlinks]{hyperref} | ||
19 | |||
20 | \begin{document} | ||
21 | \vspace*{-.5in} | ||
22 | \noindent | ||
23 | \textbf{\textsf{icite sample file}} --- \cczero\ This | ||
24 | file is public domain | ||
25 | |||
26 | \section*{Instructions} | ||
27 | \begin{enumerate} | ||
28 | \item Start a new document, copy and paste the code that follows. | ||
29 | \item The default citation command used by \textsf{icite} has been set | ||
30 | to \verb|autocite|. Adapt. | ||
31 | \item The \textsf{biblatex} style file selected is | ||
32 | \verb|oxnotes|. Adapt. | ||
33 | \item Insert the citations in the body text with | ||
34 | \mint{latex}|\icite[<pre>][<post>]{<key>}| | ||
35 | \item Compile the document with \verb|--shell-escape|.\footnote{More | ||
36 | information on how to do this: \url{https://texfaq.org/FAQ-spawnprog}} | ||
37 | \end{enumerate} | ||
38 | |||
39 | \begin{minted}{latex} | ||
40 | \RequirePackage{filecontents} | ||
41 | \begin{filecontents*}{\jobname.xdy} | ||
42 | (merge-rule "\*" "" :eregexp) | ||
43 | \end{filecontents*} | ||
44 | % | ||
45 | \documentclass{article} | ||
46 | \usepackage[english]{babel} | ||
47 | |||
48 | % load icite | ||
49 | \usepackage[citecmd=autocite, defaultindex=loccit]{icite} | ||
50 | \bibinput{bibliography} | ||
51 | |||
52 | % prepare the index | ||
53 | \usepackage[xindy]{imakeidx} | ||
54 | \makeindex[% | ||
55 | name=loccit, | ||
56 | title={Index locorum citatorum}, | ||
57 | options=-M \jobname.xdy] | ||
58 | |||
59 | % load biblatex | ||
60 | \usepackage[style=oxnotes]{biblatex} | ||
61 | \addbibresource{bibliography.bib} | ||
62 | |||
63 | \begin{document} | ||
64 | |||
65 | Your document goes here. | ||
66 | |||
67 | \printindex[loccit] | ||
68 | \printbibliography | ||
69 | \end{document} | ||
70 | \end{minted} | ||
71 | |||
72 | \end{document} | ||
diff --git a/samples/icite-nobiblatex.tex b/samples/icite-nobiblatex.tex index baf2973..d6f824d 100644 --- a/samples/icite-nobiblatex.tex +++ b/samples/icite-nobiblatex.tex | |||
@@ -23,7 +23,7 @@ | |||
23 | \setlist[enumerate,2]{label=\roman*.} | 23 | \setlist[enumerate,2]{label=\roman*.} |
24 | 24 | ||
25 | \usepackage[defaultindex=none, nobibengine]{icite} | 25 | \usepackage[defaultindex=none, nobibengine]{icite} |
26 | \IndexSubtypeAs{ancient}{pr-sources} | 26 | \IndexSubtypeAs{ancient}{\jobname-primary} |
27 | \bibinput{bibsample} | 27 | \bibinput{bibsample} |
28 | 28 | ||
29 | \usepackage{classics} | 29 | \usepackage{classics} |
@@ -31,7 +31,7 @@ | |||
31 | \newclassic{arist}{#1|\textit{#1}|#1} | 31 | \newclassic{arist}{#1|\textit{#1}|#1} |
32 | 32 | ||
33 | \usepackage[xindy,nonewpage]{imakeidx} | 33 | \usepackage[xindy,nonewpage]{imakeidx} |
34 | \makeindex[name=pr-sources, title={Index locorum citatorum}] | 34 | \makeindex[name=\jobname-primary, title={Index locorum citatorum}] |
35 | 35 | ||
36 | \begin{document} | 36 | \begin{document} |
37 | \DefineShortVerb{\|} | 37 | \DefineShortVerb{\|} |
@@ -48,7 +48,7 @@ Bib\LaTeX. | |||
48 | The relevant part of the preamble which is used here follows: | 48 | The relevant part of the preamble which is used here follows: |
49 | \begin{Verbatim} | 49 | \begin{Verbatim} |
50 | \usepackage[defaultindex=none, nobibengine]{icite} | 50 | \usepackage[defaultindex=none, nobibengine]{icite} |
51 | \IndexSubtypeAs{ancient}{pr-sources} | 51 | \IndexSubtypeAs{ancient}{icite-nobiblatex-primary} |
52 | \bibinput{bibsample} | 52 | \bibinput{bibsample} |
53 | 53 | ||
54 | \usepackage{classics} | 54 | \usepackage{classics} |
@@ -56,7 +56,7 @@ The relevant part of the preamble which is used here follows: | |||
56 | \newclassic{arist}{#1|\textit{#1}|#1} | 56 | \newclassic{arist}{#1|\textit{#1}|#1} |
57 | 57 | ||
58 | \usepackage[xindy]{imakeidx} | 58 | \usepackage[xindy]{imakeidx} |
59 | \makeindex[name=pr-sources, title={Index locorum citatorum}] | 59 | \makeindex[name=icite-nobiblatex-primary, title={Index locorum citatorum}] |
60 | \end{Verbatim} | 60 | \end{Verbatim} |
61 | 61 | ||
62 | \paragraph{Remarks} | 62 | \paragraph{Remarks} |
@@ -64,12 +64,13 @@ The relevant part of the preamble which is used here follows: | |||
64 | \item |defaultindex=none| disables indexing by default. | 64 | \item |defaultindex=none| disables indexing by default. |
65 | \item |nobibengine| instructs \textsf{icite} to insert the citations | 65 | \item |nobibengine| instructs \textsf{icite} to insert the citations |
66 | in the body text without using either \hologo{BibTeX} or Bib\LaTeX. | 66 | in the body text without using either \hologo{BibTeX} or Bib\LaTeX. |
67 | \item |\IndexSubtypeAs{ancient}{pr-sources}| makes an exception for | 67 | \item |\IndexSubtypeAs{ancient}{icite-nobiblatex-primary}| makes an |
68 | authors whose |entrysubtype| field matches the string |ancient| and | 68 | exception for authors whose |entrysubtype| field matches the string |
69 | instructs \textsf{icite} to have them indexed in an index named | 69 | |ancient| and instructs \textsf{icite} to have them indexed in an |
70 | |pr-sources|. | 70 | index named\\ |icite-nobiblatex-primary|. |
71 | \item To actually produce the index, |\printindex[pr-sources]| is | 71 | \item To actually produce the index, |
72 | needed at the end of the document. | 72 | |\printindex[icite-nobiblatex-primary]| is needed at the end of the |
73 | document. | ||
73 | \end{enumerate} | 74 | \end{enumerate} |
74 | 75 | ||
75 | \section*{Body text} | 76 | \section*{Body text} |
@@ -92,7 +93,7 @@ and another.\footnote{% | |||
92 | This passage should not be | 93 | This passage should not be |
93 | indexed.\footnote{\icite[44--78]{Reynolds.Wilson1994}.} | 94 | indexed.\footnote{\icite[44--78]{Reynolds.Wilson1994}.} |
94 | 95 | ||
95 | \printindex[pr-sources] | 96 | \printindex[\jobname-primary] |
96 | 97 | ||
97 | \section*{Bibliographical database} | 98 | \section*{Bibliographical database} |
98 | \VerbatimInput{bibsample.bib} | 99 | \VerbatimInput{bibsample.bib} |