From 2c38c4359a6f5653a2fdbfcebe128256f23dfee1 Mon Sep 17 00:00:00 2001
From: Robert Alessi <alessi@robertalessi.net>
Date: Sun, 24 Feb 2019 10:55:09 +0100
Subject: adapted Makefile. first lines of .sty file

---
 icite.dtx | 192 ++++++++++++++++++++++++++++++++++++++++++++++----------------
 1 file changed, 142 insertions(+), 50 deletions(-)

(limited to 'icite.dtx')

diff --git a/icite.dtx b/icite.dtx
index 6bc6db1..adfbde7 100644
--- a/icite.dtx
+++ b/icite.dtx
@@ -9,8 +9,8 @@
   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
+License:| Released under the GNU General Public License v3 or later
+    See:| http://www.gnu.org/licenses/
 
 
 Short description:
@@ -32,23 +32,30 @@ Some text about the package: probably the same as the abstract.
   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
+License:| Released under the GNU General Public License v3 or later
+    See:| http://www.gnu.org/licenses/
 
 \endpreamble
 \postamble
 
 Copyright (C) 2019 by Robert Alessi <alessi@robertalessi.net>
 
-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:
+Please send error reports and suggestions for improvements to Robert
+Alessi <alessi@robertalessi.net>
 
-http://www.latex-project.org/lppl.txt
+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 work is "maintained" (as per LPPL maintenance status) by
-Robert Alessi.
+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
+<http://www.gnu.org/licenses/>.
 
 This work consists of the file icite.dtx and a Makefile.
 Running "make" generates the derived files README, icite.pdf and icite.sty.
@@ -92,14 +99,68 @@ Running "make install" installs the files in the local TeX tree.
 %</package>
 %<*driver>
 \documentclass{ltxdoc}
-\usepackage[a4paper,margin=25mm,left=50mm,nohead]{geometry}
-\usepackage[numbered]{hypdoc}
+\usepackage[letterpaper,margin=25mm,left=50mm,nohead]{geometry}
 \usepackage{\jobname}
