diff options
author | Karl Berry <karl@freefriends.org> | 2016-08-06 22:38:19 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2016-08-06 22:38:19 +0000 |
commit | 4cf7d112766b5888982c9970e69c3763e69456a2 (patch) | |
tree | 38ebefba0a3d6db00d078e8646419eefd2c64f20 /Master/texmf-dist/tex/latex/biblatex-publist | |
parent | 45a0ac228c502cef82657130477f43f25366dbef (diff) |
biblatex-publist (6aug16)
git-svn-id: svn://tug.org/texlive/trunk@41812 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/biblatex-publist')
-rw-r--r-- | Master/texmf-dist/tex/latex/biblatex-publist/publist.bbx | 114 | ||||
-rw-r--r-- | Master/texmf-dist/tex/latex/biblatex-publist/publist.cbx | 4 |
2 files changed, 87 insertions, 31 deletions
diff --git a/Master/texmf-dist/tex/latex/biblatex-publist/publist.bbx b/Master/texmf-dist/tex/latex/biblatex-publist/publist.bbx index 7735af60fc7..2f48be67bfe 100644 --- a/Master/texmf-dist/tex/latex/biblatex-publist/publist.bbx +++ b/Master/texmf-dist/tex/latex/biblatex-publist/publist.bbx @@ -25,8 +25,8 @@ % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -\def\bpl@version{1.2} -\def\bpl@rdate{2016/05/12} +\def\bpl@version{1.3} +\def\bpl@rdate{2016/08/06} \ProvidesFile{publist.bbx}[\bpl@rdate\space v.\bpl@version\space biblatex bibliography style (JSP)] @@ -40,16 +40,54 @@ This is a fatal error. I'm aborting now}% \endinput} -\RequireBibliographyStyle{authoryear} + +% +% Bibliography Options and Base Style +% + +\DeclareBibliographyOption{omitname}{\def\bpl@osurname{#1}} + +\DeclareBibliographyOption{omitfirstname}{\def\bpl@ofirstname{#1}} + +\DeclareBibliographyOption{omitnameprefix}{\def\bpl@ovonpart{#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} +} + +% Check if users have defined different base styles +% If not, use authoryear. +\newif\ifbpl@standardbasestyle\bpl@standardbasestylefalse +\@ifundefined{publistbasestyle}{% + \newcommand*\publistbasestyle{authoryear} + \bpl@standardbasestyletrue}{} + +\RequireBibliographyStyle{\publistbasestyle} \ExecuteBibliographyOptions{% - pagetracker=spread, + pagetracker=true, labelnumber, useprefix=false, - dashed=false, sorting=ydnt, - defernumbers=true, - maxnames=4} + defernumbers=true} + +% Execute these options only with the standard base style +\ifbpl@standardbasestyle + \ExecuteBibliographyOptions{% + maxnames=4, + dashed=false} +\else + % This corresponds to bib option dashed=false + % (dashed option is not defined in every style) + \providebibmacro*{bbx:savehash}{}% + \renewbibmacro*{bbx:savehash}{}% +\fi % @@ -88,27 +126,6 @@ % -% Options -% - -\DeclareBibliographyOption{omitname}{\def\bpl@osurname{#1}} - -\DeclareBibliographyOption{omitfirstname}{\def\bpl@ofirstname{#1}} - -\DeclareBibliographyOption{omitnameprefix}{\def\bpl@ovonpart{#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}}} @@ -127,8 +144,13 @@ \preto\blx@refsection{\global\setbool{newsection}{true}} +% Possibility to manually make the space occupied by the label wider +\newlength\extralabelnumberwidth +\setlength\extralabelnumberwidth{0pt} + \defbibenvironment{bibliography} - {\list + {\addtolength{\labelnumberwidth}{\extralabelnumberwidth}% + \list {\printtext[labelnumberwidth]{% \printfield{labelprefix}% \printfield{labelnumber}}} @@ -160,6 +182,7 @@ \newrobustcmd{\mkbibdesc}[1]{% \number\numexpr\csuse{bbx@itemtotal}+#1\relax} +% Way to manual shift the numbering (undocumented) \newcommand*\decreasebbxnumbering[1]{\csnumgdef{bbx@itemtotal}{\csuse{bbx@itemtotal}-#1}} @@ -438,6 +461,7 @@ }% \fi \savefield{labelyear}{\bbx@lasthash}% + \clearfield{year}% }} \newbibmacro*{rauthor/label}{% @@ -626,4 +650,36 @@ } } +% +% Mappings (biber) +% + +% Correctly sort pubstates. + +\DeclareStyleSourcemap{ + \maps[datatype=bibtex]{ + \map{ + \step[fieldsource=year, final] + \step[fieldset=sortyear, origfieldval] + } + \map{ + \step[fieldsource=pubstate, match=\regexp{forthcoming}, final] + \step[fieldset=sortyear, fieldvalue={2222}] + } + \map{ + \step[fieldsource=pubstate, match=\regexp{inpress}, final] + \step[fieldset=sortyear, fieldvalue={3333}] + } + \map{ + \step[fieldsource=pubstate, match=\regexp{submitted}, final] + \step[fieldset=sortyear, fieldvalue={4444}] + } + \map{ + \step[fieldsource=pubstate, match=\regexp{inpreparation}, final] + \step[fieldset=sortyear, fieldvalue={5555}] + } + } +} + + \endinput diff --git a/Master/texmf-dist/tex/latex/biblatex-publist/publist.cbx b/Master/texmf-dist/tex/latex/biblatex-publist/publist.cbx index b5d8d939ad4..f5ba512492d 100644 --- a/Master/texmf-dist/tex/latex/biblatex-publist/publist.cbx +++ b/Master/texmf-dist/tex/latex/biblatex-publist/publist.cbx @@ -26,8 +26,8 @@ % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -\def\bpl@version{1.2} -\def\bpl@rdate{2016/05/12} +\def\bpl@version{1.3} +\def\bpl@rdate{2016/08/06} \ProvidesFile{publist.cbx}[\bpl@rdate\space v.\bpl@version\space biblatex citation style (JSP)] |