From 6455020f533d6c527c2797b2deb4b3091341e912 Mon Sep 17 00:00:00 2001 From: Robert Alessi Date: Mon, 4 Mar 2019 13:32:58 +0100 Subject: adapted Makefile and started documenting --- Makefile | 17 +++++-- icite.dtx | 172 +++++++++++++++++++++++++++++++++++++++++++++----------------- icite.ins | 71 ++++++++++++++++++++++++++ 3 files changed, 209 insertions(+), 51 deletions(-) create mode 100644 icite.ins diff --git a/Makefile b/Makefile index 1b4c7c6..237b560 100644 --- a/Makefile +++ b/Makefile @@ -8,12 +8,15 @@ all: $(NAME).pdf test -e README.txt && mv README.txt README || exit 0 $(NAME).pdf: $(NAME).dtx lualatex --shell-escape --recorder --interaction=batchmode $(NAME).dtx >/dev/null + biber $(NAME) >/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 + texindy loccit.idx >/dev/null lualatex --shell-escape --recorder --interaction=nonstopmode $(NAME).dtx > /dev/null lualatex --shell-escape --recorder --interaction=nonstopmode $(NAME).dtx > /dev/null clean: - rm -f $(NAME).{aux,fls,glo,gls,hd,idx,ilg,ind,ins,log,out,toc,listing} + rm -f $(NAME).{aux,fls,glo,gls,hd,idx,ilg,ind,log,out,toc,listing,bcf,bib,bbl,blg,run.xml} + rm -f loccit.* rm -f *~ rm -rf auto/ distclean: clean uninst @@ -25,6 +28,10 @@ inst: uninst all 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 @@ -38,13 +45,13 @@ zip: all rm $(NAME) package: distclean all mkdir $(NAME)/ - cp README *.dtx *.pdf $(NAME)/ + cp README $(NAME).{dtx,ins,pdf} $(NAME)/ mkdir -p tex/latex/$(NAME)/ - cp *.sty tex/latex/$(NAME)/ + cp $(NAME).sty tex/latex/$(NAME)/ mkdir -p doc/latex/$(NAME)/ - cp *.pdf doc/latex/$(NAME)/ + cp $(NAME).pdf doc/latex/$(NAME)/ mkdir -p source/latex/$(NAME)/ - cp Makefile *.dtx source/latex/$(NAME)/ + cp Makefile README $(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)/ diff --git a/icite.dtx b/icite.dtx index 49a2599..35d314d 100644 --- a/icite.dtx +++ b/icite.dtx @@ -90,11 +90,25 @@ Running "make install" installs the files in the local TeX tree. % %<*driver> \documentclass{ltxdoc} +\usepackage{filecontents} +\begin{filecontents*}{\jobname.bib} +@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{dox} -\doxitem{Option}{option}{options} -\usepackage{\jobname} -\usepackage{metalogox} +\usepackage{fontspec} +\setmainfont{Old Standard}[RawFeature={+ss05;+ss06}] +\usepackage{newunicodechar} +\newunicodechar{ǧ}{ǧ} % Old Standard does not include ǧ/Ǧ +\newunicodechar{Ǧ}{Ǧ} % \usepackage{hyperxmp} \usepackage{uri} \usepackage[numbered]{hypdoc} @@ -111,13 +125,26 @@ Running "make install" installs the files in the local TeX tree. pdflicenseurl={https://creativecommons.org/licenses/by-sa/4.0/legalcode}, pdfmetalang={en-US}, pdftype={Text}, pdfkeywords={bibtex, biblatex, indexing}} +\CodelineIndex +\usepackage[citecmd=footcite,defaultindex]{\jobname} +\bibinput{icite} +\usepackage[nonewpage,xindy]{imakeidx} +\indexsetup{level=\section} +\makeindex[intoc] +\makeindex[name=loccit, title=Modern Authors] +\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{fontspec} -\setmainfont{Old Standard}[RawFeature={+ss05;+ss06}] -\usepackage{newunicodechar} -\newunicodechar{ǧ}{ǧ} % Old Standard does not include ǧ/Ǧ -\newunicodechar{Ǧ}{Ǧ} % +\usepackage{nameref} \usepackage{csquotes} +\usepackage[style=oxnotes]{biblatex} +\addbibresource{icite.bib} \usepackage{hologo,metalogox} \usepackage{relsize} \usepackage{units} @@ -128,8 +155,8 @@ Running "make install" installs the files in the local TeX tree. \usepackage[breakable, skins, xparse, minted]{tcolorbox} \tcbset{colback=white, boxrule=.15mm, colframe=red!50!white, left=6mm, breakable} -\newtcblisting{example}{minted options=linenos} -\newtcblisting{code}{minted options=linenos, listing only} +\newtcblisting{iexample}{minted options=linenos} +\newtcblisting{icode}{minted options=linenos, listing only} \usepackage{etoc} \etocsettocdepth{paragraph} \newcommand{\icitetableofcontents}{% @@ -151,13 +178,18 @@ Running "make install" installs the files in the local TeX tree. \tableofcontents \endgroup} \EnableCrossrefs -\CodelineIndex +%\CodelineIndex \RecordChanges %\OnlyDescription \begin{document} - \DocInput{\jobname.dtx} + \DocInput{\jobname.dtx} \PrintChanges - \PrintIndex + \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} % % \fi @@ -220,43 +252,91 @@ Running "make install" installs the files in the local TeX tree. %\changes{v1.00}{2019/02/22}{First public release} % % \begin{abstract} -% \package{biblatex} |indexing| option +% \package{icite} is designed to produce from \hologo{BibTeX} or +% Bib\LaTeX\ bibliographic databases the different indices of cited +% authors and works 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{Usage} +% \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. % -% ==== Put descriptive text here. ==== -% \DescribeOption{boup}\hfill\tcboxverb{default}\\ Ceci est le boup. +% You should have received a copy of the GNU General Public License +% along with this program. If not, see +% . +% +% This release of \package{icite} consists of the following +% source files: +% \begin{itemize} +% \item |icite.dtx| +% \item |Makefile| +% \end{itemize} % -% \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. -%\iffalse -%<*example> -%\fi -\begin{example} - \emph{tchic} -\end{example} -%\iffalse -% -%\fi -%\iffalse -%<*example> -%\fi -\begin{code} -\vroum[tchic]{tchic} -\end{code} -%\iffalse -% -%\fi +% \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\icite{usebib} to +% build the indices by drawing directly from the bibliographic +% database. +% +% \printindex[loccit] +% \printbibliography[heading=bibnumbered] +% %\StopEventually{} % % \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 @@ +%% +%% 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 +%% +%% Please send error reports and suggestions for improvements to Robert +%% Alessi +%% +%% 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 +%% . +%% +%% 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. +%% +\input docstrip.tex +\keepsilent +\askforoverwritefalse +\preamble + +Copyright (C) 2019 by Robert Alessi + +Please send error reports and suggestions for improvements to Robert +Alessi + +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 +. + +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. + +\endpreamble + +\usedir{tex/latex/icite} +\generate{ + \file{\jobname.sty}{\from{\jobname.dtx}{package}} +} +\endbatchfile +\endinput +%% +%% End of file `icite.ins'. -- cgit v1.2.3