From daaeaf2b27cf6fd1376b8a0ab96409972fb5d58c Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Mon, 22 Oct 2012 23:27:48 +0000 Subject: new biblatex-publist (22oct12) git-svn-id: svn://tug.org/texlive/trunk@28050 c570f23f-e606-0410-a88d-b1316a301751 --- .../texmf-dist/doc/latex/biblatex-publist/README | 42 +++ .../latex/biblatex-publist/biblatex-publist.pdf | Bin 0 -> 164707 bytes .../latex/biblatex-publist/biblatex-publist.tex | 248 +++++++++++++++ .../tex/latex/biblatex-publist/publist.bbx | 335 +++++++++++++++++++++ 4 files changed, 625 insertions(+) create mode 100644 Master/texmf-dist/doc/latex/biblatex-publist/README create mode 100644 Master/texmf-dist/doc/latex/biblatex-publist/biblatex-publist.pdf create mode 100644 Master/texmf-dist/doc/latex/biblatex-publist/biblatex-publist.tex create mode 100644 Master/texmf-dist/tex/latex/biblatex-publist/publist.bbx (limited to 'Master/texmf-dist') diff --git a/Master/texmf-dist/doc/latex/biblatex-publist/README b/Master/texmf-dist/doc/latex/biblatex-publist/README new file mode 100644 index 00000000000..a601f8639fa --- /dev/null +++ b/Master/texmf-dist/doc/latex/biblatex-publist/README @@ -0,0 +1,42 @@ +---------------------------------------------------------------- +The biblatex-publist package + +A biblatex bibliography style file to produce academic +publication lists. + +Maintained by Jürgen Spitzmüller +E-mail: juergen (at) spitzmueller (dot) org + +Released under the LaTeX Project Public License v1.3 or later +See http://www.latex-project.org/lppl.txt +---------------------------------------------------------------- + +** PURPOSE ** + +The biblatex-publist package provides a biblatex bibliography +style file (*.bbx) for publication lists, i. e. a bibliography +containing one's own publications. The style file draws on +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 +package. + + +** CONTENTS ** + +The package consists of the file biblatex-publist.bbx. + + +** DOCUMENTATION ** + +See the included manual biblatex-publist.pdf for usage +instructions. + + +** CHANGES ** + +* V. 0.2 (2012-10-21): Initial release on 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 new file mode 100644 index 00000000000..985f247b9f0 Binary files /dev/null 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 new file mode 100644 index 00000000000..7c707dc6400 --- /dev/null +++ b/Master/texmf-dist/doc/latex/biblatex-publist/biblatex-publist.tex @@ -0,0 +1,248 @@ +\documentclass{article} +\usepackage{charter} +\usepackage[T1]{fontenc} +\usepackage[latin9]{inputenc} +\usepackage{listings} +\usepackage{url} + +\newcommand*\bpl{\texttt{biblatex-publist}} +\newcommand*\bibltx{\texttt{biblatex}} + +\begin{document} + +\title{biblatex-publist} +\author{Jürgen Spitzmüller}\thanks{juergen (at) spitzmueller (dot) org.} +\date{Version 0.2, 21/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}.} +\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, +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, +they diverge from those in some respects. Most notably, it is widespread +practice to omit your own name in your publication list and only list +your co-authors, if there are any. If you want to follow this practice, +a normal bibliography style does not 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 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 +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 +conceptual ideas, and it is in an early stage of development, being +tested only for the specific needs of the author. Of course, bug reports, +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} +\end{lstlisting} +\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: +\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: +\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} + +\subsection{Further options} + +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.% +}): +\begin{description} +\item [{myfirstname}] = + + +If you need to disambiguate your name further, you can additionally +specify your first name. + +\item [{boldyear}] {[}=true|false{]} default: \emph{true}. + + +By default, the year is printed in bold. To prevent this, pass the +option \emph{boldyear=false} to \bibltx . + +\item [{marginyear}] {[}=true|false{]} default: \emph{false}. + + +With this option set to true, the publication year will be printed +in the margin once a new year starts. The option also has the effect +that all marginpars are printed ``reversed'', i.\,e. on the left +side in one-sided documents (via \texttt{\textbackslash{}reversemarginpar}). + +\end{description} +The appearance of the \emph{marginyear} is controlled by the \texttt{\textbackslash{}plmarginyear} +macro, which has the following default definition: +\begin{quote} +\begin{lstlisting}[language={[LaTeX]TeX}] +\providecommand*\plmarginyear[1]{% + \raggedleft\small\textbf{#1}% +} +\end{lstlisting} + +\end{quote} +If you want to change the appearance, just redefine this macro via +\texttt{\textbackslash{}renewcommand{*}}. + + +\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.% +} The following additional localization keys (\texttt{\textbackslash{}bibstrings}) +are added by the package: +\begin{itemize} +\item \emph{with}: the preposition ``with'' that precedes the list of +co-authors. +\item \emph{parttranslationof}: the expression ``partial translation of'' +for entries referring to partially translated work via \bibltx 's +``related entries'' feature (see sec.~\ref{sec:partial-translations}). +\end{itemize} + +\section{Further Extensions} + +The following extensions of standard \bibltx\ features are provided. + + +\subsection{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} +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 +people's reviews of your work to your publication list, while these +titles are clearly marked and do not interfere with the overall numbering +(see sec.~\ref{sec:example} for an example). + + +\subsection{Partial translations\label{sec:partial-translations}} + +A new ``related entry'' type \emph{parttranslationof} is provided. +This is an addition to the \emph{translationof} related entry type +\bibltx\ itself provides. Please refer to the \bibltx\ manual \cite{bibltx} +on what ``related entries'' are and how to use them. + + +\section{An example\label{sec:example}} + +Publication lists are usually categorized by genre (monographs, articles, +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: +\begin{quote} +\begin{lstlisting}[float,frame=single,language={[LaTeX]TeX}] +\documentclass{article} +\usepackage[T1]{fontenc} +\usepackage[latin9]{inputenc} + +\usepackage{csquotes}% not required, but recommended +\usepackage[bibstyle=publist,omitname=Doe] + {biblatex} + +\addbibresource{% + mymonographs.bib, + myarticles.bib, + myproceedings.bib +} + +\begin{document} + +\title{John Doe's publications} +\date{\today} +\maketitle + +\section{Monographs} +\begin{refsection}[mymonographs] +\nocite{*} +\printbibliography[heading=none] +\end{refsection} + +\section{Proceedings} +\begin{refsection}[myproceedings] +\nocite{*} +\printbibliography[heading=none] +\end{refsection} + +\section{Articles} +\begin{refsection}[myarticles] +\nocite{*} +\printbibliography[heading=none] +\end{refsection} + +\end{document} +\end{lstlisting} + +\end{quote} +If you want to add other people's reviews of your work, add a sections +such as: +\begin{quote} +\begin{lstlisting}[frame=single,language={[LaTeX]TeX}] +\subsubsection*{Reviews of my thesis} +\begin{refsection}[mythesis_reviews] +\renewcommand\bibfont{\small} +\nocite{*} +\printbibliography[heading=none,env=reviews] +\end{refsection} +\end{lstlisting} + +\end{quote} +Note that the \emph{printbibliography} option \emph{env=reviews} is +crucial. + + +\section{Change Log} +\begin{description} +\item [{V.~0.2~(2012-10-21)}] Initial release on CTAN.\end{description} +\begin{thebibliography}{1} +\bibitem{bibltx}Lehman, Philipp (with Audrey Boruvka, Philip Kime +and Joseph Wright): \emph{The biblatex Package. Programmable Bibliographies +and Citations}. August 2012. \url{http://www.ctan.org/tex-archive/macros/latex/contrib/biblatex}. + +\bibitem{ttb}Markey, Nicolas: \emph{Tame the BeaST. The B to X of +BibTEX}. October 11, 2009. \url{http://www.ctan.org/tex-archive/info/bibtex/tamethebeast}.\end{thebibliography} + +\end{document} diff --git a/Master/texmf-dist/tex/latex/biblatex-publist/publist.bbx b/Master/texmf-dist/tex/latex/biblatex-publist/publist.bbx new file mode 100644 index 00000000000..52053b744ce --- /dev/null +++ b/Master/texmf-dist/tex/latex/biblatex-publist/publist.bbx @@ -0,0 +1,335 @@ +% publist.bbx, biblatex style by Juergen Spitzmueller +% requires biblatex >= 1.7 +% +% This work may be distributed and/or modified under the +% conditions of the LaTeX Project Public License, either version 1.3 +% of this license or (at your option) any later version. +% The latest version of this license is in +% http://www.latex-project.org/lppl.txt +% and version 1.3 or later is part of all distributions of LaTeX +% version 2003/12/01 or later. +% +% This work has the LPPL maintenance status "maintained". +% +% This Current Maintainer of this work is Jürgen Spitzmüller. +% +% This work consists of the file publist.bbx +% +% +% The purpose of this file is to provide a biblatex bibliography style +% for (numbered) publication lists where the own name is omitted and +% co-authors are marked as such. +% +% This is work in progress. Please send suggestions and bug reports +% to +% +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + +\ProvidesFile{publist.bbx}[2012/10/21 v0.2 biblatex bibliography style] + +\@ifpackagelater{biblatex}{2011/11/13} + {} + {\PackageError{biblatex-publist} + {Outdated 'biblatex' package\MessageBreak + Upgrade to biblatex v1.7 (2011/11/13) or later.\MessageBreak + I found: '\csuse{ver@biblatex.sty}'.\MessageBreak + This is a fatal error. I'm aborting now}% + \endinput} + +\RequireBibliographyStyle{authoryear} + +\ExecuteBibliographyOptions{% + pagetracker=spread, + labelnumber, + useprefix=false, + dashed=false, + sorting=ydnt, + defernumbers=true, + maxnames=99} + +% +% The omitted name of the publication list author +\providecommand*\mysurname{} +\providecommand*\myfirstname{} +% +% Formatting of year in margin par (if requested) +\providecommand*\plmarginyear[1]{% + \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} +} + + +\DeclareFieldFormat{bibentrysetcount}{\mkbibparens{\mknumalph{#1}}} +\DeclareFieldFormat{labelnumberwidth}{\mkbibbrackets{#1}} +\DeclareFieldFormat{shorthandwidth}{\mkbibbrackets{#1}} +\DeclareFieldFormat{related:parttranslationof}{\mkbibbrackets{#1}} + + +% +% Deal with numbering (resume numbers in refsections) +% +\csnumgdef{bbx@itemtotal}{0} +\csnumgdef{bbx@currentitem}{0} + +\defbibenvironment{bibliography} + {\list + {\printtext[labelnumberwidth]{% + \printfield{prefixnumber}% + \printfield{labelnumber}}} + {\setlength{\labelwidth}{\labelnumberwidth}% + \setlength{\leftmargin}{\labelwidth}% + \setlength{\labelsep}{\biblabelsep}% + \addtolength{\leftmargin}{\labelsep}% + \setlength{\itemsep}{\bibitemsep}% + \setlength{\parsep}{\bibparsep}}% + \renewcommand*{\makelabel}[1]{\hss##1}} + {\endlist\csnumgdef{bbx@itemtotal}{\csuse{bbx@itemtotal}+\csuse{bbx@currentitem}}} + {\item} + +\DeclareFieldFormat{labelnumber}{\mkbibdesc{#1}\csnumgdef{bbx@currentitem}{#1}} +\DeclareFieldFormat[reference]{labelnumber}{#1} + +% Print labelnumber as actual number, plus item total +\newrobustcmd{\mkbibdesc}[1]{% + \number\numexpr\csuse{bbx@itemtotal}+#1\relax} + +\newcommand*\decreasebbxnumbering[1]{\csnumgdef{bbx@itemtotal}{\csuse{bbx@itemtotal}-#1}} + + +% +% New environment for (foreign) reviews +% +\defbibenvironment{reviews} + {\begin{enumerate}% + \small\setlength\itemsep{0pt}} + {\end{enumerate}} + {\item} + + +% +% Remove own name from author and editor lists +% +\newtoggle{ismyself} +\newtoggle{hadmyself} + +\DeclareNameFormat{author}{% + \ifthenelse{\value{listcount}=1}{\ifthenelse{\value{author}>1}{\bibopenparen\bibstring{with}\addspace}{}}{}% + % Exclude omitted author + \ifboolexpr{ + 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}}% + }% + }% + \ifblank{#3}{}{#3\addspace}% + \ifblank{#5}{}{#5\addspace}% + \togglefalse{ismyself}% + #1% + \usebibmacro{name:andothers}}% + \ifthenelse{\value{listcount}=\value{liststop}\AND\value{author}>1}{\unspace\bibcloseparen}{}% +} + +\DeclareNameFormat{editor}{% + \ifthenelse{\value{listcount}=1}{\ifthenelse{\value{editor}>1}{\bibopenparen\bibstring{with}\addspace}{}}{}% + % Exclude omitted author + \ifboolexpr{ + 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}}% + }% + }% + \ifblank{#3}{}{#3\addspace}% + \ifblank{#5}{}{#5\addspace}% + \togglefalse{ismyself}% + #1% + \usebibmacro{name:andothers}}% + \ifthenelse{\value{listcount}=\value{liststop}\AND\value{editor}>1}{\unspace\bibcloseparen}{}% +} + +\DeclareNameFormat{bookauthor}{% + \ifblank{#5}{}{#5\addspace}% + #1\ifblank{#3}{}{\addcomma\space #3} + \ifthenelse{\value{listcount}<\value{liststop}} + {\addslash} + {}% + \usebibmacro{name:andothers}} + +\renewbibmacro*{name:andothers}{% + \ifthenelse{\value{listcount}=\value{liststop}\AND + \ifmorenames} + {\ifnum\value{liststop}>1 \finalandcomma\fi + \andothersdelim\biblcstring{andothers}} + {}} + +% +% Macros +% + +\renewbibmacro*{author}{% + \ifnameundef{author} + {} + {\usebibmacro{year+labelyear}\addspace% + \printnames{author}% + \setunit{\addspace}% + \iffieldundef{nameaddon} + {} + {\mkbibbrackets{\bibstring{alias}% + \addspace\printfield{nameaddon}}}}} + +\renewbibmacro*{editor}{% + \ifnameundef{editor} + {} + {\usebibmacro{year+labelyear}% + \addspace% + \printnames{editor}% + \setunit{\addspace}% + \usebibmacro{editorstrg}}} + +\renewbibmacro*{editor+others}{% + \ifboolexpr{ + test \ifuseeditor + and + not test {\ifnameundef{editor}} + } + {\usebibmacro{year+labelyear}% + \addspace% + \printnames{editor}% + \setunit{\addcomma\space}% + \usebibmacro{editor+othersstrg}% + \clearname{editor}} + {}} + +\newbibmacro*{labelyear+extrayear}{% + \mkbibbold{\printtext{% + \printfield{labelyear}% + \printfield{extrayear}}}% +} + +\AtBeginDocument{% +\if@unboldyear +\renewbibmacro*{labelyear+extrayear}{% + \printtext{% + \printfield{labelyear}% + \printfield{extrayear}}% +} +\fi +} + +\newbibmacro*{year+labelyear}{% + \iffieldundef{year} + {\let\bbx@lasthash\undefined} + {\usebibmacro{labelyear+extrayear}% + \if@marginyear + \iffieldequals{labelyear}{\bbx@lasthash}{}{% + \printtext{\marginpar{\small\plmarginyear{\printfield{labelyear}}}}% + }% + \fi + \savefield{labelyear}{\bbx@lasthash}% + }} + +\newbibmacro*{rauthor/label}{% + \ifnameundef{author} + {\usebibmacro{label}} + {\usebibmacro{rauthor}} +} + +\newbibmacro*{rauthor}{% + \ifnameundef{author} + {\let\bbx@lasthash\undefined} + {\ifthenelse{\iffieldequals{namehash}{\bbx@lasthash}\AND\NOT + \iffirstonpage} + {\bibnamedash} + {\savefield{namehash}{\bbx@lasthash}% + \printnames{author}% + \setunit{\addspace}}}% + \iffieldundef{nameaddon} + {} + {\mkbibbrackets{\bibstring[\unspace]{alias}\addspace\printfield{nameaddon}}% + \addspace}% + \usebibmacro{ryear+labelyear}} + +\newbibmacro*{ryear+labelyear}{% + \iffieldundef{year} + {} + {\printtext[parens]{% + \printfield{labelyear}% + \printfield{extrayear}}}} + +% +% l7n +% +\NewBibliographyString{with} +\NewBibliographyString{parttranslationof} +\DefineBibliographyStrings{ngerman}{% + parttranslationof = {Teil\"ubersetzung von}, + with = {mit} +} +\DefineBibliographyStrings{english}{% + parttranslationof = {partial translation of}, + with = {with} +} + + +% +% New driver for reviews +% + +\DeclareBibliographyDriver{review}{% + \usebibmacro{rauthor/label}% + \setunit*{\addcolon\space}% + \usebibmacro{title}% + \newunit\newblock + \usebibmacro{in:}% + \usebibmacro{journal+issuetitle}% + \newunit\newblock + \printfield{note}% + \setunit{\addcomma\space}% + \printfield{pages} + \newunit\newblock + \printfield{issn}% + \newunit\newblock + \printfield{doi}% + \setunit{\addspace} + \usebibmacro{addendum+pubstate}% + \newunit\newblock + \usebibmacro{url+urldate}% + \newunit\newblock + \usebibmacro{pageref}% + \newunit\newblock + \usebibmacro{related}% + \usebibmacro{finentry}} + +\endinput -- cgit v1.2.3