From 3e80c1e9b536ecb91cb18e7b6e4fa5930803d4f6 Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Mon, 17 Mar 2014 22:50:07 +0000 Subject: biblatex-source-division (17mar14) git-svn-id: svn://tug.org/texlive/trunk@33206 c570f23f-e606-0410-a88d-b1316a301751 --- .../biblatex-source-division.pdf | Bin 67177 -> 60582 bytes .../biblatex-source-division.tex | 28 +++++++++++--------- .../doc/latex/biblatex-source-division/tabular.pdf | Bin 8245 -> 0 bytes .../biblatex-source-division.sty | 29 ++++++++++----------- 4 files changed, 30 insertions(+), 27 deletions(-) delete mode 100644 Master/texmf-dist/doc/latex/biblatex-source-division/tabular.pdf diff --git a/Master/texmf-dist/doc/latex/biblatex-source-division/biblatex-source-division.pdf b/Master/texmf-dist/doc/latex/biblatex-source-division/biblatex-source-division.pdf index d707a19a2e9..136e84095c8 100644 Binary files a/Master/texmf-dist/doc/latex/biblatex-source-division/biblatex-source-division.pdf and b/Master/texmf-dist/doc/latex/biblatex-source-division/biblatex-source-division.pdf differ diff --git a/Master/texmf-dist/doc/latex/biblatex-source-division/biblatex-source-division.tex b/Master/texmf-dist/doc/latex/biblatex-source-division/biblatex-source-division.tex index 561ac1ba158..e3531e519ae 100644 --- a/Master/texmf-dist/doc/latex/biblatex-source-division/biblatex-source-division.tex +++ b/Master/texmf-dist/doc/latex/biblatex-source-division/biblatex-source-division.tex @@ -24,8 +24,8 @@ email={maieul maieul net}, author={Maïeul Rouquette}, subtitle={}, - revision={1.1.0}, - date={19/01/2014}, + revision={2.1.0}, + date={17/03/2014}, url={https://github.com/maieul/biblatex-source-division}} % Hyphen \hyphenation{Ma-de-lei-ne} @@ -75,7 +75,7 @@ It must be loaded after the \biblatex package. \usepackage{biblatex-source-division} \end{minted} -When citing a reference (with \cmd{cite}, \cmd{footcite} or other citation command), the division of source is added in parenthesis in the \opt{prenote} arg. The syntax of the rest of the \opt{prenote} arg is the normal syntax of \biblatex. +When citing a reference (with \cmd{cite}, \cmd{footcite} or other citation command), the division of source is added in parenthesis in the \opt{postnote} arg. The syntax of the rest of the \opt{postnote} arg is the normal syntax of \biblatex. For example, our \file{.bib} for us texts in this documentation introduction is: @@ -93,22 +93,26 @@ And we called them with : The division of source is put on the \bibfield{titleaddon} field. So you can stylize it with all the tools of biblatex. -\subsection{Limitation} +\section{Revision History} +\begin{changelog} -This package redefines the standard bibmacro \verb+prenote+. If you want to redefine it, ensure to load the \verb+getsourcedivision+ bibmacro: +\begin{release}{2.1.0}{2014-03-17} +\item Compatibiliy with \cs{volcites} commands. +\item Add the source division after \emph{maintitle} when using a multi-volume book. +\item Use \cmd{AtEveryCitekey} instead of patching \verb+prenote+ macro. +\end{release} -\begin{minted}{latex} -\renewbibmacro*{prenote}{% - \usebibmacro{getsourcedivision}% - ... your customisation} -\end{minted} -\section{Revision History} -\begin{changelog} +\begin{release}{2.0.0}{2014-03-15} +\item Use the \emph{xpatch} package to prevent overriding of the \verb+prenote+ macro. +\item Add the source division after \emph{op. cit.} and \emph{ibid.}. +\end{release} + \begin{release}{1.1.0}{2014-01-19} \item Compatibility with \cs{volcite} commands. \end{release} + \begin{release}{1.0.3}{2014-01-16} \item Fixes bug when no postnote arg is used. \end{release} diff --git a/Master/texmf-dist/doc/latex/biblatex-source-division/tabular.pdf b/Master/texmf-dist/doc/latex/biblatex-source-division/tabular.pdf deleted file mode 100644 index 589b963d86e..00000000000 Binary files a/Master/texmf-dist/doc/latex/biblatex-source-division/tabular.pdf and /dev/null differ diff --git a/Master/texmf-dist/tex/latex/biblatex-source-division/biblatex-source-division.sty b/Master/texmf-dist/tex/latex/biblatex-source-division/biblatex-source-division.sty index c120b79bb84..8416ab9c75b 100644 --- a/Master/texmf-dist/tex/latex/biblatex-source-division/biblatex-source-division.sty +++ b/Master/texmf-dist/tex/latex/biblatex-source-division/biblatex-source-division.sty @@ -15,27 +15,24 @@ % This work consists of the file biblatex-source-division.sty \NeedsTeXFormat{LaTeX2e} -\ProvidesPackage{biblatex-source-division}[2014/01/19 v1.1.0 source division for eledpar] - +\ProvidesPackage{biblatex-source-division}[2014/03/17 v2.1.0 source division for biblatex] +\RequirePackage{xpatch} % Prepare in the case of volcite commands \newtoggle{volcite}{} -\apptocmd{\volcitecmd}{\global\toggletrue{volcite}}{}{} - +\apptocmd{\volcitecmd}{\AtNextCite{\toggletrue{volcite}}}{}{} +\apptocmd{\multivolcitecmd}{\AtNextMultiCite{\toggletrue{volcite}}}{}{} % Call the source division getting -\renewbibmacro*{prenote}{% - \usebibmacro{getsourcedivision}% - \iffieldundef{prenote}% - {}% - {\printfield{prenote}% - \setunit{\prenotedelim}}} +\AtEveryCitekey{% + \usebibmacro{getsourcedivision}% +}{}{} % Get source division, put in in titladdon field, and delete source division from the postnote field \newbibmacro{getsourcedivision}{% \iffieldundef{postnote}{}{% \global\undef\volpostnote% \usefield{\getsourcedivision@}{postnote}% - \restorefield{titleaddon}{\titleaddon}% + \iffieldundef{maintitle}{\restorefield{titleaddon}{\titleaddon}}{\restorefield{maintitleaddon}{\titleaddon}}% \restorefield{postnote}{\postnote}% }% } @@ -45,13 +42,13 @@ %% Main command \newrobustcmd*{\getsourcedivision@}[1]{\getsourcedivision@i#1++} -% Are there parenthesis ? +%% Are there parenthesis ? \def\getsourcedivision@i{% \@ifnextchar(%) {\getsourcedivision@ii}% {\getsourcedivision@ii()}} -% Put the source division and "true" postnote in macro +%% Put the source division and "true" postnote in macro \def\getsourcedivision@ii(#1)#2++{% \ifdefmacro{\volpostnote}{% \gdef\titleaddon{#1}% @@ -59,7 +56,6 @@ }{% \iftoggle{volcite}{% \volgetsourcedivision@#2% - \global\togglefalse{volcite}% }% {% \gdef\titleaddon{#1}% @@ -74,5 +70,8 @@ \usefield{\getsourcedivision@}{volpostnote}% } - +% Insert source division in cite:title and cite:ibid (for op. cit. and ibid.) + +\xapptobibmacro{cite:title}{\newunit\printfield{titleaddon}}{}{} +\xapptobibmacro{cite:ibid}{\newunit\printfield{titleaddon}}{}{} \endinput \ No newline at end of file -- cgit v1.2.3