aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobert Alessi <alessi@robertalessi.net>2019-02-22 17:42:43 +0100
committerRobert Alessi <alessi@robertalessi.net>2019-02-22 17:42:43 +0100
commitc5bea9766e3cd202e8aa1f4c790b8ac53ff81cba (patch)
tree365ff28e5961b1ae2f087d7d786e3ea287b3161e
downloadicite-c5bea9766e3cd202e8aa1f4c790b8ac53ff81cba.tar.gz
initial commit
-rw-r--r--Makefile32
-rw-r--r--icite.dtx183
2 files changed, 215 insertions, 0 deletions
diff --git a/Makefile b/Makefile
new file mode 100644
index 0000000..072d5fd
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,32 @@
1NAME = icite
2SHELL = bash
3PWD = $(shell pwd)
4VERS = $(shell ltxfileinfo -v $(NAME).dtx|sed -e 's/^v//')
5LOCAL = $(shell kpsewhich --var-value TEXMFLOCAL)
6UTREE = $(shell kpsewhich --var-value TEXMFHOME)
7all: $(NAME).pdf
8 test -e README.txt && mv README.txt README || exit 0
9$(NAME).pdf: $(NAME).dtx
10 pdflatex -shell-escape -recorder -interaction=batchmode $(NAME).dtx >/dev/null
11 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 pdflatex --recorder --interaction=nonstopmode $(NAME).dtx > /dev/null
14 pdflatex --recorder --interaction=nonstopmode $(NAME).dtx > /dev/null
15clean:
16 rm -f $(NAME).{aux,fls,glo,gls,hd,idx,ilg,ind,ins,log,out}
17distclean: clean
18 rm -f $(NAME).{pdf,sty} README
19inst: all
20 mkdir -p $(UTREE)/{tex,source,doc}/latex/$(NAME)
21 cp $(NAME).dtx $(UTREE)/source/latex/$(NAME)
22 cp $(NAME).sty $(UTREE)/tex/latex/$(NAME)
23 cp $(NAME).pdf $(UTREE)/doc/latex/$(NAME)
24install: all
25 sudo mkdir -p $(LOCAL)/{tex,source,doc}/latex/$(NAME)
26 sudo cp $(NAME).dtx $(LOCAL)/source/latex/$(NAME)
27 sudo cp $(NAME).sty $(LOCAL)/tex/latex/$(NAME)
28 sudo cp $(NAME).pdf $(LOCAL)/doc/latex/$(NAME)
29zip: all
30 ln -sf . $(NAME)
31 zip -Drq $(PWD)/$(NAME)-$(VERS).zip $(NAME)/{README,$(NAME).{pdf,dtx}}
32 rm $(NAME)
diff --git a/icite.dtx b/icite.dtx
new file mode 100644
index 0000000..6bc6db1
--- /dev/null
+++ b/icite.dtx
@@ -0,0 +1,183 @@
1% \iffalse meta-comment
2% vim: textwidth=75
3%<*internal>
4\iffalse
5%</internal>
6%<*readme>
7|
8-------:| -----------------------------------------------------------------
9 icite:| Make Indices locorum citatorum
10 Author:| Robert Alessi
11 E-mail:| alessi@robertalessi.net
12License:| Released under the LaTeX Project Public License v1.3c or later
13 See:| http://www.latex-project.org/lppl.txt
14
15
16Short description:
17Some text about the package: probably the same as the abstract.
18%</readme>
19%<*internal>
20\fi
21\def\nameofplainTeX{plain}
22\ifx\fmtname\nameofplainTeX\else
23 \expandafter\begingroup
24\fi
25%</internal>
26%<*install>
27\input docstrip.tex
28\keepsilent
29\askforoverwritefalse
30\preamble
31-------:| -----------------------------------------------------------------
32 icite:| Make Indices locorum citatorum
33 Author:| Robert Alessi
34 E-mail:| alessi@robertalessi.net
35License:| Released under the LaTeX Project Public License v1.3c or later
36 See:| http://www.latex-project.org/lppl.txt
37
38\endpreamble
39\postamble
40
41Copyright (C) 2019 by Robert Alessi <alessi@robertalessi.net>
42
43This work may be distributed and/or modified under the
44conditions of the LaTeX Project Public License (LPPL), either
45version 1.3c of this license or (at your option) any later
46version. The latest version of this license is in the file:
47
48http://www.latex-project.org/lppl.txt
49
50This work is "maintained" (as per LPPL maintenance status) by
51Robert Alessi.
52
53This work consists of the file icite.dtx and a Makefile.
54Running "make" generates the derived files README, icite.pdf and icite.sty.
55Running "make inst" installs the files in the user's TeX tree.
56Running "make install" installs the files in the local TeX tree.
57
58\endpostamble
59
60\usedir{tex/latex/icite}
61\generate{
62 \file{\jobname.sty}{\from{\jobname.dtx}{package}}
63}
64%</install>
65%<install>\endbatchfile
66%<*internal>
67\usedir{source/latex/icite}
68\generate{
69 \file{\jobname.ins}{\from{\jobname.dtx}{install}}
70}
71\nopreamble\nopostamble
72\usedir{doc/latex/icite}
73\generate{
74 \file{README.txt}{\from{\jobname.dtx}{readme}}
75}
76\ifx\fmtname\nameofplainTeX
77 \expandafter\endbatchfile
78\else
79 \expandafter\endgroup
80\fi
81%</internal>
82% \fi
83%
84% \iffalse
85%<*driver>
86\ProvidesFile{icite.dtx}
87%</driver>
88%<package>\NeedsTeXFormat{LaTeX2e}[1999/12/01]
89%<package>\ProvidesPackage{icite}
90%<*package>
91 [2019/02/22 v1.00 Make Indices locorum citatorum]
92%</package>
93%<*driver>
94\documentclass{ltxdoc}
95\usepackage[a4paper,margin=25mm,left=50mm,nohead]{geometry}
96\usepackage[numbered]{hypdoc}
97\usepackage{\jobname}
98\EnableCrossrefs
99\CodelineIndex
100\RecordChanges
101\begin{document}
102 \DocInput{\jobname.dtx}
103\end{document}
104%</driver>
105% \fi
106%
107% \GetFileInfo{\jobname.dtx}
108% \DoNotIndex{\newcommand,\newenvironment}
109%
110%\title{\textsf{icite} --- Make Indices locorum citatorum\thanks{This file
111% describes version \fileversion, last revised \filedate.}
112%}
113%\author{Robert Alessi\thanks{E-mail: alessi@robertalessi.net}}
114%\date{Released \filedate}
115%
116%\maketitle
117%
118%\changes{v1.00}{2019/02/22}{First public release}
119%
120% \begin{abstract}
121% ==== Put abstract text here. ====
122% \end{abstract}
123%
124% \section{Usage}
125%
126% ==== Put descriptive text here. ====
127%
128% \DescribeMacro{\dummyMacro}
129% This macro does nothing.\index{doing nothing|usage} It is merely an
130% example. If this were a real macro, you would put a paragraph here
131% describing what the macro is supposed to do, what its mandatory and
132% optional arguments are, and so forth.
133%
134% \DescribeEnv{dummyEnv}
135% This environment does nothing. It is merely an example.
136% If this were a real environment, you would put a paragraph here
137% describing what the environment is supposed to do, what its
138% mandatory and optional arguments are, and so forth.
139%
140%\StopEventually{^^A
141% \PrintChanges
142% \PrintIndex
143%}
144%
145% \section{Implementation}
146%
147% \begin{macrocode}
148%<*package>
149
150% \end{macrocode}
151% \begin{macro}{\dummyMacro}
152% This is a dummy macro. If it did anything, we'd describe its
153% implementation here.
154% \begin{macrocode}
155\newcommand{\dummyMacro}{}
156% \end{macrocode}
157% \end{macro}
158%
159% \begin{environment}{dummyEnv}
160% This is a dummy environment. If it did anything, we'd describe its
161% implementation here.
162% \begin{macrocode}
163\newenvironment{dummyEnv}{%
164}{%
165% \end{macrocode}
166% \changes{v1.00a}{2019/02/22}{Added a spurious change log entry to
167% show what a change \emph{within} an environment definition looks
168% like.}
169% Don't use |%| to introduce a code comment within a |macrocode|
170% environment. Instead, you should typeset all of your comments with
171% LaTeX---doing so gives much prettier results. For comments within a
172% macro/environment body, just do an |\end{macrocode}|, include some
173% commentary, and do another |\begin{macrocode}|. It's that simple.
174% \begin{macrocode}
175}
176% \end{macrocode}
177% \end{environment}
178%
179% \begin{macrocode}
180\endinput
181%</package>
182% \end{macrocode}
183%\Finale