From 773310e58596170d4241a9896088b7b77f2cc312 Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Thu, 19 Feb 2015 22:16:31 +0000 Subject: citeall (19feb15) git-svn-id: svn://tug.org/texlive/trunk@36325 c570f23f-e606-0410-a88d-b1316a301751 --- Master/texmf-dist/doc/latex/citeall/README | 18 ++++ Master/texmf-dist/doc/latex/citeall/citeall.pdf | Bin 0 -> 108508 bytes Master/texmf-dist/doc/latex/citeall/citeall.tex | 90 ++++++++++++++++ .../doc/latex/citeall/examples-citeall.bib | 25 +++++ Master/texmf-dist/tex/latex/citeall/citeall.sty | 113 +++++++++++++++++++++ Master/tlpkg/bin/tlpkg-ctan-check | 2 +- Master/tlpkg/tlpsrc/citeall.tlpsrc | 0 Master/tlpkg/tlpsrc/collection-bibtexextra.tlpsrc | 1 + 8 files changed, 248 insertions(+), 1 deletion(-) create mode 100644 Master/texmf-dist/doc/latex/citeall/README create mode 100644 Master/texmf-dist/doc/latex/citeall/citeall.pdf create mode 100644 Master/texmf-dist/doc/latex/citeall/citeall.tex create mode 100644 Master/texmf-dist/doc/latex/citeall/examples-citeall.bib create mode 100644 Master/texmf-dist/tex/latex/citeall/citeall.sty create mode 100644 Master/tlpkg/tlpsrc/citeall.tlpsrc diff --git a/Master/texmf-dist/doc/latex/citeall/README b/Master/texmf-dist/doc/latex/citeall/README new file mode 100644 index 00000000000..3c69cb2a7c2 --- /dev/null +++ b/Master/texmf-dist/doc/latex/citeall/README @@ -0,0 +1,18 @@ +citeall --- A package to cite all entries of a bbl created with biblatex +Version 1.0 Ulrike Fischer 2015 + +LICENSE +LaTeX Project Public License + +CONTENTS + +- Readme (this file) +- citeall.sty (the sty) +- citeall.tex, citeall.pdf (the docu) +- examples-citeall.bib (and example bib-file used by the documentation + +INSTALLATION + +Put the sty where it can be found. +If you want to compile the documentation: +put the bib-file where it can be found. \ No newline at end of file diff --git a/Master/texmf-dist/doc/latex/citeall/citeall.pdf b/Master/texmf-dist/doc/latex/citeall/citeall.pdf new file mode 100644 index 00000000000..5ef6f7c9019 Binary files /dev/null and b/Master/texmf-dist/doc/latex/citeall/citeall.pdf differ diff --git a/Master/texmf-dist/doc/latex/citeall/citeall.tex b/Master/texmf-dist/doc/latex/citeall/citeall.tex new file mode 100644 index 00000000000..40ad48b7c07 --- /dev/null +++ b/Master/texmf-dist/doc/latex/citeall/citeall.tex @@ -0,0 +1,90 @@ +% !Mode:: "TeX:DE:UTF-8:Main" +\documentclass[]{scrartcl} +\usepackage[utf8]{inputenc} +\usepackage[T1]{fontenc} +\usepackage[style=authoryear-ibid,hyperref=false]{biblatex} +\usepackage{citeall} +\usepackage{fourier} +\usepackage{ydoc-desc,tabularx} +\addbibresource{examples-citeall.bib} +\title{The \pkg{citeall} package, v1.0} +\author{Ulrike Fischer} + +\begin{document} +\maketitle +\section{Important} +\pkg{citeall} works only together with \pkg{biblatex}. \pkg{biblatex} should be loaded before \pkg{citeall}. + +The package relies on some inner working of \pkg{biblatex}, so it could break with future versions. + +\section{The aim of the package} +The \pkg{citeall} package is a package to help to adapt and debug \pkg{biblatex} +citation styles. When adapting such a style one often needs to inspect the +output of examples. While it is easy with \verb+\nocite{*}+ to output all entries of a bib-file in the bibliography it is more troublesome to show citations. +So I wrote a (very) small package which allows me to show citations of all entries of the bib-files. + + + + +\section{The command} +The main command of the package is called like the package and has two optional arguments: + +\DescribeMacro\citeall[][] + +The second optional argument sets the number of entries of the .bib (more precisely the .bbl-file) printed by \cs{citeall}. By default everything is cited. + +The first optional argument is a comma separated list. +For each entrykey in the .bbl \cs{citeall} will loop through this list and pass to each item the entrykey as last argument. By default this list consist simply of a \cs{cite} command. The items don't need to be cite commands. As the examples show you can add text and other commands. + +\begin{itemize} +\item The last command should be something that can handle the entry key argument. +\item If there are brackets e.g. from optional argument of a \cs{cite} you should protect them with braces. +\item If there are commas you should protect them with braces. +\item If you want to insert a paragraph break, use \cs{endgraf} +\item Don't overdo the system. It is meant for simple debbugging not for complicated citation printouts. +\end{itemize} + +\section{Some examples} +\verb+\citeall+ \begin{tabular}[t]{p{0.3\textwidth}} + \citeall + \end{tabular} +\verb+\citeall[][1]+ \begin{tabular}[t]{p{0.3\textwidth}} + \citeall[][1] + \end{tabular} + + +\noindent +\verb+\citeall[\fullcite]+\begin{tabular}[t]{p{0.7\textwidth}} + \citeall[\fullcite] + \end{tabular} + + +\noindent +\verb+\citeall[\cite[15],\cite]+\begin{tabular}[t]{p{0.7\textwidth}} + \citeall[\cite[15],\cite] + \end{tabular} + +\noindent +\verb+\citeall[Key: \textcolor{red},{\cite[15]},Test ibid: \cite]+ + +\begin{tabular}[t]{p{0.7\textwidth}} + \citeall[Key: \textcolor{red},{\cite[15]},Test ibid: \cite] +\end{tabular} + +\noindent +\verb+\citeall[{\cite[15]},\endgraf \cite]+ + +\begin{tabular}[t]{p{0.7\textwidth}} + \citeall[{\cite[15]},\endgraf \cite] +\end{tabular} + +\section{Configuration} + +\DescribeMacro\citeallgroupseparator +\DescribeMacro\citeallseparator +\DescribeMacro\citeallfinentry +\DescribeMacro\citealldefaultcite + +By default the item of an entry are separated by a comma and a space. This can be changed by redefining \cs{citeallseparator}. The last item is finished by \cs{citeallfinentry} (default nothing). The entries are separated by a \cs{par}, this can be changed by redefining \cs{citeallgroupseparator}. + +\end{document} diff --git a/Master/texmf-dist/doc/latex/citeall/examples-citeall.bib b/Master/texmf-dist/doc/latex/citeall/examples-citeall.bib new file mode 100644 index 00000000000..1f4eec3acec --- /dev/null +++ b/Master/texmf-dist/doc/latex/citeall/examples-citeall.bib @@ -0,0 +1,25 @@ +@ARTICLE{article2015, + AUTHOR = {Muster, Max}, + TITLE = {Title of Article}, + YEAR = {2015}, + JOURNAL = {Testjournal}, + volume = {1}, + number = {2}, + pages = {15}, + month = {2}, +} + + +@BOOK{book2015, + AUTHOR = {BookAuthor, Eva}, + EDITOR = {Editor, Ben}, + TITLE = {a book}, + YEAR = {2015}, + PUBLISHER = {Publisher}, +} + +@misc{fischer2015, + AUTHOR = {Fischer, Ulrike}, + TITLE = {The citeall package}, + YEAR = {2015}, +} diff --git a/Master/texmf-dist/tex/latex/citeall/citeall.sty b/Master/texmf-dist/tex/latex/citeall/citeall.sty new file mode 100644 index 00000000000..d1c88423f7f --- /dev/null +++ b/Master/texmf-dist/tex/latex/citeall/citeall.sty @@ -0,0 +1,113 @@ +%% --------------------------------------------------------------- +%% The citeall package --- A package to test biblatex-cite commands +%% Maintained by Ulrike Fischer +%% E-mail: fischer@troubleshooting-tex.de +%% www.troubleshooting-tex.de +%% Released under the LaTeX Project Public License v1.3c or later +%% See http://www.latex-project.org/lppl.txt +%% --------------------------------------------------------------- + +\RequirePackage{expl3,xparse} + +\ProvidesExplPackage {citeall} {2015/02/10} {1.0} + {a package to test biblatex-cite commands} + +\@ifpackageloaded{biblatex}{}{% + \PackageWarning{citeall} + { + This~package~works~only~with~biblatex!\MessageBreak + Load~it~before~citeall!\MessageBreak + Loading~citeall~will~abort! + }% + \NewDocumentCommand\citeall { O{} } {} + \tex_endinput:D} + + + +% commands to hold arguments and temporary values +\clist_new:N \l_UF_citecommands_clist +\tl_new:N \l_UF_temp_citefunction_tl +\tl_new:N \l_UF_temp_entrykey_tl +\int_new:N \l_UF_temp_listitem_int +\int_new:N \l_UF_temp_listlength_int +\int_new:N \l_UF_entrynum_int +\int_new:N \l_UF_cur_entrynum_int + +% formatting commands +\NewDocumentCommand\citeallgroupseparator{}{\par} +\NewDocumentCommand\citeallseparator {}{,\c_space_tl} +\NewDocumentCommand\citeallfinentry {}{} +\NewDocumentCommand\citealldefaultcite {}{\cite} + +%init suitable definitions for the fields in the bbl +\cs_new:Nn \_UF_init_bblfields: + {\newcommand\true [2][]{} + \newcommand\field[3][]{} + \newcommand\name [5][]{} + \newcommand\strng[2]{}% + \renewenvironment{refsection}[1]{}{} + \newenvironment{sortlist}[2]{}{} + \renewcommand\verb{\@ifnextchar\bgroup{\@gobble}{\my@verb}} + \def\my@verb##1\endverb{} + \renewcommand\list[4][]{} + \newcommand\inset[1]{} + \newcommand\keyw[1]{} + \newcommand\set[1]{} + } + +% init the entry environment +%#1=number of entries to process, if 0: process all +\cs_new:Nn \_UF_init_bblentryenv:n + {\int_set:Nn \l_UF_entrynum_int {#1} + \int_zero:N \l_UF_cur_entrynum_int + \NewDocumentEnvironment{entry} {m m m} + {\int_incr:N \l_UF_cur_entrynum_int + \tl_set:Nn \l_UF_temp_entrykey_tl {##1} + \int_zero:N \l_UF_temp_listitem_int + \int_set:Nn \l_UF_temp_listlength_int + {\clist_count:N\l_UF_citecommands_clist} + \bool_if:nT + { + \int_compare_p:n { \l_UF_entrynum_int = 0 } + || + \int_compare_p:n { \l_UF_cur_entrynum_int <= \l_UF_entrynum_int} + } + { + \clist_map_inline:Nn \l_UF_citecommands_clist + { + \int_incr:N \l_UF_temp_listitem_int + \tl_set:Nn \l_UF_temp_citefunction_tl {####1} + \l_UF_temp_citefunction_tl {\l_UF_temp_entrykey_tl} + \int_compare:nNnTF + {\l_UF_temp_listitem_int}<{\l_UF_temp_listlength_int} + {\citeallseparator}{\citeallfinentry} + } + \citeallgroupseparator + } + } + {} + } + + +% the main command + +\NewDocumentCommand\citeall { O{\citealldefaultcite} o} + {\nocite{*} %cite all entries + \clist_set:Nn\l_UF_citecommands_clist{#1} + \clist_if_empty:NT\l_UF_citecommands_clist + { + \clist_put_right:Nn\l_UF_citecommands_clist{\citealldefaultcite} + } + \group_begin: + \IfNoValueTF{#2} + {\_UF_init_bblentryenv:n{0}} + {\_UF_init_bblentryenv:n{#2}} + \_UF_init_bblfields: + \file_if_exist:nT + {\jobname.bbl} + {\file_input:n{\jobname.bbl}}% + \group_end: + } + + +\endinput diff --git a/Master/tlpkg/bin/tlpkg-ctan-check b/Master/tlpkg/bin/tlpkg-ctan-check index 2b7a1a2b77c..b619b9ffae8 100755 --- a/Master/tlpkg/bin/tlpkg-ctan-check +++ b/Master/tlpkg/bin/tlpkg-ctan-check @@ -122,7 +122,7 @@ my @TLP_working = qw( chicago chicago-annote chickenize chkfloat chletter chngcntr chronology chronosys chscite cinzel circ circuitikz - cite cjhebrew cjk cjk-ko cjkpunct + cite citeall cjhebrew cjk cjk-ko cjkpunct classics classpack classicthesis clearsans clefval cleveref clipboard clock clrscode clrscode3e cm-lgc cm-super cm-unicode diff --git a/Master/tlpkg/tlpsrc/citeall.tlpsrc b/Master/tlpkg/tlpsrc/citeall.tlpsrc new file mode 100644 index 00000000000..e69de29bb2d diff --git a/Master/tlpkg/tlpsrc/collection-bibtexextra.tlpsrc b/Master/tlpkg/tlpsrc/collection-bibtexextra.tlpsrc index cd7012d05bf..914a2f654c0 100644 --- a/Master/tlpkg/tlpsrc/collection-bibtexextra.tlpsrc +++ b/Master/tlpkg/tlpsrc/collection-bibtexextra.tlpsrc @@ -57,6 +57,7 @@ depend chicago depend chicago-annote depend chembst depend chscite +depend citeall depend collref depend compactbib depend crossrefware -- cgit v1.2.3