summaryrefslogtreecommitdiff
path: root/macros/latex/contrib/biblatex-contrib/biblatex-publist
diff options
context:
space:
mode:
authorNorbert Preining <norbert@preining.info>2020-09-22 03:01:12 +0000
committerNorbert Preining <norbert@preining.info>2020-09-22 03:01:12 +0000
commit1a37a060977fa92be44dcee0fb99c59e46023afe (patch)
tree2ce5093e943a86635e98fe04177c29b4784e3f2e /macros/latex/contrib/biblatex-contrib/biblatex-publist
parent08c58783476dcc12acae0a0db4fa725a37b7932f (diff)
CTAN sync 202009220301
Diffstat (limited to 'macros/latex/contrib/biblatex-contrib/biblatex-publist')
-rw-r--r--macros/latex/contrib/biblatex-contrib/biblatex-publist/README7
-rw-r--r--macros/latex/contrib/biblatex-contrib/biblatex-publist/biblatex-publist.pdfbin358777 -> 361529 bytes
-rw-r--r--macros/latex/contrib/biblatex-contrib/biblatex-publist/biblatex-publist.tex82
-rw-r--r--macros/latex/contrib/biblatex-contrib/biblatex-publist/publist.bbx107
-rw-r--r--macros/latex/contrib/biblatex-contrib/biblatex-publist/publist.cbx49
5 files changed, 209 insertions, 36 deletions
diff --git a/macros/latex/contrib/biblatex-contrib/biblatex-publist/README b/macros/latex/contrib/biblatex-contrib/biblatex-publist/README
index dbf6d12abc..7bee9d60ab 100644
--- a/macros/latex/contrib/biblatex-contrib/biblatex-publist/README
+++ b/macros/latex/contrib/biblatex-contrib/biblatex-publist/README
@@ -45,6 +45,13 @@ instructions.
== 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.
diff --git a/macros/latex/contrib/biblatex-contrib/biblatex-publist/biblatex-publist.pdf b/macros/latex/contrib/biblatex-contrib/biblatex-publist/biblatex-publist.pdf
index 86ae193861..4aa3135ec1 100644
--- a/macros/latex/contrib/biblatex-contrib/biblatex-publist/biblatex-publist.pdf
+++ b/macros/latex/contrib/biblatex-contrib/biblatex-publist/biblatex-publist.pdf
Binary files differ
diff --git a/macros/latex/contrib/biblatex-contrib/biblatex-publist/biblatex-publist.tex b/macros/latex/contrib/biblatex-contrib/biblatex-publist/biblatex-publist.tex
index bc0c53b5f6..3b04d6a83a 100644
--- a/macros/latex/contrib/biblatex-contrib/biblatex-publist/biblatex-publist.tex
+++ b/macros/latex/contrib/biblatex-contrib/biblatex-publist/biblatex-publist.tex
@@ -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 @@ The package requires at least version 3.8 of the \bibltx\ package\footnote{For \
\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,13 +133,38 @@ produce the desired result.
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}
@@ -181,6 +206,11 @@ Note that \jcsmacro{plauthorname} expects the name constituents as they are reco
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}
@@ -232,9 +262,15 @@ If you prefer the numbering to start from 1 at each section instead, set this op
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 @@ The omission indicator, \jcsmacro*{plnameomission}, can be redefined. The defaul
\newcommand*\plnameomission{\bibellipsis\addcomma\addspace}
\end{lstlisting}
+\condbr{4}
+
\section{Customization}
\subsection{Auxiliary macros and lengths}\label{sec:auxmacros}
@@ -364,6 +402,13 @@ The indendation of the bibliographic entries (lines > 1) can be adjusted by sett
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}
@@ -502,8 +547,7 @@ Then a typical file would look like example~\ref{example} (p.~\pageref{example})
\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 @@ or
\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}
diff --git a/macros/latex/contrib/biblatex-contrib/biblatex-publist/publist.bbx b/macros/latex/contrib/biblatex-contrib/biblatex-publist/publist.bbx
index 365cf8de42..59c81cfb22 100644
--- a/macros/latex/contrib/biblatex-contrib/biblatex-publist/publist.bbx
+++ b/macros/latex/contrib/biblatex-contrib/biblatex-publist/publist.bbx
@@ -25,8 +25,8 @@
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\def\bpl@version{1.20}
-\def\bpl@rdate{2020/09/15}
+\def\bpl@version{1.21}
+\def\bpl@rdate{2020/09/21}
\ProvidesFile{publist.bbx}[\bpl@rdate\space v.\bpl@version\space
biblatex bibliography style (JSP)]
@@ -92,7 +92,8 @@
\ifstrequal{#1}{false}{\togglefalse{firstinit}}{\toggletrue{firstinit}}
}
-\newif\if@bplnumbered\@bplnumberedtrue
+\newif\if@bpl@numbered\@bpl@numberedtrue
+\newif\if@bpl@numberreset\@bpl@numberresetfalse
\DeclareBibliographyOption{plnumbered}[true]{%
\ifstrequal{#1}{false}{% 1. "false"
\defbibenvironment{bibliography}
@@ -106,6 +107,7 @@
{\endlist}
{\item}}{% else: 2. "reset"
\ifstrequal{#1}{reset}{%
+ \@bpl@numberresettrue%
\defbibenvironment{bibliography}
{\addtolength{\labelnumberwidth}{\extralabelnumberwidth}%
\list
@@ -180,6 +182,11 @@
}%
}
+\newif\if@bpl@reversenum\@bpl@reversenumfalse
+\DeclareBibliographyOption{reversenumbering}[true]{%
+ \ifstrequal{#1}{true}{\@bpl@reversenumtrue}{\@bpl@reversenumfalse}
+}
+
% Check if users have defined different base styles
% If not, use authoryear.
\newif\ifbpl@standardbasestyle\bpl@standardbasestylefalse
@@ -387,9 +394,12 @@
%
% Deal with numbering (resume numbers in refsections)
%
-\csnumgdef{bbx@itemtotal}{0}
-\csnumgdef{bbx@currentitem}{0}
-\csnumgdef{bbx@saverefsection}{0}
+\csnumgdef{bpl@itemtotal}{0}
+\csnumgdef{bpl@currentitem}{0}
+\csnumgdef{bpl@saverefsection}{0}
+\csnumgdef{bpl@currentitem}{0}
+\csnumgdef{bpl@all@entrycount}{0}
+\csnumgdef{bpl@comp@entrycount:0}{0}
\newbool{newsection}
\preto\blx@refsection{\global\setbool{newsection}{true}}
@@ -416,32 +426,85 @@
\renewcommand*{\makelabel}[1]{\hss##1}%
}%
{\endlist
- \ifnumgreater{\c@refsection}{\bbx@saverefsection}%
- {\csnumgdef{bbx@itemtotal}{\csuse{bbx@itemtotal}+\csuse{bbx@currentitem}}}{}%
- \csnumgdef{bbx@saverefsection}{\c@refsection}%
+ \ifnumgreater{\c@refsection}{\bpl@saverefsection}%
+ {\if@bpl@reversenum
+ \csnumgdef{bpl@itemtotal}{\csuse{bpl@itemtotal}}%
+ \else
+ \csnumgdef{bpl@itemtotal}{\csuse{bpl@itemtotal}+\csuse{bpl@currentitem}}%
+ \fi}{}%
+ \csnumgdef{bpl@saverefsection}{\c@refsection}%
}
{\item}
\DeclareFieldFormat{labelnumber}{%
\ifbool{newsection}{%
% Fix start counter value
- \csnumgdef{bbx@itemtotal}{\csuse{bbx@itemtotal}-#1+1}%
+ \mkbibsecstart{#1}%
\global\setbool{newsection}{false}%
}{}%
\mkbibdesc{#1}%
- \csnumgdef{bbx@currentitem}{#1}%
+ \csnumgdef{bpl@currentitem}{#1}%
}
-% Print labelnumber as actual number, plus item total
\newrobustcmd{\mkbibdesc}[1]{%
- \number\numexpr\csuse{bbx@itemtotal}+#1\relax%
+ % Print labelnumber as actual number, plus item total
+ \number\numexpr\csuse{bpl@itemtotal}+#1\relax%
+}%
+
+\newrobustcmd{\mkbibsecstart}[1]{%
+ \csnumgdef{bpl@itemtotal}{\csuse{bpl@itemtotal}-#1+1}%
}
-% Way to manual shift the numbering (undocumented)
-\newcommand*\decreasebbxnumbering[1]{%
- \csnumgdef{bbx@itemtotal}{\csuse{bbx@itemtotal}-#1}%
+% Way to manually shift the numbering
+\csnumgdef{bpl@shift@itemtotal}{0}
+\newcommand*\shiftbplnum[1]{%
+ \csnumgdef{bpl@shift@itemtotal}{#1}%
}
+%
+% Reverse numbering
+% Inspired by moewew's approach at
+% https://tex.stackexchange.com/a/563328/19291
+%
+\AtEndOfPackage{%
+\newcounter{prevrefsection}%
+\if@bpl@reversenum
+ % Count total number of entries in each refsection
+ \AtDataInput{%
+ \ifcategory{filtered}{%
+ \csnumgdef{bpl@entrycount:\therefsection}{%
+ \csuse{bpl@entrycount:\therefsection}+1%
+ }%
+ \setcounter{prevrefsection}{\therefsection}%
+ \addtocounter{prevrefsection}{-1}%
+ \csnumgdef{bpl@comp@entrycount:\therefsection}{%
+ \csuse{bpl@comp@entrycount:\theprevrefsection}+\csuse{bpl@entrycount:\therefsection}%
+ }%
+ \csnumgdef{bpl@all@entrycount}{%
+ \csuse{bpl@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@entrycount:\therefsection}+\csuse{bpl@itemtotal}-#1+1\relax%
+ }%
+ \renewrobustcmd{\mkbibsecstart}[1]{%
+ \setcounter{prevrefsection}{\therefsection}%
+ \addtocounter{prevrefsection}{-1}%
+ \if@bpl@numberreset
+ \csnumgdef{bpl@itemtotal}{#1-1+\csuse{bpl@shift@itemtotal}}%
+ \else
+ \csnumgdef{bpl@itemtotal}{\csuse{bpl@all@entrycount}%
+ -\csuse{bpl@comp@entrycount:\theprevrefsection}%
+ -\csuse{bpl@entrycount:\therefsection}-#1+1%
+ +\csuse{bpl@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}]
+ }
}
}
diff --git a/macros/latex/contrib/biblatex-contrib/biblatex-publist/publist.cbx b/macros/latex/contrib/biblatex-contrib/biblatex-publist/publist.cbx
index 7a856b1111..f0e9cd47c2 100644
--- a/macros/latex/contrib/biblatex-contrib/biblatex-publist/publist.cbx
+++ b/macros/latex/contrib/biblatex-contrib/biblatex-publist/publist.cbx
@@ -26,12 +26,57 @@
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\def\bpl@version{1.20}
-\def\bpl@rdate{2020/09/15}
+\def\bpl@version{1.21}
+\def\bpl@rdate{2020/09/21}
\ProvidesFile{publist.cbx}[\bpl@rdate\space v.\bpl@version\space
biblatex citation style (JSP)]
\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@secstartshift}{0}
+\newcommand*\shiftciteitem[1]{\csdef{bpl@secstartshift}{#1}}
+
+% Print labelnumber as actual number, plus item total
+% and probably a manual shift value
+\newrobustcmd{\mkrefdesc}[1]{%
+ \number\numexpr#1+\csuse{bpl@itemtotal}+\csuse{bpl@secstartshift}\relax%
+}
+
+\providebool{@bpl@reversenum}
+
+\AtEndOfPackage{%
+\if@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@itemtotal}-#1+1%
+ +\csuse{bpl@secstartshift}\relax%
+ }%
+\fi%
+}
+
+%%
\endinput