+\usepackage{metalogox}
+\usepackage{hyperxmp}
+\usepackage{uri}
+\usepackage[numbered]{hypdoc}
+\hypersetup{unicode=true, colorlinks, allcolors=blue,
+  linktocpage=true, pdfauthor={Robert Alessi}, pdftitle={The
+    icite package}, pdfcontactemail={alessi@robertalessi.net},
+  pdfcontacturl={http://www.robertalessi.net/ekdosis},
+  pdfcopyright={Copyright (C) 2018 Robert Alessi
+    <alessi@robertalessi.net>. This document is licensed under the
+    Creative Commons Attribution-ShareAlike 4.0 International
+    License. To view a copy of this license, visit
+    http://creativecommons.org/licenses/by-sa/4.0/ or send a letter to
+    Creative Commons, PO Box 1866, Mountain View, CA 94042, USA.},
+  pdflicenseurl={https://creativecommons.org/licenses/by-sa/4.0/legalcode},
+  pdfmetalang={en-US}, pdftype={Text}, pdfkeywords={bibtex, biblatex,
+    indexing}}
+\usepackage[lot]{multitoc}
+\usepackage{fontspec}
+\setmainfont{Old Standard}[RawFeature={+ss05;+ss06}]
+\usepackage{newunicodechar}
+\newunicodechar{ǧ}{ǧ} % Old Standard does not include ǧ/Ǧ
+\newunicodechar{Ǧ}{Ǧ} %
+\usepackage{relsize}
+\usepackage{units}
+\usepackage{minted}
+\usepackage[contents]{colordoc}
+\newcommand{\package}[1]{\textsf{#1}\index{#1=#1 (package)}}
+\usepackage{tikz}
+\usepackage[breakable, skins, xparse, minted]{tcolorbox}
+\tcbset{colback=white, boxrule=.15mm, colframe=red!50!white, left=6mm,
+  breakable}
+\usepackage{etoc}
+\etocsettocdepth{paragraph}
+\newcommand{\icitetableofcontents}{%
+  \begingroup
+  \etocsetstyle{section}{}{}
+  {\etocsavedsectiontocline{%
+      \numberline{\etocnumber}\etocname}{\etocpage}}{}
+  \etocsetstyle{subsection}{}{}
+  {\etocsavedsubsectiontocline{%
+      \numberline{\etocnumber}\etocname}{\etocpage}}{}%
+  \etocsetstyle{subsubsection}{}{}
+  {\etocsavedsubsubsectiontocline{%
+      \numberline{\etocnumber}\etocname}{\etocpage}}{}%
+  \etocsetstyle{paragraph}{}{\leftskip2cm\rightskip 2.2em \parfillskip
+    0pt plus 1fil\relax \nobreak}
+  {\noindent\etocname{} \etocpage{} }{\par}%
+  \etocmulticolstyle[2]{\section*{Contents}}
+  \pdfbookmark[1]{Contents}{toc}
+  \tableofcontents
+  \endgroup}
 \EnableCrossrefs
 \CodelineIndex
 \RecordChanges
+%\OnlyDescription
 \begin{document}
   \DocInput{\jobname.dtx}
+ \PrintChanges
+ \PrintIndex
 \end{document}
 %</driver>
 % \fi
@@ -107,13 +168,22 @@ Running "make install" installs the files in the local TeX tree.
 % \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}
+% \title{\tcbox[colframe=black, enhanced, tikznode, drop lifted
+% shadow, colback=white, boxrule=.25mm]{%
+% The \textsf{icite} package\\
+% \emph{Indices locorum citatorum}\\
+% \fileversion\ --- \filedate}}
+%  
+% \author{Robert Alessi \\
+% \href{mailto:alessi@robertalessi.net?Subject=icite package}%
+% {\texttt{alessi@robertalessi.net}}}
+% 
+% \date{}
 %
-%\maketitle
+% \maketitle
+% \footnotesize
+% \icitetableofcontents
+% \normalsize
 %
 %\changes{v1.00}{2019/02/22}{First public release}
 %
@@ -130,54 +200,76 @@ Running "make install" installs the files in the local TeX tree.
 % 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{tcblisting}{minted options=linenos}
+  \emph{tchic}
+\end{tcblisting}
+%\iffalse
+%</example>
+%\fi
+%\iffalse
+%<*example>
+%\fi
+\begin{tcblisting}{minted options=linenos, listing only}
+\vroum[tchic]{tchic}
+\end{tcblisting}
+%\iffalse
+%</example>
+%\fi
 %
-%\StopEventually{^^A
-%  \PrintChanges
-%  \PrintIndex
-%}
+%\StopEventually{}
 %
 % \section{Implementation}
 %
-%    \begin{macrocode}
+% \iffalse
 %<*package>
-
+% \fi
+% Declare the global options, and define them:
+%    \begin{macrocode}
+\RequirePackage{xkeyval}
+\DeclareOptionX{citecmd}[cite]{\def\ic@dfltcit{#1}}
+\ExecuteOptionsX{citecmd}
+\ProcessOptionsX\relax
 %    \end{macrocode}
-% \begin{macro}{\dummyMacro}
-% This is a dummy macro.  If it did anything, we'd describe its
-% implementation here.
+% The following packages are required by \package{icite}:
 %    \begin{macrocode}
-\newcommand{\dummyMacro}{}
+\RequirePackage{xparse}
+\RequirePackage{usebib}
 %    \end{macrocode}
-% \end{macro}
-%
-% \begin{environment}{dummyEnv}
-% This is a dummy environment.  If it did anything, we'd describe its
-% implementation here.
+% Define fields to be used by \package{icite}:
 %    \begin{macrocode}
-\newenvironment{dummyEnv}{%
-}{%
+\define@reuse@key{author}
+\define@reuse@key{title}
 %    \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.
+% This is the same as \cs{usebibentry} from \package{ebib}, but it
+% does not return an error if the entry field is not found:
 %    \begin{macrocode}
-}
+\def\get@bibentry#1#2{\@ifundefined{reuse@#1@#2}{}
+  {\@nameuse{reuse@#1@#2}}}
 %    \end{macrocode}
-% \end{environment}
-%
+% \DescribeMacro{\icite}
 %    \begin{macrocode}
-\endinput
-%</package>
+\NewDocumentCommand{\icite}{o o m O{\ic@dfltcit}}{%
+  \IfNoValueTF{#1}
+  {\index{\get@bibentry{#3}{author}!\emph{\get@bibentry{#3}{title}}}%
+    \csname #4\endcsname{#3}}
+  {\IfNoValueTF{#2}
+    {\index{\get@bibentry{#3}{author}!\emph{\get@bibentry{#3}{title}}!#1}%
+      \csname #4\endcsname[{#1}]{#3}}
+    {\index{\get@bibentry{#3}{author}!\emph{\get@bibentry{#3}{title}}!#2}%
+      \csname #4\endcsname[#1][{#2}]{#3}}
+  }
+}
 %    \end{macrocode}
+% \iffalse
+%</package>
+% \fi
 %\Finale
+\endinput
\ No newline at end of file
-- 
cgit v1.2.3

