diff options
author | Karl Berry <karl@freefriends.org> | 2017-11-18 21:46:27 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2017-11-18 21:46:27 +0000 |
commit | 20660a493139f7da8061a165133f5ff2bc3da266 (patch) | |
tree | ab1f8b963c366fcb439dee750c167c4f5ac6dca2 /Master/texmf-dist/tex/latex/biblatex-oxref/oxref.bbx | |
parent | ba6f6ac5705667b8a0d7d3ddcb50a275d06278a1 (diff) |
biblatex-oxref (18nov17)
git-svn-id: svn://tug.org/texlive/trunk@45847 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/biblatex-oxref/oxref.bbx')
-rw-r--r-- | Master/texmf-dist/tex/latex/biblatex-oxref/oxref.bbx | 160 |
1 files changed, 126 insertions, 34 deletions
diff --git a/Master/texmf-dist/tex/latex/biblatex-oxref/oxref.bbx b/Master/texmf-dist/tex/latex/biblatex-oxref/oxref.bbx index ae5b9e4521b..7846ef62050 100644 --- a/Master/texmf-dist/tex/latex/biblatex-oxref/oxref.bbx +++ b/Master/texmf-dist/tex/latex/biblatex-oxref/oxref.bbx @@ -13,16 +13,14 @@ %% See: http://www.latex-project.org/lppl.txt %% ---------------------------------------------------------------- %% -\def\Version{2017/05/14 v0.10} +\def\Version{2017/11/18 v0.11} \NeedsTeXFormat{LaTeX2e}[1999/12/01] \ProvidesFile{oxref.bbx} [\Version\space Base settings for bibliography styles inspired by the Oxford Guide to Style] \RequirePackage{xpatch} \RequirePackage{xstring} \RequirePackage{graphicx} -\DeclareLanguageMapping{english}{british-oxref} -\DeclareLanguageMapping{british}{british-oxref} -\DeclareLanguageMapping{american}{american-oxref} +\DeclareLanguageMappingSuffix{-oxref} \NewBibliographyString{% director, performer, reader, conductor, bydirector, byperformer, byreader, byconductor, byserieseditor, @@ -30,8 +28,12 @@ inpressin, book, books, canto, cantos, stanza, stanzas, act, acts, scene, scenes, folio, folios, article, articles, clause, clauses, regulation, regulations, rule, rules, + booktotal, booktotals, cantototal, cantototals, stanzatotal, stanzatotals, + acttotal, acttotals, scenetotal, scenetotals, foliototal, foliototals, + articletotal, articletotals, clausetotal, clausetotals, regulationtotal, + regulationtotals, ruletotal, ruletotals, facebook, tweet, podcast, clip, webcast, poster, - nolocation, recorded, uploaded, + nolocation, modified, recorded, uploaded, anon, pseudo, urldown, 1column, 2column, inflayer, suplayer, paper, papyrus, pergament, eucase, eujoinedcases, commissiondecision, application, @@ -44,10 +46,13 @@ \renewcommand*{\subtitlepunct}{\addcolon\space} \renewcommand*{\intitlepunct}{\nopunct\space} \renewcommand*{\bibnamedash}{\resizebox{2em}{\height}{\textemdash}\addthinspace} -\renewcommand*{\revsdnamedelim}{\addcomma} \newcommand*{\recordseriespunct}{\addcomma\space} \newcommand*{\relatedtypepunct}{\addsemicolon\space} \renewcommand*{\relateddelim}{\addsemicolon\space} +\DeclareDelimFormat{revsdnamedelim}{\addcomma} +\DeclareDelimFormat{authortypedelim}{\addspace} +\DeclareDelimFormat{editortypedelim}{\addspace} +\DeclareDelimFormat{translatortypedelim}{\addspace} \DeclareNameAlias{bookauthor}{default} \DeclareNameAlias{bookeditor}{default} \newtoggle{blx@ox@scnames} @@ -83,20 +88,28 @@ \ifprefchar{}{\bibnamedelimc}}% \mkbibnamefamily{#1}\isdot \ifdefvoid{#4}{}{\ifnumeral{#4}{}{\addcomma}\bibnamedelimd\mkbibnamesuffix{#4}\isdot}% - \ifdefvoid{#5}{}{\ifgiveninits{}{\mkbibnametitle{#5}\isdot\bibnamedelimd}}% - \ifdefvoid{#2}{}{\revsdnamepunct\bibnamedelimd\mkbibnamegiven{#2}\isdot}% + \ifboolexpe{% + (test {\ifdefvoid{#5}} or not togl {blx@ox@nametitle}) + and + test {\ifdefvoid{#2}}% + }{}{% + \revsdnamepunct}% + \ifdefvoid{#5}{}{\iftoggle{blx@ox@nametitle}{\bibnamedelimd\mkbibnametitle{#5}\isdot}{}}% + \ifdefvoid{#2}{}{\bibnamedelimd\mkbibnamegiven{#2}\isdot}% }{% \usebibmacro{name:delim}{#1}% \usebibmacro{name:hook}{#1}% \mkbibnamefamily{#1}\isdot \ifdefvoid{#4}{}{\bibnamedelimd\mkbibnamesuffix{#4}\isdot}% \ifboolexpe{% + (test {\ifdefvoid{#5}} or not togl {blx@ox@nametitle}) + and test {\ifdefvoid{#2}} and test {\ifdefvoid{#3}}% }{}{% \revsdnamepunct}% - \ifdefvoid{#5}{}{\iftoggle{blx@ox@nametitle}{\mkbibnametitle{#5}\isdot\bibnamedelimd}{}}% + \ifdefvoid{#5}{}{\iftoggle{blx@ox@nametitle}{\bibnamedelimd\mkbibnametitle{#5}\isdot}{}}% \ifdefvoid{#2}{}{\bibnamedelimd\mkbibnamegiven{#2}\isdot}% \ifdefvoid{#3}{}{\bibnamedelimd\mkbibnameprefix{#3}\isdot}}} \def\blx@ox@lasthash{} @@ -302,7 +315,7 @@ \ifnumgreater{\c@minnames}{1}{% \finalandcomma }{}% - \andothersdelim\bibstring{andothers}% + \printdelim{andothersdelim}\bibstring{andothers}% }{}% \restorebibmacro{name:andothers}% } @@ -434,7 +447,7 @@ {} {\setunit{\addspace}% \printfield{nameaddon}}% - \setunit{\addspace}}% + \setunit{\printdelim{authortypedelim}}}% \iffieldundef{authortype} {} {\usebibmacro{authorstrg}% @@ -454,7 +467,7 @@ {\usebibmacro{bbx:dashcheck} {\bibnamedash} {\usebibmacro{editor+alteditor}% - \setunit{\addspace}% + \setunit{\printdelim{editortypedelim}}% \usebibmacro{bbx:savehash}}% \usebibmacro{#1}% \clearname{editor}} @@ -473,7 +486,7 @@ {\usebibmacro{bbx:dashcheck} {\bibnamedash} {\printnames{translator}% - \setunit{\addspace}% + \setunit{\printdelim{translatortypedelim}}% \usebibmacro{bbx:savehash}}% \usebibmacro{#1}% \clearname{translator}% @@ -563,6 +576,20 @@ \StrGobbleLeft{0\num@two}{\Result}}% {\num@two}% } +\patchcmd{\mkdaterangefull}{% + \csuse{mkbibdate#1}{#2endyear}{#2endmonth}{#2endday}% +}{% + \iffieldundef{#2endmonth}% + {\blx@ox@compyear{\thefield{#2year}}{\thefield{#2endyear}}}% + {\csuse{mkbibdate#1}{#2endyear}{#2endmonth}{#2endday}}% +}{}{} +\patchcmd{\mkdaterangefullextra}{% + \csuse{mkbibdate#1}{#2endyear}{#2endmonth}{#2endday}% +}{% + \iffieldundef{#2endmonth}% + {\blx@ox@compyear{\thefield{#2year}}{\thefield{#2endyear}}}% + {\csuse{mkbibdate#1}{#2endyear}{#2endmonth}{#2endday}}% +}{}{} \patchcmd{\mkdaterangetrunc}{% \csuse{mkbibdate#1}{#2endyear}{#2endmonth}{#2endday}% }{% @@ -589,6 +616,8 @@ \ifboolexpr{ test {\iffieldundef{year}} and + test {\iffieldundef{season}} + and test {\iffieldundef{month}} and test {\iffieldundef{hour}} @@ -607,20 +636,17 @@ \DeclareFieldFormat{origdatetype}{% \ifbibstring{#1}{\bibstring{#1}}{#1\isdot}% } -\newbibmacro*{origdate+time}[1][]{% +\newbibmacro*{origdate+time}{% \ifboolexpr{ test {\iffieldundef{origyear}} and + test {\iffieldundef{origseason}} + and test {\iffieldundef{origmonth}} and test {\iffieldundef{orighour}} }{}{% - \ifstrempty{#1}{% - \printfield{origdatetype}% - }{% - \iffieldundef{origdatetype}% - {\bibstring{#1}}% - {\printfield{origdatetype}}}}% + \printfield{origdatetype}}% \setunit*{\addspace}% \iftoggle{blx@ox@timefirst}{% \printorigtime @@ -856,6 +882,8 @@ and test {\iffieldundef{year}} and + test {\iffieldundef{season}} + and test {\iffieldundef{month}} }{}{% \ifboolexpr{ @@ -1078,6 +1106,8 @@ reference,mvreference,inreference]{volume}{% and test {\iffieldundef{year}} and + test {\iffieldundef{season}} + and test {\iffieldundef{month}} }{}{% \nopunct @@ -1102,6 +1132,8 @@ reference,mvreference,inreference]{volume}{% and test {\iffieldundef{year}} and + test {\iffieldundef{season}} + and test {\iffieldundef{month}} }{}{% \nopunct @@ -1727,6 +1759,8 @@ reference,mvreference,inreference]{volume}{% and test {\iffieldundef{year}} and + test {\iffieldundef{season}} + and test {\iffieldundef{month}} }{}{% \nopunct @@ -1761,6 +1795,8 @@ reference,mvreference,inreference]{volume}{% and test {\iffieldundef{year}} and + test {\iffieldundef{season}} + and test {\iffieldundef{month}} }{}{% \nopunct @@ -1797,6 +1833,8 @@ reference,mvreference,inreference]{volume}{% and test {\iffieldundef{year}} and + test {\iffieldundef{season}} + and test {\iffieldundef{month}} }{}{% \nopunct @@ -1913,7 +1951,7 @@ reference,mvreference,inreference]{volume}{% \newbibmacro*{publisher+type+series+number+date}{% \iffieldundef{number}{}{% \setunit{\addcomma\space}% - \usebibmacro{origdate+time}[recorded]% + \usebibmacro{origdate+time}% }% \ifboolexpr{% test {\iflistundef{origpublisher}} @@ -1930,10 +1968,14 @@ reference,mvreference,inreference]{volume}{% and test {\iffieldundef{year}} and + test {\iffieldundef{season}} + and test {\iffieldundef{month}} and test {\iffieldundef{eventyear}} and + test {\iffieldundef{eventseason}} + and test {\iffieldundef{eventmonth}} and test {\iffieldundef{hour}} @@ -1959,7 +2001,7 @@ reference,mvreference,inreference]{volume}{% \printfield{number}% \iffieldundef{number}{% \setunit{\addcomma\space}% - \usebibmacro{origdate+time}[recorded]% + \usebibmacro{origdate+time}% }{}% \setunit{\addcomma\space}% \usebibmacro{date+time}}}} @@ -3143,8 +3185,7 @@ reference,mvreference,inreference]{volume}{% \newcommand{\columnslayerpunct}{\addsemicolon\addspace}% \def\recto{r} \def\verso{v} -\NumCheckSetup{\def\recto{r}\def\verso{v}} -\DeclareNumChars*{rv} +\NumCheckSetup{\def\recto{}\def\verso{}} \DeclareFieldFormat[manuscript,unpublished]{title}{% \def\currentfield{title}% \iffieldannotation{descriptor}{#1}{\mkbibquote{#1\isdot}}% @@ -3403,8 +3444,8 @@ reference,mvreference,inreference]{volume}{% }{}}% \renewbibmacro*{related:init}{}% \DeclareNameAlias{sortname}{default}% - \ifbibmacroundef{date+extrayear}{}{% - \renewbibmacro*{date+extrayear}{}% + \ifbibmacroundef{date+extradate}{}{% + \renewbibmacro*{date+extradate}{}% \renewbibmacro*{date}{\printdate}}% \renewbibmacro*{pageref}{}% }{% @@ -3490,7 +3531,7 @@ reference,mvreference,inreference]{volume}{% \usebibmacro{finentry}} \DeclareFieldFormat{related:multivolume}{#1} -\newbibmacro*{related:multivolume}[1]{% +\renewbibmacro*{related:multivolume}[1]{% \entrydata*{#1}{% \printtext{% \printfield{volume}% @@ -3518,7 +3559,7 @@ reference,mvreference,inreference]{volume}{% \printfield{volumes}% \newunit \usebibmacro{series+number+publisher+location+date}}} -\newbibmacro*{related:bytranslator}[1]{% +\renewbibmacro*{related:bytranslator}[1]{% \entrydata{#1}{% \renewbibmacro*{name:hook}[1]{% \ifnumequal{\value{listcount}}{1} @@ -3542,8 +3583,8 @@ reference,mvreference,inreference]{volume}{% \ifnumequal{\value{blx@ox@relitem}}{\value{bbx:relatedtotal}}% {\bibstring{and}\addspace}{}% \entrydata{#1}{% - \ifbibmacroundef{date+extrayear}{}{% - \renewbibmacro*{date+extrayear}{}}% + \ifbibmacroundef{date+extradate}{}{% + \renewbibmacro*{date+extradate}{}}% \usebibmacro{author}% \setunit{\printdelim{nametitledelim}}\newblock \usebibmacro{title}}} @@ -3570,9 +3611,9 @@ reference,mvreference,inreference]{volume}{% {}}% \renewbibmacro*{related:init}{}% \DeclareNameAlias{sortname}{default}% - \ifbibmacroundef{date+extrayear} + \ifbibmacroundef{date+extradate} {} - {\renewbibmacro*{date+extrayear}{}% + {\renewbibmacro*{date+extradate}{}% \renewbibmacro*{date}{\printdate}}% \renewbibmacro*{pageref}{}} {\thefield{entrytype}}% @@ -3652,6 +3693,17 @@ reference,mvreference,inreference]{volume}{% fieldvalue={=translator}] } \map[overwrite=false]{ + \pertype{audio} + \pertype{music} + \pertype{movie} + \pertype{video} + \pertype{inaudio} + \pertype{inmusic} + \pertype{inmovie} + \pertype{invideo} + \step[fieldset=origdatetype,fieldvalue={recorded}] + } + \map[overwrite=false]{ \pertype{jurisdiction} \step[fieldsource=reporter, fieldtarget=journaltitle] @@ -3797,7 +3849,7 @@ reference,mvreference,inreference]{volume}{% } }% } -\DeclareSortingScheme{nty}{ +\DeclareSortingTemplate{nty}{ \sort{ \field{presort} } @@ -3834,10 +3886,50 @@ reference,mvreference,inreference]{volume}{% } } -\DeclareSortingScheme{nyt}{ +\DeclareSortingTemplate{nyt}{ + \sort{ + \field{presort} + } + \sort[final]{ + \field{sortkey} + } + \sort{ + \field{sortname} + \field{author} + \field{editor} + \field{translator} + \field{sorttitle} + \field{title} + \field{library} + } + \sort{ + \field{sortyear} + \field{year} + } + \sort{ + \field{sorttitle} + \field{title} + } + \sort{ + \field{volume} + \literal{0} + } + \sort{ + \field{location} + } + \sort{ + \field{collection} + \field{series} + } +} + +\DeclareSortingTemplate{anyt}{ \sort{ \field{presort} } + \sort{ + \field{labelalpha} + } \sort[final]{ \field{sortkey} } |