diff options
author | Robert Alessi <alessi@robertalessi.net> | 2019-03-04 13:32:58 +0100 |
---|---|---|
committer | Robert Alessi <alessi@robertalessi.net> | 2019-03-04 13:32:58 +0100 |
commit | 6455020f533d6c527c2797b2deb4b3091341e912 (patch) | |
tree | 4f8a9a2abbcbae47c9b378445a7d45e5a0d6d362 | |
parent | bee2c175a53560fe69f589ed582cdfa8ab433320 (diff) | |
download | icite-6455020f533d6c527c2797b2deb4b3091341e912.tar.gz |
adapted Makefile and started documenting
-rw-r--r-- | Makefile | 17 | ||||
-rw-r--r-- | icite.dtx | 172 | ||||
-rw-r--r-- | icite.ins | 71 |
3 files changed, 209 insertions, 51 deletions
@@ -8,12 +8,15 @@ all: $(NAME).pdf | |||
8 | test -e README.txt && mv README.txt README || exit 0 | 8 | test -e README.txt && mv README.txt README || exit 0 |
9 | $(NAME).pdf: $(NAME).dtx | 9 | $(NAME).pdf: $(NAME).dtx |
10 | lualatex --shell-escape --recorder --interaction=batchmode $(NAME).dtx >/dev/null | 10 | lualatex --shell-escape --recorder --interaction=batchmode $(NAME).dtx >/dev/null |
11 | biber $(NAME) >/dev/null | ||
11 | if [ -f $(NAME).glo ]; then makeindex -q -s gglo.ist -o $(NAME).gls $(NAME).glo; fi | 12 | if [ -f $(NAME).glo ]; then makeindex -q -s gglo.ist -o $(NAME).gls $(NAME).glo; fi |
12 | if [ -f $(NAME).idx ]; then makeindex -q -s gind.ist -o $(NAME).ind $(NAME).idx; fi | 13 | if [ -f $(NAME).idx ]; then makeindex -q -s gind.ist -o $(NAME).ind $(NAME).idx; fi |
14 | texindy loccit.idx >/dev/null | ||
13 | lualatex --shell-escape --recorder --interaction=nonstopmode $(NAME).dtx > /dev/null | 15 | lualatex --shell-escape --recorder --interaction=nonstopmode $(NAME).dtx > /dev/null |
14 | lualatex --shell-escape --recorder --interaction=nonstopmode $(NAME).dtx > /dev/null | 16 | lualatex --shell-escape --recorder --interaction=nonstopmode $(NAME).dtx > /dev/null |
15 | clean: | 17 | clean: |
16 | rm -f $(NAME).{aux,fls,glo,gls,hd,idx,ilg,ind,ins,log,out,toc,listing} | 18 | rm -f $(NAME).{aux,fls,glo,gls,hd,idx,ilg,ind,log,out,toc,listing,bcf,bib,bbl,blg,run.xml} |
19 | rm -f loccit.* | ||
17 | rm -f *~ | 20 | rm -f *~ |
18 | rm -rf auto/ | 21 | rm -rf auto/ |
19 | distclean: clean uninst | 22 | distclean: clean uninst |
@@ -25,6 +28,10 @@ inst: uninst all | |||
25 | cp $(NAME).dtx $(UTREE)/source/latex/$(NAME) | 28 | cp $(NAME).dtx $(UTREE)/source/latex/$(NAME) |
26 | cp $(NAME).sty $(UTREE)/tex/latex/$(NAME) | 29 | cp $(NAME).sty $(UTREE)/tex/latex/$(NAME) |
27 | cp $(NAME).pdf $(UTREE)/doc/latex/$(NAME) | 30 | cp $(NAME).pdf $(UTREE)/doc/latex/$(NAME) |
31 | local: uninst | ||
32 | lualatex $(NAME).ins | ||
33 | mkdir -p $(UTREE)/{tex,source,doc}/latex/$(NAME) | ||
34 | cp $(NAME).sty $(UTREE)/tex/latex/$(NAME) | ||
28 | uninst: | 35 | uninst: |
29 | rm -rf $(UTREE)/{tex,source,doc}/latex/$(NAME) | 36 | rm -rf $(UTREE)/{tex,source,doc}/latex/$(NAME) |
30 | #install: all | 37 | #install: all |
@@ -38,13 +45,13 @@ zip: all | |||
38 | rm $(NAME) | 45 | rm $(NAME) |
39 | package: distclean all | 46 | package: distclean all |
40 | mkdir $(NAME)/ | 47 | mkdir $(NAME)/ |
41 | cp README *.dtx *.pdf $(NAME)/ | 48 | cp README $(NAME).{dtx,ins,pdf} $(NAME)/ |
42 | mkdir -p tex/latex/$(NAME)/ | 49 | mkdir -p tex/latex/$(NAME)/ |
43 | cp *.sty tex/latex/$(NAME)/ | 50 | cp $(NAME).sty tex/latex/$(NAME)/ |
44 | mkdir -p doc/latex/$(NAME)/ | 51 | mkdir -p doc/latex/$(NAME)/ |
45 | cp *.pdf doc/latex/$(NAME)/ | 52 | cp $(NAME).pdf doc/latex/$(NAME)/ |
46 | mkdir -p source/latex/$(NAME)/ | 53 | mkdir -p source/latex/$(NAME)/ |
47 | cp Makefile *.dtx source/latex/$(NAME)/ | 54 | cp Makefile README $(NAME).{dtx,ins} source/latex/$(NAME)/ |
48 | zip -r $(NAME).tds.zip tex doc source | 55 | zip -r $(NAME).tds.zip tex doc source |
49 | rm -rf tex/ source/ doc/ | 56 | rm -rf tex/ source/ doc/ |
50 | tar czf $(NAME)-$(VERS).tar.gz $(NAME).tds.zip $(NAME)/ | 57 | tar czf $(NAME)-$(VERS).tar.gz $(NAME).tds.zip $(NAME)/ |
@@ -90,11 +90,25 @@ Running "make install" installs the files in the local TeX tree. | |||
90 | %</package> | 90 | %</package> |
91 | %<*driver> | 91 | %<*driver> |
92 | \documentclass{ltxdoc} | 92 | \documentclass{ltxdoc} |
93 | \usepackage{filecontents} | ||
94 | \begin{filecontents*}{\jobname.bib} | ||
95 | @software{usebib, | ||
96 | title = {The Usebib package}, | ||
97 | subtitle = {A simple bibliography processor}, | ||
98 | author = {Gregorio, Enrico}, | ||
99 | publisher = {CTAN}, | ||
100 | url = {http://www.ctan.org/pkg/usebib}, | ||
101 | date = {2012-04-13}, | ||
102 | version = {1.0a} | ||
103 | } | ||
104 | \end{filecontents*} | ||
105 | \usepackage[english]{babel} | ||
93 | \usepackage[letterpaper,margin=25mm,left=50mm,nohead]{geometry} | 106 | \usepackage[letterpaper,margin=25mm,left=50mm,nohead]{geometry} |
94 | \usepackage{dox} | 107 | \usepackage{fontspec} |
95 | \doxitem{Option}{option}{options} | 108 | \setmainfont{Old Standard}[RawFeature={+ss05;+ss06}] |
96 | \usepackage{\jobname} | 109 | \usepackage{newunicodechar} |
97 | \usepackage{metalogox} | 110 | \newunicodechar{ǧ}{ǧ} % Old Standard does not include ǧ/Ǧ |
111 | \newunicodechar{Ǧ}{Ǧ} % | ||
98 | \usepackage{hyperxmp} | 112 | \usepackage{hyperxmp} |
99 | \usepackage{uri} | 113 | \usepackage{uri} |
100 | \usepackage[numbered]{hypdoc} | 114 | \usepackage[numbered]{hypdoc} |
@@ -111,13 +125,26 @@ Running "make install" installs the files in the local TeX tree. | |||
111 | pdflicenseurl={https://creativecommons.org/licenses/by-sa/4.0/legalcode}, | 125 | pdflicenseurl={https://creativecommons.org/licenses/by-sa/4.0/legalcode}, |
112 | pdfmetalang={en-US}, pdftype={Text}, pdfkeywords={bibtex, biblatex, | 126 | pdfmetalang={en-US}, pdftype={Text}, pdfkeywords={bibtex, biblatex, |
113 | indexing}} | 127 | indexing}} |
128 | \CodelineIndex | ||
129 | \usepackage[citecmd=footcite,defaultindex]{\jobname} | ||
130 | \bibinput{icite} | ||
131 | \usepackage[nonewpage,xindy]{imakeidx} | ||
132 | \indexsetup{level=\section} | ||
133 | \makeindex[intoc] | ||
134 | \makeindex[name=loccit, title=Modern Authors] | ||
135 | \usepackage[scale=1.5]{ccicons} | ||
136 | \usepackage{dox} | ||
137 | \doxitem{Option}{option}{options} | ||
138 | \usepackage{enumitem} | ||
139 | \setlist{nosep} | ||
140 | \setlist[itemize]{label=\textendash} | ||
141 | \setlist[enumerate,1]{label=(\alph*)} | ||
142 | \setlist[enumerate,2]{label=\roman*.} | ||
114 | \usepackage[lot]{multitoc} | 143 | \usepackage[lot]{multitoc} |
115 | \usepackage{fontspec} | 144 | \usepackage{nameref} |
116 | \setmainfont{Old Standard}[RawFeature={+ss05;+ss06}] | ||
117 | \usepackage{newunicodechar} | ||
118 | \newunicodechar{ǧ}{ǧ} % Old Standard does not include ǧ/Ǧ | ||
119 | \newunicodechar{Ǧ}{Ǧ} % | ||
120 | \usepackage{csquotes} | 145 | \usepackage{csquotes} |
146 | \usepackage[style=oxnotes]{biblatex} | ||
147 | \addbibresource{icite.bib} | ||
121 | \usepackage{hologo,metalogox} | 148 | \usepackage{hologo,metalogox} |
122 | \usepackage{relsize} | 149 | \usepackage{relsize} |
123 | \usepackage{units} | 150 | \usepackage{units} |
@@ -128,8 +155,8 @@ Running "make install" installs the files in the local TeX tree. | |||
128 | \usepackage[breakable, skins, xparse, minted]{tcolorbox} | 155 | \usepackage[breakable, skins, xparse, minted]{tcolorbox} |
129 | \tcbset{colback=white, boxrule=.15mm, colframe=red!50!white, left=6mm, | 156 | \tcbset{colback=white, boxrule=.15mm, colframe=red!50!white, left=6mm, |
130 | breakable} | 157 | breakable} |
131 | \newtcblisting{example}{minted options=linenos} | 158 | \newtcblisting{iexample}{minted options=linenos} |
132 | \newtcblisting{code}{minted options=linenos, listing only} | 159 | \newtcblisting{icode}{minted options=linenos, listing only} |
133 | \usepackage{etoc} | 160 | \usepackage{etoc} |
134 | \etocsettocdepth{paragraph} | 161 | \etocsettocdepth{paragraph} |
135 | \newcommand{\icitetableofcontents}{% | 162 | \newcommand{\icitetableofcontents}{% |
@@ -151,13 +178,18 @@ Running "make install" installs the files in the local TeX tree. | |||
151 | \tableofcontents | 178 | \tableofcontents |
152 | \endgroup} | 179 | \endgroup} |
153 | \EnableCrossrefs | 180 | \EnableCrossrefs |
154 | \CodelineIndex | 181 | %\CodelineIndex |
155 | \RecordChanges | 182 | \RecordChanges |
156 | %\OnlyDescription | 183 | %\OnlyDescription |
157 | \begin{document} | 184 | \begin{document} |
158 | \DocInput{\jobname.dtx} | 185 | \DocInput{\jobname.dtx} |
159 | \PrintChanges | 186 | \PrintChanges |
160 | \PrintIndex | 187 | \indexprologue{Numbers written in italic refer to the page where the |
188 | corresponding entry is described; numbers underlined refer to the | ||
189 | code line of the definition; numbers in roman refer to the code | ||
190 | lines where the entry is used.} | ||
191 | \printindex | ||
192 | %\PrintIndex | ||
161 | \end{document} | 193 | \end{document} |
162 | %</driver> | 194 | %</driver> |
163 | % \fi | 195 | % \fi |
@@ -220,43 +252,91 @@ Running "make install" installs the files in the local TeX tree. | |||
220 | %\changes{v1.00}{2019/02/22}{First public release} | 252 | %\changes{v1.00}{2019/02/22}{First public release} |
221 | % | 253 | % |
222 | % \begin{abstract} | 254 | % \begin{abstract} |
223 | % \package{biblatex} |indexing| option | 255 | % \package{icite} is designed to produce from \hologo{BibTeX} or |
256 | % Bib\LaTeX\ bibliographic databases the different indices of cited | ||
257 | % authors and works which are called \emph{indices locorum | ||
258 | % citatorum}. It relies on a specific \cs{icite} command and can | ||
259 | % operate with either \hologo{BibTeX} or Bib\LaTeX. | ||
224 | % \end{abstract} | 260 | % \end{abstract} |
225 | % | 261 | % |
226 | % \section{Usage} | 262 | % \section*{License and disclamer} |
263 | % \addcontentsline{toc}{section}{License and disclamer} | ||
264 | % \subsection*{License applicable to the software} | ||
265 | % \label{sec:license-software} | ||
266 | % | ||
267 | % \package{icite} --- \emph{Indices locorum citatorum}\\ | ||
268 | % Copyright \textcopyright\ 2019 Robert Alessi | ||
269 | % | ||
270 | % Please send error reports and suggestions for improvements to Robert | ||
271 | % Alessi: | ||
272 | % \begin{itemize} | ||
273 | % \item email: \mailto[icite package]{alessi@roberalessi.net} | ||
274 | % \item website: \url{http://www.robertalessi.net/icite} | ||
275 | % \item development: \url{http://git.robertalessi.net/icite} | ||
276 | % \item comments, feature requests, bug reports: | ||
277 | % \url{https://gitlab.com/ralessi/icite/issues} | ||
278 | % \end{itemize} | ||
279 | % | ||
280 | % \marginpar{\texttt{gpl3+}} | ||
281 | % This program is free software: you can redistribute it and/or modify | ||
282 | % it under the terms of the GNU General Public License as published by | ||
283 | % the Free Software Foundation, either version 3 of the License, or | ||
284 | % (at your option) any later version. | ||
285 | % | ||
286 | % This program is distributed in the hope that it will be useful, but | ||
287 | % WITHOUT ANY WARRANTY; without even the implied warranty of | ||
288 | % MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
289 | % General Public License for more details. | ||
227 | % | 290 | % |
228 | % ==== Put descriptive text here. ==== | 291 | % You should have received a copy of the GNU General Public License |
229 | % \DescribeOption{boup}\hfill\tcboxverb{default}\\ Ceci est le boup. | 292 | % along with this program. If not, see |
293 | % <http://www.gnu.org/licenses/>. | ||
294 | % | ||
295 | % This release of \package{icite} consists of the following | ||
296 | % source files: | ||
297 | % \begin{itemize} | ||
298 | % \item |icite.dtx| | ||
299 | % \item |Makefile| | ||
300 | % \end{itemize} | ||
230 | % | 301 | % |
231 | % \DescribeMacro{\dummyMacro} | 302 | % \subsection*{License applicable to this document} |
232 | % This macro does nothing.\index{doing nothing|usage} It is merely an | 303 | % \label{sec:documentation-license} |
233 | % example. If this were a real macro, you would put a paragraph here | 304 | % Copyright \textcopyright\ 2019 Robert Alessi |
234 | % describing what the macro is supposed to do, what its mandatory and | 305 | % |
235 | % optional arguments are, and so forth. | 306 | % \ccbysa\marginpar{\texttt{CC BY-SA 4.0}} |
236 | % \DescribeEnv{dummyEnv} | 307 | % This document is licensed under the Creative Commons |
237 | % This environment does nothing. It is merely an example. | 308 | % Attribution-ShareAlike 4.0 International License. To view a copy of |
238 | % If this were a real environment, you would put a paragraph here | 309 | % this license, visit |
239 | % describing what the environment is supposed to do, what its | 310 | % \url{http://creativecommons.org/licenses/by-sa/4.0/} or send a |
240 | % mandatory and optional arguments are, and so forth. | 311 | % letter to Creative Commons, PO Box 1866, Mountain View, CA 94042, |
241 | %\iffalse | 312 | % USA. |
242 | %<*example> | 313 | % |
243 | %\fi | 314 | % \section{Introduction} |
244 | \begin{example} | 315 | % \label{sec:introduction} |
245 | \emph{tchic} | 316 | % Bib\LaTeX\ features a very powerful internal mechanism which |
246 | \end{example} | 317 | % supports indexing of citations and bibliographic entries and can be |
247 | %\iffalse | 318 | % activated by a simple |indexing| option in the preamble. However, by |
248 | %</example> | 319 | % default, only the authors and the works cited are inserted in the |
249 | %\fi | 320 | % index. Furthermore, authors and works are indexed separately and |
250 | %\iffalse | 321 | % only inserted in the global index that is generated by |
251 | %<*example> | 322 | % \cs{makeindex}. Another limitation is that the references are also |
252 | %\fi | 323 | % excluded from the index. |
253 | \begin{code} | ||
254 | \vroum[tchic]{tchic} | ||
255 | \end{code} | ||
256 | %\iffalse | ||
257 | %</example> | ||
258 | %\fi | ||
259 | % | 324 | % |
325 | % Notwithstanding these limitations, it is quite possible to typeset | ||
326 | % \emph{indices locorum citatorum} with Bib\LaTeX, but this remains an | ||
327 | % intricate business and requires knowing how to redefine and/or patch | ||
328 | % standard and internal Bib\LaTeX\ commands. | ||
329 | % | ||
330 | % The \package{icite} package is but a modest piece of software which | ||
331 | % addresses this situation. It relies on citation commands, but does | ||
332 | % not require Bib\LaTeX. Instead, \hologo{BibTeX} can be used as | ||
333 | % \package{icite} uses the \package{usebib} package\icite{usebib} to | ||
334 | % build the indices by drawing directly from the bibliographic | ||
335 | % database. | ||
336 | % | ||
337 | % \printindex[loccit] | ||
338 | % \printbibliography[heading=bibnumbered] | ||
339 | % | ||
260 | %\StopEventually{} | 340 | %\StopEventually{} |
261 | % | 341 | % |
262 | % \section{Implementation} | 342 | % \section{Implementation} |
diff --git a/icite.ins b/icite.ins new file mode 100644 index 0000000..0654f14 --- /dev/null +++ b/icite.ins | |||
@@ -0,0 +1,71 @@ | |||
1 | %% | ||
2 | %% This is file `icite.ins', | ||
3 | %% generated with the docstrip utility. | ||
4 | %% | ||
5 | %% The original source files were: | ||
6 | %% | ||
7 | %% icite.dtx (with options: `install') | ||
8 | %% | ||
9 | %% Copyright (C) 2019 by Robert Alessi <alessi@robertalessi.net> | ||
10 | %% | ||
11 | %% Please send error reports and suggestions for improvements to Robert | ||
12 | %% Alessi <alessi@robertalessi.net> | ||
13 | %% | ||
14 | %% This program is free software: you can redistribute it and/or modify | ||
15 | %% it under the terms of the GNU General Public License as published by | ||
16 | %% the Free Software Foundation, either version 3 of the License, or | ||
17 | %% (at your option) any later version. | ||
18 | %% | ||
19 | %% This program is distributed in the hope that it will be useful, but | ||
20 | %% WITHOUT ANY WARRANTY; without even the implied warranty of | ||
21 | %% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
22 | %% General Public License for more details. | ||
23 | %% | ||
24 | %% You should have received a copy of the GNU General Public License | ||
25 | %% along with this program. If not, see | ||
26 | %% <http://www.gnu.org/licenses/>. | ||
27 | %% | ||
28 | %% This work consists of the file icite.dtx and a Makefile. | ||
29 | %% Running "make" generates the derived files README, icite.pdf and icite.sty. | ||
30 | %% Running "make inst" installs the files in the user's TeX tree. | ||
31 | %% Running "make install" installs the files in the local TeX tree. | ||
32 | %% | ||
33 | \input docstrip.tex | ||
34 | \keepsilent | ||
35 | \askforoverwritefalse | ||
36 | \preamble | ||
37 | |||
38 | Copyright (C) 2019 by Robert Alessi <alessi@robertalessi.net> | ||
39 | |||
40 | Please send error reports and suggestions for improvements to Robert | ||
41 | Alessi <alessi@robertalessi.net> | ||
42 | |||
43 | This program is free software: you can redistribute it and/or modify | ||
44 | it under the terms of the GNU General Public License as published by | ||
45 | the Free Software Foundation, either version 3 of the License, or | ||
46 | (at your option) any later version. | ||
47 | |||
48 | This program is distributed in the hope that it will be useful, but | ||
49 | WITHOUT ANY WARRANTY; without even the implied warranty of | ||
50 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
51 | General Public License for more details. | ||
52 | |||
53 | You should have received a copy of the GNU General Public License | ||
54 | along with this program. If not, see | ||
55 | <http://www.gnu.org/licenses/>. | ||
56 | |||
57 | This work consists of the file icite.dtx and a Makefile. | ||
58 | Running "make" generates the derived files README, icite.pdf and icite.sty. | ||
59 | Running "make inst" installs the files in the user's TeX tree. | ||
60 | Running "make install" installs the files in the local TeX tree. | ||
61 | |||
62 | \endpreamble | ||
63 | |||
64 | \usedir{tex/latex/icite} | ||
65 | \generate{ | ||
66 | \file{\jobname.sty}{\from{\jobname.dtx}{package}} | ||
67 | } | ||
68 | \endbatchfile | ||
69 | \endinput | ||
70 | %% | ||
71 | %% End of file `icite.ins'. | ||