texlive[71686] Master/texmf-dist: biblatex-publist (2jul24)

commits+karl at tug.org commits+karl at tug.org
Tue Jul 2 22:04:23 CEST 2024


Revision: 71686
          https://tug.org/svn/texlive?view=revision&revision=71686
Author:   karl
Date:     2024-07-02 22:04:23 +0200 (Tue, 02 Jul 2024)
Log Message:
-----------
biblatex-publist (2jul24)

Modified Paths:
--------------
    trunk/Master/texmf-dist/doc/latex/biblatex-publist/README
    trunk/Master/texmf-dist/doc/latex/biblatex-publist/biblatex-publist.pdf
    trunk/Master/texmf-dist/doc/latex/biblatex-publist/biblatex-publist.tex
    trunk/Master/texmf-dist/tex/latex/biblatex-publist/publist.bbx
    trunk/Master/texmf-dist/tex/latex/biblatex-publist/publist.cbx
    trunk/Master/texmf-dist/tex/latex/biblatex-publist/publist.dbx

Modified: trunk/Master/texmf-dist/doc/latex/biblatex-publist/README
===================================================================
--- trunk/Master/texmf-dist/doc/latex/biblatex-publist/README	2024-07-02 08:27:58 UTC (rev 71685)
+++ trunk/Master/texmf-dist/doc/latex/biblatex-publist/README	2024-07-02 20:04:23 UTC (rev 71686)
@@ -46,6 +46,10 @@
 
 == CHANGES ==
 
+* V. 2.11 (2024-07-02):
+	- Add \citesecitem and \citesecitem* commands.
+	- Support multiple sections in \GetSectionCount.
+
 * V. 2.10 (2024-06-17):
 	- Add bibchecks to show only/no peer-reviewed items.
 	- Fix bibchecks to work with braced and non-braced values.

