From ca6d1ceb71368bca13dc008c6693b695be209e62 Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Wed, 14 Sep 2016 22:25:04 +0000 Subject: biblatex-opcit-booktitle git-svn-id: svn://tug.org/texlive/trunk@42071 c570f23f-e606-0410-a88d-b1316a301751 --- .../biblatex-opcit-booktitle.sty | 36 ++++++++++++++-------- 1 file changed, 24 insertions(+), 12 deletions(-) (limited to 'Master/texmf-dist/tex/latex/biblatex-opcit-booktitle/biblatex-opcit-booktitle.sty') diff --git a/Master/texmf-dist/tex/latex/biblatex-opcit-booktitle/biblatex-opcit-booktitle.sty b/Master/texmf-dist/tex/latex/biblatex-opcit-booktitle/biblatex-opcit-booktitle.sty index 02a6d52a006..8f8994b1d61 100644 --- a/Master/texmf-dist/tex/latex/biblatex-opcit-booktitle/biblatex-opcit-booktitle.sty +++ b/Master/texmf-dist/tex/latex/biblatex-opcit-booktitle/biblatex-opcit-booktitle.sty @@ -15,9 +15,16 @@ % % The Current Maintainer of this work is Maïeul Rouquette \NeedsTeXFormat{LaTeX2e} -\ProvidesPackage{biblatex-opcit-booktitle}[2016/06/12 v1.5.0a Manage op. cit. when using subentry] +\ProvidesPackage{biblatex-opcit-booktitle}[2016/09/08 v1.6.0 Manage op. cit. when using subentry] \RequirePackage{xpatch} +% Declaration of the entry concerned. Some package could have already add their own entry +\listadd\opcit@booktitle@entrytypes{inbook} +\listadd\opcit@booktitle@entrytypes{incollection} +\listadd\opcit@booktitle@entrytypes{inproceedings} +\listadd\opcit@booktitle@entrytypes{bookinbook} + + \DeclareFieldFormat{bibhypertarget:crossref}{% \bibhypertarget{\iffootnote{f}{t}:\cbx@resetcount:\thefield{crossref}}{#1}} @@ -67,10 +74,7 @@ \newbibmacro*{cite:test:ifrelated}% {\ifboolexpr {% test {\iffieldundef{crossref}}% - or not (test {\ifentrytype{inbook}}% - or test {\ifentrytype{incollection}}% - or test {\ifentrytype{inproceedings}}% - or test {\ifentrytype{bookinbook}})}% + or not (test {\xifinlist{\thefield{entrytype}}{\opcit@booktitle@entrytypes}})}% {\usebibmacro{cite:full}% \usebibmacro{cite:save}}% {\ifrelatedunseen% @@ -83,10 +87,7 @@ \newbibmacro*{cite:test:ifrelated:verbose-trad3}% {\ifboolexpr {% test {\iffieldundef{crossref}}% - or not (test {\ifentrytype{inbook}}% - or test {\ifentrytype{incollection}}% - or test {\ifentrytype{inproceedings}}% - or test {\ifentrytype{bookinbook}})}% + or not (test {\xifinlist{\thefield{entrytype}}{\opcit@booktitle@entrytypes}})}% {\usebibmacro{cite:full}% }% {\ifrelatedunseen% @@ -132,7 +133,8 @@ \newunit\newblock \usebibmacro{in:}% \printtext[bibhyperlink:crossref]{% - \usebibmacro{maintitle+booktitle}% + \usebibmacro{inbook:rel:bookauthor}% + \usebibmacro{maintitle+booktitle}% \newunit\newblock \usebibmacro{byeditor+others}% \newunit% @@ -172,7 +174,8 @@ \newunit\newblock \usebibmacro{in:}% \printtext[bibhyperlink:crossref]{% - \usebibmacro{maintitle+booktitle}% + \usebibmacro{inbook:rel:bookauthor}% + \usebibmacro{maintitle+booktitle}% \newunit\newblock \usebibmacro{byeditor+others}% \newunit% @@ -209,7 +212,8 @@ \newunit\newblock \usebibmacro{in:}% \printtext[bibhyperlink:crossref]{% - \usebibmacro{maintitle+booktitle}% + \usebibmacro{inbook:rel:bookauthor}% + \usebibmacro{maintitle+booktitle}% \newunit\newblock \usebibmacro{byeditor+others}% \newunit% @@ -230,4 +234,12 @@ {}% \usebibmacro{finentry}} +\newbibmacro{inbook:rel:bookauthor}{% + \ifnameundef{bookauthor}% + {} + {% + \usebibmacro{bybookauthor}% + \setunit{\labelnamepunct}\newblock% + }% +} \endinput -- cgit v1.2.3