diff options
author | Karl Berry <karl@freefriends.org> | 2014-03-17 22:50:07 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2014-03-17 22:50:07 +0000 |
commit | 3e80c1e9b536ecb91cb18e7b6e4fa5930803d4f6 (patch) | |
tree | 27059f46f45bce057c8bce8e83e7450dde2ed966 /Master/texmf-dist/tex/latex/biblatex-source-division | |
parent | 1e901c8d573ed731cce910bb4e051cb11c58fc3c (diff) |
biblatex-source-division (17mar14)
git-svn-id: svn://tug.org/texlive/trunk@33206 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/biblatex-source-division')
-rw-r--r-- | Master/texmf-dist/tex/latex/biblatex-source-division/biblatex-source-division.sty | 29 |
1 files changed, 14 insertions, 15 deletions
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 <x>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 |