Modified: trunk/Master/texmf-dist/doc/latex/biblatex-publist/biblatex-publist.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/latex/biblatex-publist/biblatex-publist.tex
===================================================================
--- trunk/Master/texmf-dist/doc/latex/biblatex-publist/biblatex-publist.tex	2024-07-02 08:27:58 UTC (rev 71685)
+++ trunk/Master/texmf-dist/doc/latex/biblatex-publist/biblatex-publist.tex	2024-07-02 20:04:23 UTC (rev 71686)
@@ -115,7 +115,7 @@
 \thanks{Please report issues via \protect\url{https://github.com/jspitz/biblatex-publist}.}%
 }
 
-\date{Version 2.10, 2024/06/17}
+\date{Version 2.11, 2024/07/02}
 \maketitle
 
 \begin{abstract}
@@ -200,7 +200,7 @@
 
 The standard way of using the package is to load the style file via
 \begin{lstlisting}[moretexcs={[1]{plauthorname}}]
-\usepackage[bibstyle=publist]{biblatex}
+\usepackage[style=publist]{biblatex}
 \plauthorname[first name][von-part]{surname}
 \end{lstlisting}
 The \jcsmacro*{plauthorname} macro\footnote{The macro was named \jfcsmacro{omitname} until v.\,1.4
@@ -213,32 +213,28 @@
 
 By default, the author\slash editor name(s) will be omitted completely
 for all publications which are authored or edited only by the specified person(s), as in:
-\begin{quote}
-\textbf{2012.} Some recent trends in gardening. In: \emph{Gardening
-Practice} 56, pp.~34--86.
-\end{quote}
+\begin{itemize}
+\item[{[1]}] \textbf{2012.} Some recent trends in gardening. In: \emph{Gardening
+             Practice} 56, pp.~34--86.
+\end{itemize}
 If there are co-authors\slash co-editors, your name(s) will be filtered
 out and the collaborators added in parentheses, as in:
-\begin{quote}
-\textbf{1987} (with John Doe and Mary Hall). Are there new trends
-in gardening? In: \emph{Gardening Practice} 24, pp.~10--15.
-\end{quote}
+\begin{itemize}
+\item[{[2]}] \textbf{1987} (with John Doe and Mary Hall). Are there new trends
+             in gardening? In: \emph{Gardening Practice} 24, pp.~10--15.
+\end{itemize}
 If \joption{plauthorhandling=highlight} is used (see next section), the plauthor(s)
 will be printed in bold face instead, as in:
-\begin{quote}
-	Doe, John, \textbf{Myself, Me} and Hall, Mary, \textbf{1987}. Are there new trends
-	in gardening? In: \emph{Gardening Practice} 24, pp.~10--15.
-\end{quote}
+\begin{itemize}
+\item[{[2]}] Doe, John, \textbf{Myself, Me} and Hall, Mary, \textbf{1987}. Are there new trends
+	         in gardening? In: \emph{Gardening Practice} 24, pp.~10--15.
+\end{itemize}
 %
 Note that \jcsmacro{plauthorname} expects the name constituents as they are recorded in the
 database (special characters are handled). The option \joption{plauthorfirstinit} (see next section),
 however, allows you to pass only an initial character instead of a first name.
 
-If you want to refer to an item number, use \jcsmacro*{citeitem}\jmacro{\{<key>\}} within your publication list.
-This will print the item number in square brackets (like the \jfcsmacro{cite} command in numeric citation styles),
-but as opposed to normal \jfcsmacro{cite} it also considers all numbering tweaks you make via the \bpl\ options.
 
-
 \subsection{Additional Options}\label{sec:addopts}
 
 Currently, the following additional options are provided (next to the
@@ -374,8 +370,8 @@
 All options listed here should be passed directly to \bibltx\ via \jfcsmacro{usepackage} when loading \bibltx, and they apply to the whole
 document.
 
-For most options, it is possible to change them (repeatedly) within the document. To this end, the macro
-\jcsmacro*[-3]{ExecutePublistOptions} is provided. It takes a comma-separated list of options as its mandatory argument
+For most options, it is possible to change them within the document via the macro
+\jcsmacro*[-3]{ExecutePublistOptions}. It takes a comma-separated list of options as mandatory argument
 and can be used (repeatedly) in preamble or anywhere in the document body.
 The executed options apply as of the next bibliography (\jfcsmacro{printbibliography}) that follows.
 Options that \emph{cannot} be changed within a document that way are \joption{plnumbering} and \joption{pubstateextra},
@@ -385,6 +381,46 @@
 repeated setting of these name options respectively \emph{overwrite}, and not extend, the previous name settings.
 
 
+\subsection{Referring to Entries}\label{sec:citeitems}
+
+Even though publication lists usually do not include citations, there might be cases where you need to refer
+to specific entries within it. Especially with sectioned lists, it is arguably most advisable to refer to the items
+by their number, as otherwise your readers will have a hard time to find the item you are referring to.
+Of course, if you do not use global numbering, you should also specify the section the item is in, as in:
+``see [13] (sec.~4)''.
+
+Since \bpl\ plays all sorts of tricks with the numbering (see sec.~\ref{sec:numbers}), the reference needs to take these
+into account. The normal citation commands will often produce inadequate or even wrong output particularly in numeric
+style.
+To account for these peculiarities, the package ships its own cite style which is used if you load \bpl\ via
+\joption{style=publist} (but not with \joption{bibstyle=publist}!). The features described in what follows require
+this particular cite style.
+
+If you want to refer to an item number, use \jcsmacro*{citeitem}\jmacro{\{<key(s)>\}} within your publication list.%
+\footnote{As with the normal citation commands, the argument might also be a comma-separated list of keys.}
+This will print the item number in square brackets (like the \jfcsmacro{cite} command in numeric citation styles),
+but as opposed to normal \jfcsmacro{cite} it also considers all numbering tweaks you make via the \bpl\ options.
+Note, however, that with refsections (see sec.~\ref{sec:example}) \jcsmacro{citeitem} only works within a given
+refsection because the references in a refsection are unknown outside of its scope.
+
+If you want to refer to an item number from outside a refsection, you can use \jcsmacro*{citesecitem}\jmacro{\{<key(s)>\}}.
+This will try to access the number of the given entry from a stored list that is generated by \bpl.
+References of this kind only make sense, of course, with global numbering and if an entry only occurs once in the bibliography,
+since otherwise they would be too ambiguous. However, for locally numbered lists, there is the starred variant
+\jcsmacro*{citesecitem*}\jmacro{\{<key(s)>\}} which will append a reference to the section the item is in.
+By default, the form of this addition is ``(sec.~<no.>)'', with ``sec.'' being localized (see sec.~\ref{sec:auxmacros}
+on how to customize this).
+
+Note that due to the design of refsections, no hyperlinks can be generated for the item number with \jcsmacro{citesecitem}
+and the \textsf{hyperref} package being loaded (the section reference of the starred command, however, is hyperlinked in
+this case).
+If you need hyperlinked item references, consider refsegments rather than refsections and the \jcsmacro{citeitem} command
+(although this will have other drawbacks).
+
+Of course, both \jcsmacro{citeitem} and \jcsmacro{citesecitem} presuppose that you do not disable numbering, and
+\jcsmacro{citesecitem*} requires numbered section headers.
+
+
 \subsection{Numbers Games}\label{sec:numbers}
 
 Among the peculiarities of publication lists is the greater variety of numbering conventions, as compared
@@ -474,12 +510,14 @@
 
 If you want to output the number of publications per section (when employing \jfcsmacro{refsection}),
 you can use the macro \jcsmacro*{GetSectionCount} which takes one optional argument, the section
-number. For instance,
+number or a comma-separated list of section numbers. For instance,
 \begin{lstlisting}[moretexcs={[4]{GetSectionCount}}]
 \GetSectionCount[1]
 \end{lstlisting}
-outputs the number of items in the first section. If the optional argument is not given, the
-statistics for the current section is output (this requires the macro to be within a \jfcsmacro{refsection}).
+outputs the number of items in the first section, whereas \lstinline!\GetSectionCount[1,2]! outputs
+the sum of the numbers of items in the first and second section.
+If the optional argument is not given, the statistic for the current section is output
+(this requires the macro to be within a \jfcsmacro{refsection}).
 
 Note that both values might require additional \LaTeX\ runs to get properly set. You will
 get a package warning if additional runs are needed.  
@@ -526,16 +564,16 @@
 With \joption{plauthorhandling=omit}, the \jfoption{maxnames} value specifies how many co-authors are added in parenthesis (the omitted
 author name is not counted here). If the treshold is reached, \emph{et al.}\ (or the corresponding localized string) is appended (and the list truncated
 to the \jfoption{minnames} value, \jfoption{1} by default). So you get something like:
-\begin{quote}
-	\textbf{2020} (with John Doe et al.). What's up in gardening? In: \emph{Gardening Practice} 44, pp.~1--7.
-\end{quote}
+\begin{itemize}
+	\item[{[3]}] \textbf{2020} (with John Doe et al.). What's up in gardening? In: \emph{Gardening Practice} 44, pp.~1--7.
+\end{itemize}
 %
 With \joption{plauthorhandling=highlight}, \bpl\ outputs all publist authors, even if the \jfoption{maxnames} treshold has been reached.
 However, other authors (beyond \jfoption{minnames}) are omitted. If they come before a publist author, this is indicated by [\ldots\unkern],
 if authors follow after all publication list authors, \emph{et al.} is appended, as in:
-\begin{quote}
-	Doe, John, [\ldots\unkern], \textbf{Myself, Me}, et al., \textbf{2020}. What's up in gardening? In: \emph{Gardening Practice} 44, pp.~1--7.
-\end{quote}
+\begin{itemize}
+	\item[{[3]}] Doe, John, [\ldots\unkern], \textbf{Myself, Me}, et al., \textbf{2020}. What's up in gardening? In: \emph{Gardening Practice} 44, pp.~1--7.
+\end{itemize}
 %
 The omission indicator, \jcsmacro*{plnameomission}, can be redefined. The default definition is:
 \begin{lstlisting}[moretexcs={[4]{plnameomission,bibellipsis,addcomma,addspace}}]
@@ -663,6 +701,16 @@
 \newcommand*\plextrainfosep{\addsemicolon\addspace}
 \end{lstlisting}
 %
+The\jmcsmacro{secitemsecref} section reference with \jcsmacro{citesecitem*} is determined by
+\jcsmacro{secitemsecref}, which has the following default definition:
+\begin{lstlisting}[moretexcs={[2]{mkbibparens,secitemsecref,bibstring,addnbspace}}]
+\newcommand*\secitemsecref[1]{%
+	\mkbibparens{\bibstring{section}\addnbspace\ref{refsection:#1}}%
+}
+\end{lstlisting}
+%
+Redefine this macro if you need a different output.
+
 The indendation of the bibliographic entries (lines > 1) can be adjusted by setting the length
 \jmacro*{extralabel\-numberwidth} via \jfcsmacro{setlength} (default is \texttt{0pt}).
 This might be needed for long bibliographies (> 99 entries) in order to adjust to the extra
@@ -717,26 +765,26 @@
 Since the package draws on \bibltx, it supports localization. 
 The following additional localization keys (\jfcsmacro{bibstrings})
 are added by the package:
-\begin{itemize}
+\begin{description}
 \setlength{\itemsep}{0pt}
-\item \emph{impactfactor}: the expression \enquote{impact factor}.
-\item \emph{openaccess:true}: the expression \enquote{OpenAccess}.
-\item \emph{openaccess:gold}: the phrase \enquote{OpenAccess (gold)}.
-\item \emph{openaccess:green}: the phrase \enquote{OpenAccess (green)}.
-\item \emph{parttranslationof}: the expression \enquote{partial translation of}
+\item[impactfactor] the expression \enquote{impact factor}.
+\item[openaccess:true] the expression \enquote{OpenAccess}.
+\item[openaccess:gold] the phrase \enquote{OpenAccess (gold)}.
+\item[{openaccess:green}] the phrase \enquote{OpenAccess (green)}.
+\item[{parttranslationof}] the phrase \enquote{partial translation of}
        for entries referring to partially translated work via \bibltx's
       \enquote*{related entries} feature (see sec.~\ref{sec:partial-translations}).
-\item \emph{peerreview:sb}: the phrase \enquote{single blind peer review}.
-\item \emph{peerreview:db}: the phrase \enquote{double blind peer review}.
-\item \emph{peerreview:op}: the phrase \enquote{open peer review}.
-\item \emph{peerreview:co}: the phrase \enquote{collaborative peer review}.
-\item \emph{peerreview:cc}: the phrase \enquote{cascading peer review}.
-\item \emph{peerreview:tp}: the phrase \enquote{third-party peer review}.
-\item \emph{peerreview:pp}: the phrase \enquote{post-publication peer review}.
-\item \emph{peerreview:no}: the phrase \enquote{no peer review}.
-\item \emph{with}: the preposition \enquote{with} that precedes the list of
+\item[{peerreview:sb}] the phrase \enquote{single blind peer review}.
+\item[{peerreview:db}] the phrase \enquote{double blind peer review}.
+\item[{peerreview:op}] the phrase \enquote{open peer review}.
+\item[{peerreview:co}] the phrase \enquote{collaborative peer review}.
+\item[{peerreview:cc}] the phrase \enquote{cascading peer review}.
+\item[{peerreview:tp}] the phrase \enquote{third-party peer review}.
+\item[{peerreview:pp}] the phrase \enquote{post-publication peer review}.
+\item[{peerreview:no}] the phrase \enquote{no peer review}.
+\item[{with}] the preposition \enquote{with} that precedes the list of
        co-authors by default (i.\,e., with \joption{plauthorhandling=omit}).
-\end{itemize}
+\end{description}
 Currently, these additional localization keys are available in the following
 languages: English, French and German.%
 \footnote{Please send suggestions for other languages to the package author.}
@@ -979,6 +1027,12 @@
 \section{Revision Log}
 
 \begin{description}
+	\item [{V. 2.11 (2024/07/02):}]~
+	\begin{itemize}
+		\item Add \jcsmacro{citesecitem} and \jcsmacro{citesecitem*} commands (see sec.~\ref{sec:citeitems}).
+		\item Support multiple sections in \jcsmacro{GetSectionCount}.
+	\end{itemize}
+	
 	\item [{V. 2.10 (2024/06/17):}]~
 	\begin{itemize}
 		\item Add bibchecks to show only/no peer-reviewed items

Modified: trunk/Master/texmf-dist/tex/latex/biblatex-publist/publist.bbx
===================================================================
--- trunk/Master/texmf-dist/tex/latex/biblatex-publist/publist.bbx	2024-07-02 08:27:58 UTC (rev 71685)
+++ trunk/Master/texmf-dist/tex/latex/biblatex-publist/publist.bbx	2024-07-02 20:04:23 UTC (rev 71686)
@@ -25,8 +25,8 @@
 %
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 
-\def\bpl at version{2.10}
-\def\bpl at rdate{2024/06/17}
+\def\bpl at version{2.11}
+\def\bpl at rdate{2024/07/02}
 
 \ProvidesFile{publist.bbx}[\bpl at rdate\space v.\bpl at version\space
                            biblatex bibliography style (JSP)]
@@ -552,16 +552,29 @@
      {}{\PackageWarning{biblatex-publist}{Patching refsection failed!}}
 }{}
 
-\newcommand*\GetSectionCount[1][\empty]{%
-  \edef\bpl at secno{#1}%
-  \ifx\bpl at secno\empty%
-    \csnumdef{bpltmprefsection}{\c at refsection}%
+\ExplSyntaxOn
+
+\int_new:N \l_bpl_sec_cnt_int
+
+\NewDocumentCommand \GetSectionCount { >{\SplitList{,}} o }
+{
+  \IfNoValueTF{#1}{%
+    \csnumdef{bpltmprefsection}{\c at refsection}
     \csuse{bpl at secitems:\bpltmprefsection}%
-  \else%
-    \csuse{bpl at secitems:#1}%
-  \fi%
+  }{
+    \int_zero:N \l_bpl_sec_cnt_int
+    \ProcessList{#1}{\__bpl_add_section_count}
+    \int_use:N \l_bpl_sec_cnt_int
+  }
 }
 
+\cs_new:Npn \__bpl_add_section_count #1
+{
+   \int_add:Nn \l_bpl_sec_cnt_int { \use:c{bpl at secitems:#1} }
+}
+
+\ExplSyntaxOff
+
 \newcommand*\GetTotalCount{%
   \csuse{bpl at items}%
 }
@@ -897,7 +910,15 @@
 
 \newrobustcmd{\mkbibdesc}[1]{%
     % Print labelnumber as actual number, plus item total
-    \number\numexpr\csuse{bpl at itemtotal}+#1+\csuse{bpl at shift@itemtotal}\relax%
+    \edef\bpl at current@item at no{\number\numexpr\csuse{bpl at itemtotal}+#1+\csuse{bpl at shift@itemtotal}\relax}%
+    \bpl at current@item at no%
+    % Store number in pbx file
+    \if at filesw%
+       \protected at write\bpl at bpxfile{}{%
+          \csedef{bpl at itemnumber:\thefield{entrykey}}{\bpl at current@item at no}%
+          \csedef{bpl at itemsec:\thefield{entrykey}}{\therefsection}%
+       }%
+    \fi%
 }%
 
 % Way to manually shift the numbering

Modified: trunk/Master/texmf-dist/tex/latex/biblatex-publist/publist.cbx
===================================================================
--- trunk/Master/texmf-dist/tex/latex/biblatex-publist/publist.cbx	2024-07-02 08:27:58 UTC (rev 71685)
+++ trunk/Master/texmf-dist/tex/latex/biblatex-publist/publist.cbx	2024-07-02 20:04:23 UTC (rev 71686)
@@ -26,8 +26,8 @@
 %
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 
-\def\bpl at version{2.10}
-\def\bpl at rdate{2024/06/17}
+\def\bpl at version{2.11}
+\def\bpl at rdate{2024/07/02}
 
 \ProvidesFile{publist.cbx}[\bpl at rdate\space v.\bpl at version\space
                            biblatex citation style (JSP)]
@@ -34,6 +34,42 @@
 
 \RequireCitationStyle{numeric}
 
+\DeclareCiteCommand{\citesecitem}
+  {\defcounter{maxnames}{999}%
+   \boolfalse{citetracker}%
+   \boolfalse{pagetracker}%
+   \usebibmacro{prenote}}
+  {\usebibmacro{bpl:cite:secitem}}
+  {\multicitedelim}
+  {\usebibmacro{postnote}}
+
+\DeclareCiteCommand*{\citesecitem}
+  {\defcounter{maxnames}{999}%
+   \boolfalse{citetracker}%
+   \boolfalse{pagetracker}%
+   \usebibmacro{prenote}}
+  {\usebibmacro{bpl:cite:secitem}%
+   \usebibmacro{bpl:cite:secitemsec}%
+  }
+  {\multicitedelim}
+  {\usebibmacro{postnote}}
+
+\newbibmacro*{bpl:cite:secitem}{%
+  \ifcsdef{bpl at itemnumber:\thefield{entrykey}}%
+     {\mkbibbrackets{\csuse{bpl at itemnumber:\thefield{entrykey}}}}%
+     {\textbf{\mkbibbrackets{???}}}%
+}
+
+\newcommand*\secitemsecref[1]{%
+   \mkbibparens{\bibstring{section}\addnbspace\ref{refsection:#1}}%
+}
+
+\newbibmacro*{bpl:cite:secitemsec}{%
+  \ifcsdef{bpl at itemsec:\thefield{entrykey}}%
+     {\addspace\secitemsecref{\csuse{bpl at itemsec:\thefield{entrykey}}}}%
+     {}%
+}
+
 \DeclareCiteCommand{\citeitem}
   {\defcounter{maxnames}{999}%
    \boolfalse{citetracker}%

Modified: trunk/Master/texmf-dist/tex/latex/biblatex-publist/publist.dbx
===================================================================
--- trunk/Master/texmf-dist/tex/latex/biblatex-publist/publist.dbx	2024-07-02 08:27:58 UTC (rev 71685)
+++ trunk/Master/texmf-dist/tex/latex/biblatex-publist/publist.dbx	2024-07-02 20:04:23 UTC (rev 71686)
@@ -1,5 +1,5 @@
 % publist.dbx, biblatex data model specification for the biblatex-publist
-% package, version 2.10 (2024/06/17). 
+% package, version 2.11 (2024/07/02). 
 %
 % This work may be distributed and/or modified under the
 % conditions of the LaTeX Project Public License, either version 1.3



More information about the tex-live-commits mailing list.