From 6455020f533d6c527c2797b2deb4b3091341e912 Mon Sep 17 00:00:00 2001
From: Robert Alessi <alessi@robertalessi.net>
Date: Mon, 4 Mar 2019 13:32:58 +0100
Subject: adapted Makefile and started documenting

---
 icite.dtx | 172 +++++++++++++++++++++++++++++++++++++++++++++-----------------
 1 file changed, 126 insertions(+), 46 deletions(-)

(limited to 'icite.dtx')

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.
 %</package>
 %<*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{ǧ}{ǧ} % Old Standard does not include ǧ/Ǧ
+\newunicodechar{Ǧ}{Ǧ} %
 \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{ǧ}{ǧ} % Old Standard does not include ǧ/Ǧ
-\newunicodechar{Ǧ}{Ǧ} %
+\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}
 %</driver>
 % \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
+% <http://www.gnu.org/licenses/>.
+%
+% 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
-%</example>
-%\fi
-%\iffalse
-%<*example>
-%\fi
-\begin{code}
-\vroum[tchic]{tchic}
-\end{code}
-%\iffalse
-%</example>
-%\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}
-- 
cgit v1.2.3

