From 96c2f6d58f41753e3a725cd10e4ff646155e9017 Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Tue, 23 Oct 2012 23:30:42 +0000 Subject: biblatex-publist (23oct12) git-svn-id: svn://tug.org/texlive/trunk@28061 c570f23f-e606-0410-a88d-b1316a301751 --- .../texmf-dist/doc/latex/biblatex-publist/README | 14 +- .../latex/biblatex-publist/biblatex-publist.pdf | Bin 164707 -> 98763 bytes .../latex/biblatex-publist/biblatex-publist.tex | 130 ++++++++++++++----- .../tex/latex/biblatex-publist/publist.bbx | 144 +++++++++++++++------ 4 files changed, 213 insertions(+), 75 deletions(-) diff --git a/Master/texmf-dist/doc/latex/biblatex-publist/README b/Master/texmf-dist/doc/latex/biblatex-publist/README index a601f8639fa..1661ce0dc77 100644 --- a/Master/texmf-dist/doc/latex/biblatex-publist/README +++ b/Master/texmf-dist/doc/latex/biblatex-publist/README @@ -20,7 +20,7 @@ biblatex's authoryear style, but provides some extra features needed for publication lists, such as the omission of the own name from author or editor data. -The package requires at least version 1.7 of the biblatex +The package requires at least version 2.0 of the biblatex package. @@ -37,6 +37,16 @@ instructions. ** CHANGES ** -* V. 0.2 (2012-10-21): Initial release on CTAN. +V. 0.3 (2012-10-23): + - Bug fix: Add missing "and" if omitted name was last + minus one. + - Bug fix: Fix output with "et al." if omitted name is + first and liststop is 1. + - Set maxnames default to 4. + - Add filter possibility. + - Add French localization. + - Some corrections to the manual. + +* V. 0.2 (2012-10-21): Initial release to CTAN. diff --git a/Master/texmf-dist/doc/latex/biblatex-publist/biblatex-publist.pdf b/Master/texmf-dist/doc/latex/biblatex-publist/biblatex-publist.pdf index 985f247b9f0..2cbce9ae64f 100644 Binary files a/Master/texmf-dist/doc/latex/biblatex-publist/biblatex-publist.pdf and b/Master/texmf-dist/doc/latex/biblatex-publist/biblatex-publist.pdf differ diff --git a/Master/texmf-dist/doc/latex/biblatex-publist/biblatex-publist.tex b/Master/texmf-dist/doc/latex/biblatex-publist/biblatex-publist.tex index 7c707dc6400..f24b3657d4e 100644 --- a/Master/texmf-dist/doc/latex/biblatex-publist/biblatex-publist.tex +++ b/Master/texmf-dist/doc/latex/biblatex-publist/biblatex-publist.tex @@ -1,34 +1,55 @@ +%% LyX 2.0.5dev created this file. For more info, see http://www.lyx.org/. +%% Do not edit unless you really know what you are doing. \documentclass{article} \usepackage{charter} +\usepackage[scaled=0.87]{beramono} \usepackage[T1]{fontenc} \usepackage[latin9]{inputenc} \usepackage{listings} +\lstset{basicstyle={\ttfamily}} \usepackage{url} - +\usepackage[unicode=true, + bookmarks=true,bookmarksnumbered=false,bookmarksopen=false, + breaklinks=false,pdfborder={0 0 0},backref=false,colorlinks=false] + {hyperref} +\hypersetup{pdftitle={The biblatex-publist manual}, + pdfauthor={Jürgen Spitzmüller}, + pdfkeywords={biblatex,publication list}} + +\makeatletter +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% User specified LaTeX commands. \newcommand*\bpl{\texttt{biblatex-publist}} \newcommand*\bibltx{\texttt{biblatex}} +\makeatother + \begin{document} \title{biblatex-publist} -\author{Jürgen Spitzmüller}\thanks{juergen (at) spitzmueller (dot) org.} -\date{Version 0.2, 21/10/2012} -\maketitle + +\author{Jürgen Spitzmüller% +\thanks{\protect\href{mailto:juergen@spitzmueller.org}{juergen (at) spitzmueller (dot) org}.% +}} + + +\date{Version 0.3, 23/10/2012} +\maketitle \begin{abstract} The \bpl\ package provides a \emph{biblatex bibliography style file} ({*}.bbx) for publication lists, i.\,e.\ a bibliography containing one's own publications. The style file draws on \bibltx 's \emph{authoryear} style, but provides some extra features needed for publication lists, such as the omission of the own name from author or editor data. The -package requires at least version 1.7 of the \bibltx\ package.% -\footnote{For \bibltx , see \url{http://www.ctan.org/tex-archive/macros/latex/contrib/biblatex}.} +package requires at least version 2.0 of the \bibltx\ package.% +\footnote{For \bibltx , see \url{http://www.ctan.org/tex-archive/macros/latex/contrib/biblatex}.% +} \end{abstract} \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, +The \bpl\ package ships a \emph{biblatex bibliography style file +}({*}.bbx) for a specific task: academic publication lists. Such lists, usually 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, @@ -43,7 +64,8 @@ exist to generate such lists (particularly from Bib\TeX{} data). For traditional Bib\TeX{}, Nicolas Markey has written 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 +see also \cite{ttb}.% +}, which helps a lot if you want to produce a publication list with Bib\TeX{}. For \bibltx , however, no equivalent solution exists yet. The \bpl\ package is the result of the aim of emulating the features of \emph{publist.bst} with \bibltx's means. It draws on Nicolas Markey's @@ -54,27 +76,28 @@ comments and ideas are welcome. \section{Loading the package} + \subsection{Standard usage} The standard way of using the package is to load the style file via - \begin{quote} \begin{lstlisting}[language={[LaTeX]TeX}] \usepackage[bibstyle=publist, - omitname=MySurname]{biblatex} + omitname=]{biblatex} \end{lstlisting} -\end{quote} +\end{quote} The \emph{omitname} option should always be passed. It tells the style -file which surname it should suppress (usually yours). This means: -For all of your publications where you are the sole author (or editor), -the author name will be omitted completely, as in: +file, by surname, which person it should suppress in the author\slash{}editor +list (usually you). That is to say: For all of your publications where +you are the sole author or editor, the author\slash{}editor name +will be omitted completely, as in: \begin{quote} \textbf{2012.} Some recent trends in gardening. In: \emph{Gardening Practice} 56, pp. 34--86. \end{quote} -If there are co-authors, your name will be filtered out and the co-authors -added in parentheses, as in: +If there are co-authors\slash{}co-editors, your name 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. @@ -84,14 +107,14 @@ in gardening? In: \emph{Gardening Practice} 24, pp. 10--15. Currently, there are the following further options (next to the options provided by the \bibltx\ package itself% -\footnote{Please refer to the \bibltx\ manual for those.% +\footnote{Please refer to the \bibltx\ manual \cite{bibltx} for those.% }): \begin{description} -\item [{myfirstname}] = +\item [{omitfirstname}] = -If you need to disambiguate your name further, you can additionally -specify your first name. +If you need to disambiguate your name, you can additionally specify +your first name. \item [{boldyear}] {[}=true|false{]} default: \emph{true}. @@ -124,9 +147,9 @@ If you want to change the appearance, just redefine this macro via \section{Localization} -Since the package draws on \bibltx , it supports localization. However, -currently only two languages are supported: English and German.% -\footnote{ Please send suggestions for other languages to the package author.% +Since the package draws on \bibltx , it supports localization. Currently, +the following languages are supported: English, French and German.% +\footnote{Please send suggestions for other languages to the package author.% } The following additional localization keys (\texttt{\textbackslash{}bibstrings}) are added by the package: \begin{itemize} @@ -142,12 +165,12 @@ for entries referring to partially translated work via \bibltx 's The following extensions of standard \bibltx\ features are provided. -\subsection{Review bibliography type} +\subsection{Review bibliography type\label{sub:review-bibliography-type}} Although a \emph{review} entry type is provided by \bibltx , this type is treated as an alias for \emph{article}. The \bpl\ package uses this entry type for a specific purpose: Foreign reviews of your -own work. It therefore defines a new bibliography environment \emph{review} +own work. It therefore defines a new bibliography environment \emph{reviews} with a specific look (particularly as far as the author names are concerned) and its own numbering; furthermore, it redefines the \emph{review} bibliography driver. The purpose of this is that you can add other @@ -171,10 +194,11 @@ book chapters, etc.). For this task, we use \texttt{\textbackslash{}refsections} Other possibilities were not tested and might fail. The suggested procedure is to maintain separate bib files for each -category, say \emph{mymonographs.bib}, \emph{myarticles.bib}, \emph{myproceedings.bib}. -Then a typical file would look like this: +category, say \emph{mymonographs.bib}, \emph{myarticles.bib}, \emph{myproceedings.bib}.% +\footnote{But see sec.~\ref{sec:filtering} for an alternative.% +} Then a typical file would look like in Listing~\ref{example}. \begin{quote} -\begin{lstlisting}[float,frame=single,language={[LaTeX]TeX}] +\begin{lstlisting}[caption={Example document},float,frame=single,label={example},language={[LaTeX]TeX}] \documentclass{article} \usepackage[T1]{fontenc} \usepackage[latin9]{inputenc} @@ -217,12 +241,12 @@ Then a typical file would look like this: \end{lstlisting} \end{quote} -If you want to add other people's reviews of your work, add a sections +If you want to add other people's reviews of your work, add a section such as: \begin{quote} \begin{lstlisting}[frame=single,language={[LaTeX]TeX}] \subsubsection*{Reviews of my thesis} -\begin{refsection}[mythesis_reviews] +\begin{refsection}[mythesis-reviews] \renewcommand\bibfont{\small} \nocite{*} \printbibliography[heading=none,env=reviews] @@ -230,13 +254,51 @@ such as: \end{lstlisting} \end{quote} -Note that the \emph{printbibliography} option \emph{env=reviews} is -crucial. +Note that the \texttt{\textbackslash{}printbibliography} option \emph{env=reviews} + is crucial if you want to use the specifics \bpl\ defines for reviews +(see sec.~\ref{sub:review-bibliography-type}). +\section{Filtering\label{sec:filtering}} + +If you have a bibliographic database consisting not only of your own +publications, you can extract yours with the bibliography filter \emph{mine}, +which has to be passed to \texttt{\textbackslash{}printbibliography}, +as in: +\begin{quote} +\begin{lstlisting}[frame=single,language={[LaTeX]TeX}] +\begin{refsection}[mybibliography] +\nocite{*} +\printbibliography[heading=none,filter=mine] +\end{refsection} +\end{lstlisting} + +\end{quote} +Of course, you can also use other filter possibilities provided by +\bibltx , such as filtering by type or by keyword. So if you want +to extract all of your articles from a larger database with entries +of diverse type and authors, specify: +\begin{quote} +\begin{lstlisting}[language={[LaTeX]TeX}] +\printbibliography[heading=none,filter=mine,type=article] +\end{lstlisting} + +\end{quote} + \section{Change Log} \begin{description} -\item [{V.~0.2~(2012-10-21)}] Initial release on CTAN.\end{description} +\item [{V.~0.3~(2012-10-23):}]~ + +\begin{itemize} +\item Bug fix: Add missing ``and'' if omitted name was last minus one. +\item Bug fix: Fix output with ``et al.'' if omitted name is first and +\emph{liststop} is 1. +\item Set \emph{maxnames} default to 4. +\item Add filter possibility (see sec.~\ref{sec:filtering}). +\item Add French localization. +\item Some corrections to the manual. +\end{itemize} +\item [{V.~0.2~(2012-10-21):}] Initial release to CTAN.\end{description} \begin{thebibliography}{1} \bibitem{bibltx}Lehman, Philipp (with Audrey Boruvka, Philip Kime and Joseph Wright): \emph{The biblatex Package. Programmable Bibliographies diff --git a/Master/texmf-dist/tex/latex/biblatex-publist/publist.bbx b/Master/texmf-dist/tex/latex/biblatex-publist/publist.bbx index 52053b744ce..147cac98f4d 100644 --- a/Master/texmf-dist/tex/latex/biblatex-publist/publist.bbx +++ b/Master/texmf-dist/tex/latex/biblatex-publist/publist.bbx @@ -1,5 +1,5 @@ % publist.bbx, biblatex style by Juergen Spitzmueller -% requires biblatex >= 1.7 +% requires biblatex >= 2.0 % % This work may be distributed and/or modified under the % conditions of the LaTeX Project Public License, either version 1.3 @@ -25,13 +25,17 @@ % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -\ProvidesFile{publist.bbx}[2012/10/21 v0.2 biblatex bibliography style] +\def\bpl@version{0.3} +\def\bpl@rdate{2012/10/21} -\@ifpackagelater{biblatex}{2011/11/13} +\ProvidesFile{publist.bbx}[\bpl@rdate\space v.\bpl@version\space + biblatex bibliography style (JSP)] + +\@ifpackagelater{biblatex}{2012/07/01} {} {\PackageError{biblatex-publist} {Outdated 'biblatex' package\MessageBreak - Upgrade to biblatex v1.7 (2011/11/13) or later.\MessageBreak + Upgrade to biblatex v2.0 (2012/07/01) or later.\MessageBreak I found: '\csuse{ver@biblatex.sty}'.\MessageBreak This is a fatal error. I'm aborting now}% \endinput} @@ -45,7 +49,7 @@ dashed=false, sorting=ydnt, defernumbers=true, - maxnames=99} + maxnames=4} % % The omitted name of the publication list author @@ -57,21 +61,28 @@ \raggedleft\small\textbf{#1}% } + % % Options % \DeclareBibliographyOption{omitname}{\renewcommand*\mysurname{#1}} + \DeclareBibliographyOption{omitfirstname}{\renewcommand*\myfirstname{#1}} + \newif\if@marginyear\@marginyearfalse \DeclareBibliographyOption{marginyear}[true]{% \ifstrequal{#1}{true}{\@marginyeartrue\reversemarginpar}{\@marginyearfalse} } + \newif\if@unboldyear\@unboldyearfalse \DeclareBibliographyOption{boldyear}[true]{% \ifstrequal{#1}{false}{\@unboldyeartrue}{\@unboldyearfalse} } +% +% Field format definitions +% \DeclareFieldFormat{bibentrysetcount}{\mkbibparens{\mknumalph{#1}}} \DeclareFieldFormat{labelnumberwidth}{\mkbibbrackets{#1}} \DeclareFieldFormat{shorthandwidth}{\mkbibbrackets{#1}} @@ -83,6 +94,7 @@ % \csnumgdef{bbx@itemtotal}{0} \csnumgdef{bbx@currentitem}{0} +\newbool{started} \defbibenvironment{bibliography} {\list @@ -99,8 +111,14 @@ {\endlist\csnumgdef{bbx@itemtotal}{\csuse{bbx@itemtotal}+\csuse{bbx@currentitem}}} {\item} -\DeclareFieldFormat{labelnumber}{\mkbibdesc{#1}\csnumgdef{bbx@currentitem}{#1}} -\DeclareFieldFormat[reference]{labelnumber}{#1} +\DeclareFieldFormat{labelnumber}{% + \ifbool{started}{}{% + % Assure we really start at 0. + \csnumgdef{bbx@itemtotal}{-#1+1}% + \global\setbool{started}{true}}% + \mkbibdesc{#1}% + \csnumgdef{bbx@currentitem}{#1}% +} % Print labelnumber as actual number, plus item total \newrobustcmd{\mkbibdesc}[1]{% @@ -119,10 +137,42 @@ {\item} +% +% Filtered category +% +% Inspired by http://tex.stackexchange.com/a/28555/19291 +\DeclareBibliographyCategory{filtered} + +\DeclareIndexNameFormat{authorfiltered}{% + \ifboolexpr{ + test { \ifdefstring{\mysurname}{#1} } + and + ( test { \ifdefstring{\myfirstname}{#3} } or test { \ifdefstring{\myfirstname}{} }) } + {\addtocategory{filtered}{\thefield{entrykey}}} + {}} + +\DeclareIndexNameFormat{editorfiltered}{% + \ifboolexpr{ + test { \ifdefstring{\mysurname}{#1} } + and + ( test { \ifdefstring{\myfirstname}{#3} } or test { \ifdefstring{\myfirstname}{} }) } + {\addtocategory{filtered}{\thefield{entrykey}}} + {}} + +\DeclareIndexNameFormat[inbook,inproceedings,incollection]{editorfiltered}{}% + +\AtDataInput{% + \indexnames[authorfiltered]{author}% + \indexnames[editorfiltered]{editor}% +} + +\defbibfilter{mine}{category=filtered} + + % % Remove own name from author and editor lists % -\newtoggle{ismyself} +\newtoggle{myselfprec} \newtoggle{hadmyself} \DeclareNameFormat{author}{% @@ -132,23 +182,29 @@ test { \ifdefstring{\mysurname}{#1} } and ( test { \ifdefstring{\myfirstname}{#3} } or test { \ifdefstring{\myfirstname}{} }) } - {\toggletrue{ismyself}\toggletrue{hadmyself}} + {\toggletrue{myselfprec}\toggletrue{hadmyself}% + \ifthenelse{\value{listcount}=1\AND\value{liststop}=1} + {\stepcounter{liststop}}{}} {\ifthenelse{\value{listcount}=1}{\togglefalse{hadmyself}}{% - \iftoggle{ismyself}{}{% - \ifnumless{\value{listcount}}{\value{liststop}-1}% - {\addcomma\addspace}% - {\iftoggle{hadmyself}{% - \ifnumless{\value{listcount}}{\value{liststop}}% - {\addcomma\addspace}% - {\addspace\bibstring{and}\addspace}} - {\addspace\bibstring{and}\addspace}}% - }% + \ifboolexpr{ + test { \iftoggle{myselfprec} } + and + test { \ifnumless{\value{listcount}}{3} } } + {}{% + \ifnumless{\value{listcount}}{\value{liststop}-1}% + {\addcomma\addspace}% + {\iftoggle{hadmyself}{% + \ifnumless{\value{listcount}}{\value{liststop}}% + {\addcomma\addspace}% + {\addspace\bibstring{and}\addspace}} + {\addspace\bibstring{and}\addspace}}% + }% }% \ifblank{#3}{}{#3\addspace}% \ifblank{#5}{}{#5\addspace}% - \togglefalse{ismyself}% - #1% - \usebibmacro{name:andothers}}% + \togglefalse{myselfprec}% + #1}% + \usebibmacro{name:andothers}% \ifthenelse{\value{listcount}=\value{liststop}\AND\value{author}>1}{\unspace\bibcloseparen}{}% } @@ -159,23 +215,29 @@ test { \ifdefstring{\mysurname}{#1} } and ( test { \ifdefstring{\myfirstname}{#3} } or test { \ifdefstring{\myfirstname}{} }) } - {\toggletrue{ismyself}\toggletrue{hadmyself}} - {\ifthenelse{\value{listcount}=1}{\togglefalse{hadmyself}} - {\iftoggle{ismyself}{}{% - \ifnumless{\value{listcount}}{\value{liststop}-1}% - {\addcomma\addspace}% - {\iftoggle{hadmyself}{% - \ifnumless{\value{listcount}}{\value{liststop}}% - {\addcomma\addspace}% - {\addspace\bibstring{and}\addspace}} - {\addspace\bibstring{and}\addspace}}% - }% + {\toggletrue{myselfprec}\toggletrue{hadmyself}% + \ifthenelse{\value{listcount}=1\AND\value{liststop}=1} + {\stepcounter{liststop}}{}} + {\ifthenelse{\value{listcount}=1}{\togglefalse{hadmyself}}{% + \ifboolexpr{ + test { \iftoggle{myselfprec} } + and + test { \ifnumless{\value{listcount}}{3} } } + {}{% + \ifnumless{\value{listcount}}{\value{liststop}-1}% + {\addcomma\addspace}% + {\iftoggle{hadmyself}{% + \ifnumless{\value{listcount}}{\value{liststop}}% + {\addcomma\addspace}% + {\addspace\bibstring{and}\addspace}} + {\addspace\bibstring{and}\addspace}}% + }% }% \ifblank{#3}{}{#3\addspace}% \ifblank{#5}{}{#5\addspace}% - \togglefalse{ismyself}% - #1% - \usebibmacro{name:andothers}}% + \togglefalse{myselfprec}% + #1}% + \usebibmacro{name:andothers}% \ifthenelse{\value{listcount}=\value{liststop}\AND\value{editor}>1}{\unspace\bibcloseparen}{}% } @@ -293,14 +355,18 @@ % \NewBibliographyString{with} \NewBibliographyString{parttranslationof} -\DefineBibliographyStrings{ngerman}{% - parttranslationof = {Teil\"ubersetzung von}, - with = {mit} -} \DefineBibliographyStrings{english}{% parttranslationof = {partial translation of}, with = {with} } +\DefineBibliographyStrings{french}{% + parttranslationof = {traduction partielle de}, + with = {avec} +} +\DefineBibliographyStrings{german}{% + parttranslationof = {Teil\"ubersetzung von}, + with = {mit} +} % -- cgit v1.2.3