texlive[56392] Master/texmf-dist: biblatex-publist (21sep20)

commits+karl at tug.org commits+karl at tug.org
Mon Sep 21 23:05:16 CEST 2020


Revision: 56392
          http://tug.org/svn/texlive?view=revision&revision=56392
Author:   karl
Date:     2020-09-21 23:05:16 +0200 (Mon, 21 Sep 2020)
Log Message:
-----------
biblatex-publist (21sep20)

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

Modified: trunk/Master/texmf-dist/doc/latex/biblatex-publist/README
===================================================================
--- trunk/Master/texmf-dist/doc/latex/biblatex-publist/README	2020-09-21 21:04:53 UTC (rev 56391)
+++ trunk/Master/texmf-dist/doc/latex/biblatex-publist/README	2020-09-21 21:05:16 UTC (rev 56392)
@@ -45,6 +45,13 @@
 
 == CHANGES ==
 
+* V. 1.21 (2020-09-21)
+	- Add option "reversenumbering".
+	- Add \citeitem command.
+	- Add \shiftbplnum and \shiftciteitem helper macros for manual
+	  adjustment of numbering.
+	- Properly sort "prepublished" pubstate type.
+
 * V. 1.20 (2020-09-15)
 	- Do not output "(with <authors>)" if no plauthor is among the authors.
 

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	2020-09-21 21:04:53 UTC (rev 56391)
+++ trunk/Master/texmf-dist/doc/latex/biblatex-publist/biblatex-publist.tex	2020-09-21 21:05:16 UTC (rev 56392)
@@ -102,12 +102,12 @@
 \thanks{Please report issues via \protect\url{https://github.com/jspitz/biblatex-publist}.}%
 }
 
-\date{Version 1.20, 2020/09/15}
+\date{Version 1.21, 2020/09/21}
 \maketitle
 
 \begin{abstract}
 \noindent The \bpl\ package provides a \bibltx\ style file
-for publication lists, i.\,e.\ a bibliography containing one's own
+for publication lists, i.\,e., a bibliography containing one's own
 publications. It draws on \bibltx's \emph{authoryear} style by default
 (which can be changed), but provides some extra features needed for publication lists,
 such as the omission or highlighting of the own name from\slash in author or editor data.
@@ -119,8 +119,8 @@
 
 \section{Aim of the package}
 
-The \bpl\ package ships a \emph{biblatex bibliography style file} ({*}.bbx)
-for a specific task: academic publication lists. Such lists, which are a central
+The \bpl\ package provides a \bibltx\ bibliography style for a specific task:
+academic publication lists. Such lists, which are a central
 part of the academic CV, contain all or selected publications of a specific
 author, usually sorted by genre and year. Even though publication lists are actually
 nothing else than (specific) bibliographies, they diverge from those in some
@@ -133,15 +133,40 @@
 Given the fact that maintaining a publication list is a routine task
 in an academian's life, it is surprising how few specified solutions
 exist to generate such lists (particularly from Bib\TeX\ data). For
-traditional Bib\TeX, Nicolas Markey provided a specific Bib\TeX\
-style file, \emph{publist.bst}%
-\footnote{\url{http://www.lsv.ens-cachan.fr/~markey/BibTeX/publist/?lang=en};
-see also \cite{ttb}.}, which helps a lot if you want to produce a publication
-list with Bib\TeX. The \bpl\ package is the result of the aim of emulating
-the features of \emph{publist.bst} with \bibltx's means. It partly draws on
-Markey's conceptual ideas. Bug reports, comments and ideas are welcome.
+classic Bib\TeX, Nicolas Markey provides (off CTAN) a Bib\TeX\ style file
+dedicated to that task, \emph{publist.bst}%
+\footnote{See \url{http://www.lsv.fr/~markey/BibTeX/publist/publist.bst}
+	for the style file, \url{http://www.lsv.fr/~markey/BibTeX/publist/doc.ps.gz}
+	for documentation; see also \cite{ttb}.}.
+The \bpl\ package started off as the attempt to emulate the features of
+\emph{publist.bst} with \bibltx's means; it thus partly draws on
+its conceptual ideas. Meanwhile, however, it has significantly exceeded
+that initial goal and provides many more features than \emph{publist.bst}.
 
+The list of features includes:
 
+\begin{itemize}
+	\setlength\itemsep{0pt}
+	\item Omit or hide selected author names, with a specific indication of co-authors in the former case
+	\item Filter publications of specific authors from heterogeneous bibliography databases
+	\item Date-centric sorting (as typical for publication lists)
+	\item Number items in ascending or descending order, globally or sectional
+	\item Highlight year of publication
+	\item Indicate year of publication (sets) in the margin
+	\item Clickable titles, linking to the URL, DOI, or a web catalog
+	\item List reviews of specific titles
+	\item Adjustable base bibliography style
+\end{itemize}
+%
+Many features have been suggested by users of the package.
+If you miss a specific feature, feel free to suggest it via
+\url{https://github.com/jspitz/biblatex-publist/issues}.
+
+Note that \bpl\ relies on rather advanced features of \bibltx\ for some of its own features.
+These are only available with the \texttt{biber} backend of \bibltx. Hence \bpl\ requires
+the use of \texttt{biber} as well -- the \texttt{bibtex} backend won't work!
+
+
 \section{Usage}
 
 \subsection{Standard usage\label{sec:standard-usage}}
@@ -181,7 +206,12 @@
 database (special characters will be expanded). 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.
 
+\condbr{4}
+
 \subsection{Additional options}\label{sec:addopts}
 
 Currently, the following additional options are provided (next to the
@@ -232,9 +262,15 @@
 
 If you do not want to have any numbers at all, set this option to \joption{false}.
 
+
+\item [{\joption{reversenumbering{[}=true|false{]}}}] default: \emph{false}.
+
+If this option is \joption{true}, the entries will be numbered in descending order, starting from the total
+number of entries back to 1. Also works with \joption{plnumbered=reset}.
+
 \item [{\joption{plauthorfirstinit{[}=true|false{]}}}] default: \emph{false}.
 
-If you set this option to true, you can (and are supposed to) pass only an initial character as first name value of
+If you set this option to \joption{true}, you can (and are supposed to) pass only an initial character as first name value of
 \jcsmacro{plauthorname} (e.\,g., \jcsmacro{plauthorname[J]\{Doe\}} or \jcsmacro{plauthorname[J][van]\{Doe\}}).
 In consequence, \bpl\ will consider all entries of the specified given name (and prefix, if specified)
 whose prename starts with the specified character. This allows you to deal with databases that record entries of your work
@@ -336,6 +372,8 @@
 \newcommand*\plnameomission{\bibellipsis\addcomma\addspace}
 \end{lstlisting}
 
+\condbr{4}
+
 \section{Customization}
 
 \subsection{Auxiliary macros and lengths}\label{sec:auxmacros}
@@ -364,7 +402,14 @@
 This might be needed for long bibliographies (> 99 entries) in order to adjust to the extra
 space the item number needs.
 
+If you need to adjust the numbering of items manually, you can do so with the macro \jcsmacro*{shiftbplnum}.
+It takes a positive or negative integer value that determines how much and in which direction it is shifted
+(e.\,g., \verb|\shiftpblnum{2}| or \verb|\shiftbplnum{-1}|). This can be used repeatedly, anywhere, and applies
+to all subsequent items.
+For the numbering output by \jfcsmacro{citeitem}, analogous shifting can be done by
+\jcsmacro*{shiftciteitem}.
 
+
 \subsection{Using a different base style}\label{sec:basestyle}
 
 By default, \bpl\ loads \bibltx's \emph{authoryear} style, and it has been written
@@ -502,8 +547,7 @@
 
 \end{document}
 \end{lstlisting}
-
-
+%
 If you want to add other people's reviews of your work, add a section
 such as the following:
 \begin{lstlisting}[caption={Adding foreign reviews},
@@ -617,6 +661,16 @@
 \section{Revision Log}
 
 \begin{description}
+	
+	\item [{V. 1.21 (2020-09-21):}]~
+	\begin{itemize}
+		\item Add option \jfoption{reversenumbering}. See sec.~\ref{sec:addopts}.
+		\item Add \jcsmacro{citeitem} command. See sec.~\ref{sec:standard-usage}.
+		\item Add \jcsmacro{shiftbplnum} and \jcsmacro{shiftciteitem} helper macros
+		      for manual adjustment of numbering.
+		      See sec.~\ref{sec:auxmacros}.
+		\item Properly sort \jfoption{prepublished} pubstate type.
+	\end{itemize}
 
 	\item [{V. 1.20 (2020-09-15):}]~
 	\begin{itemize}

Modified: trunk/Master/texmf-dist/tex/latex/biblatex-publist/publist.bbx
===================================================================
--- trunk/Master/texmf-dist/tex/latex/biblatex-publist/publist.bbx	2020-09-21 21:04:53 UTC (rev 56391)
+++ trunk/Master/texmf-dist/tex/latex/biblatex-publist/publist.bbx	2020-09-21 21:05:16 UTC (rev 56392)
@@ -25,8 +25,8 @@
 %
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 
-\def\bpl at version{1.20}
-\def\bpl at rdate{2020/09/15}
+\def\bpl at version{1.21}
+\def\bpl at rdate{2020/09/21}
 
 \ProvidesFile{publist.bbx}[\bpl at rdate\space v.\bpl at version\space
                            biblatex bibliography style (JSP)]
@@ -92,7 +92,8 @@
     \ifstrequal{#1}{false}{\togglefalse{firstinit}}{\toggletrue{firstinit}}
 }
 
-\newif\if at bplnumbered\@bplnumberedtrue
+\newif\if at bpl@numbered\@bpl at numberedtrue
+\newif\if at bpl@numberreset\@bpl at numberresetfalse
 \DeclareBibliographyOption{plnumbered}[true]{%
     \ifstrequal{#1}{false}{% 1. "false"
 	\defbibenvironment{bibliography}
@@ -106,6 +107,7 @@
 	  {\endlist}
 	  {\item}}{% else: 2. "reset"
 	     \ifstrequal{#1}{reset}{%
+	       \@bpl at numberresettrue%
 	       \defbibenvironment{bibliography}
 		  {\addtolength{\labelnumberwidth}{\extralabelnumberwidth}%
 		   \list
@@ -180,6 +182,11 @@
     }%
 }
 
+\newif\if at bpl@reversenum\@bpl at reversenumfalse
+\DeclareBibliographyOption{reversenumbering}[true]{%
+    \ifstrequal{#1}{true}{\@bpl at reversenumtrue}{\@bpl at reversenumfalse}
+}
+
 % Check if users have defined different base styles
 % If not, use authoryear.
 \newif\ifbpl at standardbasestyle\bpl at standardbasestylefalse
@@ -387,9 +394,12 @@
 %
 % Deal with numbering (resume numbers in refsections)
 %
-\csnumgdef{bbx at itemtotal}{0}
-\csnumgdef{bbx at currentitem}{0}
-\csnumgdef{bbx at saverefsection}{0}
+\csnumgdef{bpl at itemtotal}{0}
+\csnumgdef{bpl at currentitem}{0}
+\csnumgdef{bpl at saverefsection}{0}
+\csnumgdef{bpl at currentitem}{0}
+\csnumgdef{bpl at all@entrycount}{0}
+\csnumgdef{bpl at comp@entrycount:0}{0}
 \newbool{newsection}
 
 \preto\blx at refsection{\global\setbool{newsection}{true}}
@@ -416,9 +426,13 @@
           \renewcommand*{\makelabel}[1]{\hss##1}%
     }%
     {\endlist
-     \ifnumgreater{\c at refsection}{\bbx at saverefsection}%
-     {\csnumgdef{bbx at itemtotal}{\csuse{bbx at itemtotal}+\csuse{bbx at currentitem}}}{}%
-      \csnumgdef{bbx at saverefsection}{\c at refsection}%
+     \ifnumgreater{\c at refsection}{\bpl at saverefsection}%
+     {\if at bpl@reversenum
+         \csnumgdef{bpl at itemtotal}{\csuse{bpl at itemtotal}}%
+      \else
+         \csnumgdef{bpl at itemtotal}{\csuse{bpl at itemtotal}+\csuse{bpl at currentitem}}%
+      \fi}{}%
+      \csnumgdef{bpl at saverefsection}{\c at refsection}%
     }
     {\item}
 
@@ -425,24 +439,73 @@
 \DeclareFieldFormat{labelnumber}{%
     \ifbool{newsection}{%
        % Fix start counter value
-       \csnumgdef{bbx at itemtotal}{\csuse{bbx at itemtotal}-#1+1}%
+       \mkbibsecstart{#1}%
        \global\setbool{newsection}{false}%
     }{}%
     \mkbibdesc{#1}%
-    \csnumgdef{bbx at currentitem}{#1}%
+    \csnumgdef{bpl at currentitem}{#1}%
 }
 
-% Print labelnumber as actual number, plus item total
 \newrobustcmd{\mkbibdesc}[1]{%
-    \number\numexpr\csuse{bbx at itemtotal}+#1\relax%
+    % Print labelnumber as actual number, plus item total
+    \number\numexpr\csuse{bpl at itemtotal}+#1\relax%
+}%
+
+\newrobustcmd{\mkbibsecstart}[1]{%
+   \csnumgdef{bpl at itemtotal}{\csuse{bpl at itemtotal}-#1+1}%
 }
 
-% Way to manual shift the numbering (undocumented)
-\newcommand*\decreasebbxnumbering[1]{%
-    \csnumgdef{bbx at itemtotal}{\csuse{bbx at itemtotal}-#1}%
+% Way to manually shift the numbering
+\csnumgdef{bpl at shift@itemtotal}{0}
+\newcommand*\shiftbplnum[1]{%
+    \csnumgdef{bpl at shift@itemtotal}{#1}%
 }
 
+%
+% Reverse numbering
+% Inspired by moewew's approach at
+% https://tex.stackexchange.com/a/563328/19291
+%
+\AtEndOfPackage{%
+\newcounter{prevrefsection}%
+\if at bpl@reversenum
+  % Count total number of entries in each refsection
+  \AtDataInput{%
+    \ifcategory{filtered}{%
+      \csnumgdef{bpl at entrycount:\therefsection}{%
+         \csuse{bpl at entrycount:\therefsection}+1%
+      }%
+      \setcounter{prevrefsection}{\therefsection}%
+      \addtocounter{prevrefsection}{-1}%
+      \csnumgdef{bpl at comp@entrycount:\therefsection}{%
+         \csuse{bpl at comp@entrycount:\theprevrefsection}+\csuse{bpl at entrycount:\therefsection}%
+      }%
+      \csnumgdef{bpl at all@entrycount}{%
+         \csuse{bpl at all@entrycount}+1%
+      }%
+    }{}%
+  }%
+  \renewrobustcmd{\mkbibdesc}[1]{%
+     % Print the labelnumber as the total number of entries in the
+     % current refsection, minus the actual labelnumber, plus one
+     \number\numexpr\csuse{bpl at entrycount:\therefsection}+\csuse{bpl at itemtotal}-#1+1\relax%
+  }%
+  \renewrobustcmd{\mkbibsecstart}[1]{%
+   \setcounter{prevrefsection}{\therefsection}%
+   \addtocounter{prevrefsection}{-1}%
+   \if at bpl@numberreset
+       \csnumgdef{bpl at itemtotal}{#1-1+\csuse{bpl at shift@itemtotal}}%
+   \else
+       \csnumgdef{bpl at itemtotal}{\csuse{bpl at all@entrycount}%
+                                 -\csuse{bpl at comp@entrycount:\theprevrefsection}%
+                                 -\csuse{bpl at entrycount:\therefsection}-#1+1%
+                                 +\csuse{bpl at shift@itemtotal}}%
+   \fi%
+  }%
+\fi
+}%
 
+
 %
 % New environment for (foreign) reviews
 %
@@ -1281,21 +1344,25 @@
             \step[fieldset=sortyear, origfieldval]
         }
         \map{
-           \step[fieldsource=pubstate, match=\regexp{forthcoming}, final]
+           \step[fieldsource=pubstate, match=\regexp{prepublished}, final]
            \step[fieldset=sortyear, fieldvalue={2222}]
         }
         \map{
-           \step[fieldsource=pubstate, match=\regexp{inpress}, final]
+           \step[fieldsource=pubstate, match=\regexp{forthcoming}, final]
            \step[fieldset=sortyear, fieldvalue={3333}]
         }
         \map{
-           \step[fieldsource=pubstate, match=\regexp{submitted}, final]
+           \step[fieldsource=pubstate, match=\regexp{inpress}, final]
            \step[fieldset=sortyear, fieldvalue={4444}]
         }
         \map{
-           \step[fieldsource=pubstate, match=\regexp{inpreparation}, final]
+           \step[fieldsource=pubstate, match=\regexp{submitted}, final]
            \step[fieldset=sortyear, fieldvalue={5555}]
         }
+        \map{
+           \step[fieldsource=pubstate, match=\regexp{inpreparation}, final]
+           \step[fieldset=sortyear, fieldvalue={6666}]
+        }
     }
 }
 

Modified: trunk/Master/texmf-dist/tex/latex/biblatex-publist/publist.cbx
===================================================================
--- trunk/Master/texmf-dist/tex/latex/biblatex-publist/publist.cbx	2020-09-21 21:04:53 UTC (rev 56391)
+++ trunk/Master/texmf-dist/tex/latex/biblatex-publist/publist.cbx	2020-09-21 21:05:16 UTC (rev 56392)
@@ -26,8 +26,8 @@
 %
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 
-\def\bpl at version{1.20}
-\def\bpl at rdate{2020/09/15}
+\def\bpl at version{1.21}
+\def\bpl at rdate{2020/09/21}
 
 \ProvidesFile{publist.cbx}[\bpl at rdate\space v.\bpl at version\space
                            biblatex citation style (JSP)]
@@ -34,4 +34,49 @@
 
 \RequireCitationStyle{numeric}
 
+\DeclareCiteCommand{\citeitem}
+  {\defcounter{maxnames}{999}%
+   \boolfalse{citetracker}%
+   \boolfalse{pagetracker}%
+   \usebibmacro{prenote}}
+  {\usebibmacro{bpl:cite:extern}}
+  {\multicitedelim}
+  {\usebibmacro{postnote}}
+
+\newbibmacro*{bpl:cite:extern}{%
+  \printtext[bibhyperref]{%
+    \printfield{labelprefix}%
+    \usebibmacro{bpl:cite:labelnumber}%
+    \ifbool{bbx:subentry}
+      {\printfield{entrysetcount}}
+      {}}}
+
+\newbibmacro*{bpl:cite:labelnumber}{%
+    \printtext[labelnumberwidth]{\mkrefdesc{\thefield{labelnumber}}}%
+}
+
+% Manual way to adjust numbering
+\csdef{bpl at secstartshift}{0}
+\newcommand*\shiftciteitem[1]{\csdef{bpl at secstartshift}{#1}}
+
+% Print labelnumber as actual number, plus item total
+% and probably a manual shift value
+\newrobustcmd{\mkrefdesc}[1]{%
+  \number\numexpr#1+\csuse{bpl at itemtotal}+\csuse{bpl at secstartshift}\relax%
+}
+
+\providebool{@bpl at reversenum}
+
+\AtEndOfPackage{%
+\if at bpl@reversenum
+  \renewrobustcmd{\mkrefdesc}[1]{%
+     % Print the labelnumber as the total number of entries in the
+     % current refsection, minus the actual labelnumber, plus one
+     \number\numexpr\csuse{bpl at itemtotal}-#1+1%
+                           +\csuse{bpl at secstartshift}\relax%
+  }%
+\fi%
+}
+
+%%
 \endinput



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