diff options
author | Karl Berry <karl@freefriends.org> | 2019-03-13 20:57:59 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2019-03-13 20:57:59 +0000 |
commit | ecedbcffe103deeb26a47ffac3990c8eb8a926d7 (patch) | |
tree | f8bc69730d0991dbbf4b5c9cbb73d74cd32a59a2 /Master/texmf-dist/source/latex/icite | |
parent | c949589f88bf58fd53126ff26270f64ac12bb9be (diff) |
icite (13mar19)
git-svn-id: svn://tug.org/texlive/trunk@50375 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/source/latex/icite')
-rw-r--r-- | Master/texmf-dist/source/latex/icite/Makefile | 70 | ||||
-rw-r--r-- | Master/texmf-dist/source/latex/icite/README.md | 112 | ||||
-rw-r--r-- | Master/texmf-dist/source/latex/icite/icite.dtx | 95 |
3 files changed, 248 insertions, 29 deletions
diff --git a/Master/texmf-dist/source/latex/icite/Makefile b/Master/texmf-dist/source/latex/icite/Makefile index 496bc140295..8709733dd9c 100644 --- a/Master/texmf-dist/source/latex/icite/Makefile +++ b/Master/texmf-dist/source/latex/icite/Makefile @@ -4,6 +4,12 @@ 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) + +exts := md bib ins dtx html +extsi := tex +findopts := $(foreach ext,$(exts),-or -iname "*.$(ext)") +findoptsi := $(foreach ext,$(extsi),-or -iname "*.$(ext)") + all: $(NAME).pdf # test -e README.md || exit 0 $(NAME).pdf: $(NAME).dtx @@ -16,47 +22,91 @@ $(NAME).pdf: $(NAME).dtx if [ -f primary.idx ]; then texindy -M icite.xdy primary.idx >/dev/null; fi lualatex --shell-escape --recorder --interaction=nonstopmode $(NAME).dtx > /dev/null lualatex --shell-escape --recorder --interaction=nonstopmode $(NAME).dtx > /dev/null + if [ ! -d $(PWD)/TMP ]; then mkdir $(PWD)/TMP; fi + cp $(PWD)/samples/*.bib $(PWD)/TMP + lualatex --output-dir=$(PWD)/TMP --shell-escape samples/icite-biblatex.tex + lualatex --output-dir=$(PWD)/TMP --shell-escape samples/icite-biblatex.tex + texindy $(PWD)/TMP/pr-sources.idx + biber $(PWD)/TMP/icite-biblatex + lualatex --output-dir=$(PWD)/TMP --shell-escape samples/icite-biblatex.tex + lualatex --output-dir=$(PWD)/TMP --shell-escape samples/icite-biblatex.tex + lualatex --output-dir=$(PWD)/TMP --shell-escape samples/icite-nobiblatex.tex + lualatex --output-dir=$(PWD)/TMP --shell-escape samples/icite-nobiblatex.tex + texindy $(PWD)/TMP/pr-sources.idx + lualatex --output-dir=$(PWD)/TMP --shell-escape samples/icite-nobiblatex.tex + lualatex --output-dir=$(PWD)/TMP --shell-escape samples/icite-nobiblatex.tex + mv TMP/*.pdf samples/ + +samples: + if [ ! -d $(PWD)/TMP ]; then mkdir $(PWD)/TMP; fi + cp $(PWD)/samples/*.bib $(PWD)/TMP + lualatex --output-dir=$(PWD)/TMP --shell-escape samples/icite-biblatex.tex + lualatex --output-dir=$(PWD)/TMP --shell-escape samples/icite-biblatex.tex + texindy $(PWD)/TMP/pr-sources.idx + biber $(PWD)/TMP/icite-biblatex + lualatex --output-dir=$(PWD)/TMP --shell-escape samples/icite-biblatex.tex + lualatex --output-dir=$(PWD)/TMP --shell-escape samples/icite-biblatex.tex + lualatex --output-dir=$(PWD)/TMP --shell-escape samples/icite-nobiblatex.tex + lualatex --output-dir=$(PWD)/TMP --shell-escape samples/icite-nobiblatex.tex + texindy $(PWD)/TMP/pr-sources.idx + lualatex --output-dir=$(PWD)/TMP --shell-escape samples/icite-nobiblatex.tex + lualatex --output-dir=$(PWD)/TMP --shell-escape samples/icite-nobiblatex.tex + mv TMP/*.pdf samples/ + lualatex: lualatex --shell-escape --recorder --interaction=batchmode $(NAME).dtx >/dev/null + clean: lualatex - rm -f $(NAME).{aux,fls,glo,gls,hd,idx,ilg,ind,log,out,toc,xdy,listing,bcf,bib,bbl,blg,run.xml} - rm -f loccit.* primary.* - rm -f *~ - rm -rf auto/ -distclean: clean uninst - rm -rf _minted-* - rm -f $(NAME).{pdf,sty} - rm -f *.zip *.tar.gz + rm -f $(NAME).bib $(PWD)/TMP/*.bib + rm -rf .backup + find -iname "*~" -or -iname "*.pdf" | xargs rm -rf + find ./* -type f -iname "Makefile" $(findopts) > ls-R + find ./* -type f -iname "samples/*" $(findoptsi) >> ls-R + rsync -avPr --files-from=ls-R . .backup + rm -rf * + cp -p -r .backup/* . + rm -rf .backup pandoc -s README.md -o about.html + +distclean: clean uninst + inst: uninst 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) + 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 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) + uninstall: rm -rf $(LOCAL)/{tex,source,doc}/latex/$(NAME) + zip: all ln -sf . $(NAME) - zip -Drq $(PWD)/$(NAME)-$(VERS).zip $(NAME)/{README.md,$(NAME).{pdf,dtx,ins}} + zip -Drq $(PWD)/$(NAME)-$(VERS).zip $(NAME)/{samples,README.md,$(NAME).{pdf,dtx,ins}} rm $(NAME) + package: distclean all mkdir $(NAME)/ cp Makefile README.md $(NAME).{dtx,ins,pdf} $(NAME)/ + cp -r samples/ $(NAME)/ mkdir -p tex/latex/$(NAME)/ cp $(NAME).sty tex/latex/$(NAME)/ mkdir -p doc/latex/$(NAME)/ cp $(NAME).pdf doc/latex/$(NAME)/ + cp -r samples/ doc/latex/$(NAME)/ mkdir -p source/latex/$(NAME)/ cp Makefile README.md $(NAME).{dtx,ins} source/latex/$(NAME)/ zip -r $(NAME).tds.zip tex doc source @@ -64,4 +114,4 @@ package: distclean all tar czf $(NAME)-$(VERS).tar.gz $(NAME).tds.zip $(NAME)/ rm -rf $(NAME)/ -.PHONY: all lualatex clean distclean inst local uninst install uninstall zip package +.PHONY: all lualatex clean distclean inst local uninst install uninstall zip package samples diff --git a/Master/texmf-dist/source/latex/icite/README.md b/Master/texmf-dist/source/latex/icite/README.md new file mode 100644 index 00000000000..05846e536a7 --- /dev/null +++ b/Master/texmf-dist/source/latex/icite/README.md @@ -0,0 +1,112 @@ +--- +author: +- Robert Alessi +title: 'The icite package – README file' +--- + +Overview +======== + +`icite` is designed to produce from BibTeX or BibLaTeX bibliographical +databases the different indices of authors and works cited which are +called _indices locorum citatorum_. It relies on a specific +`\icite` command and can operate with either BibTeX or BibLaTeX. + +License and disclamer +===================== + +icite – Indices locorum citatorum + +Copyright ⓒ 2019 Robert Alessi + +Please send error reports and suggestions for improvements to Robert +Alessi: + +- email: <alessi@robertalessi.net> + +- website: <http://www.robertalessi.net/icite> + +- comments, feature requests, bug reports: + <https://gitlab.com/ralessi/icite/issues> + +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 <http://www.gnu.org/licenses/>. + +This release of icite consists of the following source files: + +- `icite.dtx` + +- `icite.ins` + +- `Makefile` + +License applicable to the documentation +--------------------------------------- + +Copyright ⓒ 2019 Robert Alessi + +The documentation file `icite.pdf` that is generated from the +`icite.dtx` source file 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. + +Installation +============ + +1. Run `'latex icite.ins'` to produce the `icite.sty` + file; + +2. To finish the installation you have to move the `icite.sty` file into + a directory where LaTeX can find them. See the FAQ on `texfaq.org` + at <https://texfaq.org/FAQ-inst-wlcf> for more on this. + +Development, Git Repository +=========================== + +Browse the code +--------------- + +You can browse icite repository on the web: +<http://git.robertalessi.net/icite> + +From this page, you can download all the releases of `icite`. For +instructions on how to install `icite`, please see above. + +Comments, Feature requests, Bug Reports +--------------------------------------- + +<https://gitlab.com/ralessi/icite/issues> + +Download the repository +----------------------- + +`icite` development is facilitated by git, a distributed version +control system. You will need to install git (most GNU/Linux +distributions package it in their repositories). + +Use this command to download the repository + + git clone http://git.robertalessi.net/icite + +A new directory named icite will have been created, containing +`icite`. + +Git hosting +----------- + +Make an account on <https://gitlab.com> and navigate (while logged in) +to <https://gitlab.com/ralessi/icite>. Click *Fork* and you will +have in your account your own repository of `icite` where you will +be able to make whatever changes you like to. + diff --git a/Master/texmf-dist/source/latex/icite/icite.dtx b/Master/texmf-dist/source/latex/icite/icite.dtx index d3dbd2fee24..64152276433 100644 --- a/Master/texmf-dist/source/latex/icite/icite.dtx +++ b/Master/texmf-dist/source/latex/icite/icite.dtx @@ -15,7 +15,7 @@ Overview `icite` is designed to produce from BibTeX or BibLaTeX bibliographical databases the different indices of authors and works cited which are -called \emph{indices locorum citatorum}. It relies on a specific +called _indices locorum citatorum_. It relies on a specific `\icite` command and can operate with either BibTeX or BibLaTeX. License and disclamer @@ -46,7 +46,7 @@ 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/>. +with this program. If not, see <http://www.gnu.org/licenses/>. This release of icite consists of the following source files: @@ -188,7 +188,7 @@ Running "make install" installs the files in the local TeX tree. %<package>\NeedsTeXFormat{LaTeX2e}[1999/12/01] %<package>\ProvidesPackage{icite} %<*package> - [2019/03/07 v1.00 Make Indices locorum citatorum] + [2019/03/12 v1.1 Make Indices locorum citatorum] %</package> %<*driver> \documentclass{ltxdoc} @@ -341,10 +341,11 @@ Running "make install" installs the files in the local TeX tree. \IndexSubtypeAs{classical}{primary} \bibinput{icite} \usepackage[nonewpage,xindy]{imakeidx} -\indexsetup{level=\subsubsection*} +\newcommand{\donothing}[1]{} +\indexsetup{level=\donothing} \makeindex -\makeindex[name=loccit, title=Index of Passages Cited (modern authors)] -\makeindex[name=primary, title=\emph{Index locorum citatorum}] +\makeindex[name=loccit] +\makeindex[name=primary] \usepackage{tabto} \usepackage{classics} \newclassic{iau}{\classicsRoman{#1}|, #1|.#1} @@ -404,6 +405,7 @@ Running "make install" installs the files in the local TeX tree. \begin{document} \DocInput{\jobname.dtx} \PrintChanges + \section{Index} \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 @@ -414,7 +416,7 @@ Running "make install" installs the files in the local TeX tree. %</driver> % \fi % -% \CheckSum{269} +% \CheckSum{316} % % \CharacterTable % {Upper-case \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z @@ -451,6 +453,10 @@ Running "make install" installs the files in the local TeX tree. % % \GetFileInfo{\jobname.dtx} % \DoNotIndex{\newcommand,\newenvironment} +% +% \newcommand*{\NEWfeature}[1]{% +% \hskip 1sp \marginpar{\small\sffamily\raggedright +% New feature\\#1}} % % \title{\tcbox[colframe=black, enhanced, tikznode, drop lifted % shadow, colback=white, boxrule=.25mm]{% @@ -469,11 +475,11 @@ Running "make install" installs the files in the local TeX tree. % \icitetableofcontents % \normalsize % -%\changes{v1.00}{2019/03/07}{First public release} +% \changes{v1.00}{2019/03/07}{First public release} % % \begin{abstract} % \package{icite} is designed to produce from \hologo{BibTeX} or -% Bib\LaTeX\ bibliographic databases the different indices of +% Bib\LaTeX\ bibliographical databases the different indices of % authors and works cited 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. @@ -553,7 +559,7 @@ Running "make install" installs the files in the local TeX tree. % not require Bib\LaTeX. Instead, \hologo{BibTeX} can be used as % \package{icite} uses the \package{usebib} % package\footnote{\cite{usebib}} to build the indices by drawing -% directly from the bibliographic database. +% directly from the bibliographical database. % % % \section[The \package{icite} package]{The \textsf{icite} package} @@ -592,7 +598,24 @@ Running "make install" installs the files in the local TeX tree. % to |loccit| if it is used alone. This is an easy way to have all % passages cited indexed in a separate index named |loccit|. % -% \paragraph{Bibliographic database} +% \DescribeOption{nobibengine}\NEWfeature{v1.1} +% \changes{v1.1}{2019/03/12}{New global option \texttt{nobibengine}}% +% |nobibengine|$=$|true|\verb+|+|false|\hfill% +% \tcboxverb{Default: not set}\\ +% This named argument does not need a value as it defaults to |true| +% if it is used. When this option is activated, \package{icite} does +% not use \hologo{BibTeX} or Bib\LaTeX\ to insert the citations in the +% body text---even if either is loaded in the preamble---and pulls the +% necessary information directly from the bibliographical +% database. For this reason, \cs{bibinput} described below is of +% course still required. The citations inserted consist of the +% elements described below \vref{sec:entry-fields} +% \vpageref{sec:entry-fields}. However, it must be noted that if the +% entry field |shorthand| of any author/work be set in the database, +% it takes precedence over the fields used to define author names and +% titles. +% +% \paragraph{Bibliographical database} % \DescribeMacro{\bibinput} Once \package{icite} is loaded, it must be % connected to at least one bibliographic |.bib| file. To that end, % \package{icite} uses the same \cs{bibinput} command as @@ -607,7 +630,7 @@ Running "make install" installs the files in the local TeX tree. % passages in a separate index named 'loccit': \usepackage[citecmd=autocite, defaultindex]{icite} % note that the .bib file must be stripped of its extension: - \usebib{bibliography} % that is: load bibliography.bib + \bibinput{bibliography} % that is: load bibliography.bib \end{code} % \iffalse %</example> @@ -633,6 +656,7 @@ Running "make install" installs the files in the local TeX tree. % command. % % \subsection{Entry fields} +% \label{sec:entry-fields} % \subsubsection{Author names} % To process author names, \package{icite} uses the following entry % fields: @@ -713,7 +737,7 @@ Running "make install" installs the files in the local TeX tree. % passages in a separate index named 'loccit': \usepackage[citecmd=autocite, defaultindex]{icite} % load bibliography.bib - \usebib{bibliography} + \bibinput{bibliography} % load biblatex (with oxnotes, \autocite acts as \footcite) \usepackage[style=oxnotes]{biblatex} @@ -958,7 +982,9 @@ Running "make install" installs the files in the local TeX tree. % % \subsection{Indices} % \label{ref:indices} +% \subsubsection{Index of Passages Cited (modern authors)} % \printindex[loccit] +% \subsubsection{\emph{Index locorum citatorum}} % \printindex[primary] % % \subsection{\texorpdfstring{\hologo{BibTeX} @@ -990,6 +1016,9 @@ Running "make install" installs the files in the local TeX tree. \def\ic@dfltind{#1} \fi } +\newif\ifno@bibengine +\define@boolkey{icite.sty}[@pkg@]{nobibengine}[true]{% + \if@pkg@nobibengine\no@bibenginetrue\else\fi} \ExecuteOptionsX{citecmd} \ProcessOptionsX\relax % \end{macrocode} @@ -1009,6 +1038,7 @@ Running "make install" installs the files in the local TeX tree. \define@reuse@key{indextitle} \define@reuse@key{indexsorttitle} \define@reuse@key{entrysubtype} +\define@reuse@key{shorthand} % \end{macrocode} % This is the same as \cs{usebibentry} from \package{ebib}, but it % does not return an error if the entry field is not found: @@ -1056,6 +1086,7 @@ Running "make install" installs the files in the local TeX tree. % qualified citation lists or so-called \enquote*{multicite} commands. % \begin{macrocode} \NewDocumentCommand{\icite}{o o m O{\ic@dfltcit}}{% + \edef\@shorthand{\get@bibentry{#3}{shorthand}}% \edef\@subtype{\get@bibentry{#3}{entrysubtype}}% \edef\@author{\get@bibentry{#3}{author}}% \edef\@indexauthor{\get@bibentry{#3}{indexauthor}}% @@ -1070,10 +1101,10 @@ Running "make install" installs the files in the local TeX tree. \def\@useauthor{\@indexauthor}% \fi \ifx\@sortname\empty - \def\@sortedauthor{\@useauthor}% - \else - \def\@sortedauthor{{\@sortname}@\@useauthor}% - \fi + \def\@sortedauthor{\@useauthor}% + \else + \def\@sortedauthor{{\@sortname}@\@useauthor}% + \fi \ifx\@indextitle\empty \ifx\@shorttitle\empty \def\@usetitle{\@title}% @@ -1110,7 +1141,15 @@ Running "make install" installs the files in the local TeX tree. \index{\@sortedauthor!\@sortedtitle}% \fi\fi% \fi}} + \ifno@bibengine + \ifx\@shorthand\empty% + \@useauthor, \TitleStyle{\@usetitle}% + \else% + \@shorthand% + \fi% + \else% \csname #4\endcsname{#3}% + \fi% } {\IfNoValueTF{#2}% {\DTLifdbempty{icite@indices}{% @@ -1134,7 +1173,16 @@ Running "make install" installs the files in the local TeX tree. \index{\@sortedauthor!\@sortedtitle!#1}% \fi\fi% \fi}}% - \csname #4\endcsname[{#1}]{#3}} + \ifno@bibengine + \ifx\@shorthand\empty% + \@useauthor, \TitleStyle{\@usetitle}, {#1}% + \else% + \@shorthand, {#1}% + \fi% + \else% + \csname #4\endcsname[{#1}]{#3}% + \fi% + } {\DTLifdbempty{icite@indices}{% \ifno@index\else \ifdefault@index% @@ -1156,7 +1204,16 @@ Running "make install" installs the files in the local TeX tree. \index{\@sortedauthor!\@sortedtitle!#2}% \fi\fi% \fi}}% - \csname #4\endcsname[#1][{#2}]{#3}}% + \ifno@bibengine + \ifx\@shorthand\empty% + #1 \@useauthor, \TitleStyle{\@usetitle}, {#2}% + \else% + #1 \@shorthand, {#2}% + \fi + \else% + \csname #4\endcsname[#1][{#2}]{#3}% + \fi% + }% }% } % \end{macrocode} |