From c5bea9766e3cd202e8aa1f4c790b8ac53ff81cba Mon Sep 17 00:00:00 2001 From: Robert Alessi Date: Fri, 22 Feb 2019 17:42:43 +0100 Subject: initial commit --- Makefile | 32 +++++++++++ icite.dtx | 183 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 215 insertions(+) create mode 100644 Makefile create mode 100644 icite.dtx diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..072d5fd --- /dev/null +++ b/Makefile @@ -0,0 +1,32 @@ +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) +all: $(NAME).pdf + test -e README.txt && mv README.txt README || exit 0 +$(NAME).pdf: $(NAME).dtx + pdflatex -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 + pdflatex --recorder --interaction=nonstopmode $(NAME).dtx > /dev/null + pdflatex --recorder --interaction=nonstopmode $(NAME).dtx > /dev/null +clean: + rm -f $(NAME).{aux,fls,glo,gls,hd,idx,ilg,ind,ins,log,out} +distclean: clean + rm -f $(NAME).{pdf,sty} README +inst: 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) +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) +zip: all + ln -sf . $(NAME) + zip -Drq $(PWD)/$(NAME)-$(VERS).zip $(NAME)/{README,$(NAME).{pdf,dtx}} + 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 @@ +% \iffalse meta-comment +% vim: textwidth=75 +%<*internal> +\iffalse +% +%<*readme> +| +-------:| ----------------------------------------------------------------- + icite:| Make Indices locorum citatorum + Author:| Robert Alessi + E-mail:| alessi@robertalessi.net +License:| Released under the LaTeX Project Public License v1.3c or later + See:| http://www.latex-project.org/lppl.txt + + +Short description: +Some text about the package: probably the same as the abstract. +% +%<*internal> +\fi +\def\nameofplainTeX{plain} +\ifx\fmtname\nameofplainTeX\else + \expandafter\begingroup +\fi +% +%<*install> +\input docstrip.tex +\keepsilent +\askforoverwritefalse +\preamble +-------:| ----------------------------------------------------------------- + icite:| Make Indices locorum citatorum + Author:| Robert Alessi + E-mail:| alessi@robertalessi.net +License:| Released under the LaTeX Project Public License v1.3c or later + See:| http://www.latex-project.org/lppl.txt + +\endpreamble +\postamble + +Copyright (C) 2019 by Robert Alessi + +This work may be distributed and/or modified under the +conditions of the LaTeX Project Public License (LPPL), either +version 1.3c of this license or (at your option) any later +version. The latest version of this license is in the file: + +http://www.latex-project.org/lppl.txt + +This work is "maintained" (as per LPPL maintenance status) by +Robert Alessi. + +This work consists of the file icite.dtx and a Makefile. +Running "make" generates the derived files README, 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. + +\endpostamble + +\usedir{tex/latex/icite} +\generate{ + \file{\jobname.sty}{\from{\jobname.dtx}{package}} +} +% +%\endbatchfile +%<*internal> +\usedir{source/latex/icite} +\generate{ + \file{\jobname.ins}{\from{\jobname.dtx}{install}} +} +\nopreamble\nopostamble +\usedir{doc/latex/icite} +\generate{ + \file{README.txt}{\from{\jobname.dtx}{readme}} +} +\ifx\fmtname\nameofplainTeX + \expandafter\endbatchfile +\else + \expandafter\endgroup +\fi +% +% \fi +% +% \iffalse +%<*driver> +\ProvidesFile{icite.dtx} +% +%\NeedsTeXFormat{LaTeX2e}[1999/12/01] +%\ProvidesPackage{icite} +%<*package> + [2019/02/22 v1.00 Make Indices locorum citatorum] +% +%<*driver> +\documentclass{ltxdoc} +\usepackage[a4paper,margin=25mm,left=50mm,nohead]{geometry} +\usepackage[numbered]{hypdoc} +\usepackage{\jobname} +\EnableCrossrefs +\CodelineIndex +\RecordChanges +\begin{document} + \DocInput{\jobname.dtx} +\end{document} +% +% \fi +% +% \GetFileInfo{\jobname.dtx} +% \DoNotIndex{\newcommand,\newenvironment} +% +%\title{\textsf{icite} --- Make Indices locorum citatorum\thanks{This file +% describes version \fileversion, last revised \filedate.} +%} +%\author{Robert Alessi\thanks{E-mail: alessi@robertalessi.net}} +%\date{Released \filedate} +% +%\maketitle +% +%\changes{v1.00}{2019/02/22}{First public release} +% +% \begin{abstract} +% ==== Put abstract text here. ==== +% \end{abstract} +% +% \section{Usage} +% +% ==== Put descriptive text here. ==== +% +% \DescribeMacro{\dummyMacro} +% This macro does nothing.\index{doing nothing|usage} It is merely an +% example. If this were a real macro, you would put a paragraph here +% describing what the macro is supposed to do, what its mandatory and +% optional arguments are, and so forth. +% +% \DescribeEnv{dummyEnv} +% This environment does nothing. It is merely an example. +% If this were a real environment, you would put a paragraph here +% describing what the environment is supposed to do, what its +% mandatory and optional arguments are, and so forth. +% +%\StopEventually{^^A +% \PrintChanges +% \PrintIndex +%} +% +% \section{Implementation} +% +% \begin{macrocode} +%<*package> + +% \end{macrocode} +% \begin{macro}{\dummyMacro} +% This is a dummy macro. If it did anything, we'd describe its +% implementation here. +% \begin{macrocode} +\newcommand{\dummyMacro}{} +% \end{macrocode} +% \end{macro} +% +% \begin{environment}{dummyEnv} +% This is a dummy environment. If it did anything, we'd describe its +% implementation here. +% \begin{macrocode} +\newenvironment{dummyEnv}{% +}{% +% \end{macrocode} +% \changes{v1.00a}{2019/02/22}{Added a spurious change log entry to +% show what a change \emph{within} an environment definition looks +% like.} +% Don't use |%| to introduce a code comment within a |macrocode| +% environment. Instead, you should typeset all of your comments with +% LaTeX---doing so gives much prettier results. For comments within a +% macro/environment body, just do an |\end{macrocode}|, include some +% commentary, and do another |\begin{macrocode}|. It's that simple. +% \begin{macrocode} +} +% \end{macrocode} +% \end{environment} +% +% \begin{macrocode} +\endinput +% +% \end{macrocode} +%\Finale -- cgit v1.2.3