diff options
author | Karl Berry <karl@freefriends.org> | 2013-05-27 23:01:50 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2013-05-27 23:01:50 +0000 |
commit | 06b0b0312eaa46e5a87b594eabc4280c9cef86ef (patch) | |
tree | d414804d6c0c7323f32ff9a10b5551915ea27deb /Master/texmf-dist/tex/latex | |
parent | 0b8ab1856673ff7fa3769d3b1a6416374b14c291 (diff) |
oscola
git-svn-id: svn://tug.org/texlive/trunk@30736 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex')
-rw-r--r-- | Master/texmf-dist/tex/latex/oscola/english-oscola.lbx | 5 | ||||
-rw-r--r-- | Master/texmf-dist/tex/latex/oscola/oscola.bbx | 229 | ||||
-rw-r--r-- | Master/texmf-dist/tex/latex/oscola/oscola.cbx | 40 |
3 files changed, 222 insertions, 52 deletions
diff --git a/Master/texmf-dist/tex/latex/oscola/english-oscola.lbx b/Master/texmf-dist/tex/latex/oscola/english-oscola.lbx index b3d57a5aa15..5b746938941 100644 --- a/Master/texmf-dist/tex/latex/oscola/english-oscola.lbx +++ b/Master/texmf-dist/tex/latex/oscola/english-oscola.lbx @@ -3,7 +3,7 @@ % oscola.lbx for copyright and licence information \ProvidesFile{english-oscola.lbx} -[2012/08/16 v 0.1 Biblatex localisation file for OSCOLA citations] +[2013/05/23 v 1.2 Biblatex localisation file for OSCOLA citations] \DeclareRedundantLanguages{english}{english,british,american, canadian,australian,newzealand,UKenglish,USenglish} @@ -103,6 +103,7 @@ canadian,australian,newzealand,UKenglish,USenglish} } \DeclareBibliographyStrings{% +% inherit = {english}, bibliography = {{Bibliography}{Bibliography}}, references = {{References}{References}}, shorthands = {{List of Abbreviations}{Abbreviations}}, @@ -498,7 +499,7 @@ canadian,australian,newzealand,UKenglish,USenglish} opened = {{opened for signature}{opened for signature}}, adopted = {{adopted}{adopted}}, casenote = {{note}{note}}, - firstpublished = {{first published}{first published}}, + firstpublished = {{first published}{first published}}, } \protected\gdef\lbx@us@mkbibrangetrunc@long#1#2{% diff --git a/Master/texmf-dist/tex/latex/oscola/oscola.bbx b/Master/texmf-dist/tex/latex/oscola/oscola.bbx index e4831f6a453..64df915d234 100644 --- a/Master/texmf-dist/tex/latex/oscola/oscola.bbx +++ b/Master/texmf-dist/tex/latex/oscola/oscola.bbx @@ -13,7 +13,7 @@ % This work has the LPPL maintenance status 'maintained'. % The current maintainer of this work is Paul Stanley (pstanley@essexcourt.net) -\ProvidesFile{oscola.bbx}[2012/08/18 v0.1 Biblatex bibliography style for OSCOLA standard] +\ProvidesFile{oscola.bbx}[2013/05/23 v1.2 Biblatex bibliography style for OSCOLA standard] \RequireBibliographyStyle{authortitle} @@ -29,6 +29,11 @@ \ifstrequal{#1}{uc} {\global\toggletrue{bbx@capibid}} {\togglefalse{bbx@capibid}}} + +\newtoggle{bbx@shortindex} + +\DeclareBibliographyOption{shortindex}[true]{% + \settoggle{bbx@shortindex}{#1}} % We ensure that there will always be a trash index \AtEndPreamble{% @@ -85,12 +90,12 @@ \iftoggle{bbx@initsep} {\togglefalse{bbx@initsep}} {\oldbibnamedelimb}} -%\renewcommand\bibnamedelimc{% -% \togglefalse{bbx@initsep}% -% \oldbibnamedelimc} -%\renewcommand\bibnamedelimd{% -% \togglefalse{bbx@initsep}% -% \oldbibnamedelimd} +\renewcommand\bibnamedelimc{% + \togglefalse{bbx@initsep}% + \oldbibnamedelimc} +\renewcommand\bibnamedelimd{% + \togglefalse{bbx@initsep}% + \oldbibnamedelimd} \renewcommand\bibnamedelimi{% \togglefalse{bbx@initsep}% \oldbibnamedelimi} @@ -139,7 +144,7 @@ \DeclareLanguageMapping{english}{english-oscola} % Various aliases -\DeclareBibliographyAlias{inproceedings}{inbook} +\DeclareBibliographyAlias{inproceedings}{book} \DeclareBibliographyAlias{booklet}{book} \DeclareBibliographyAlias{collection}{book} \DeclareBibliographyAlias{incollection}{inbook} @@ -247,7 +252,7 @@ \newcommand*\eudirective{directive} \newcommand*\euregulation{regulation} \newcommand*\eudecision{decision} -\newcommand*\treatysubtype{treaty} +\newcommand*\treatysubtype{piltreaty} \newcommand*\comdocsubtype{comdoc} \newcommand*{\jurisechr}{echr} \providecommand*\eutreaty{eu-treaty} @@ -262,6 +267,7 @@ \newcommand*{\parliamentarytype}{parliamentary} \newcommand*{\houseofcommons}{HC} \newcommand*{\houseoflords}{HL} +\newcommand*\undoctype{undoc} % Some basic redefinitions and formatting \renewcommand\newunitpunct{\addspace} @@ -401,10 +407,13 @@ \DeclareFieldFormat[thesis]{title}{\mkbibquote{#1}} \DeclareFieldFormat[misc]{title}{#1} \DeclareFieldFormat[misc]{journaltitle}{\mkbibquote{#1}} +\DeclareFieldFormat[misc]{pages}{\mkfirstpage*{#1}} +\DeclareFieldFormat[misc]{volume}{#1} \DeclareFieldFormat{casenotetitle}{\mkbibquote{\mkbibemph{#1}}} \DeclareFieldFormat{usseries}{\ifinteger{#1}{\mkusbibordinal{#1}}{#1}} \DeclareFieldFormat[legislation]{title}{#1} \DeclareFieldFormat[legal]{title}{#1} +\DeclareFieldFormat{untitle}{#1} \DeclareListFormat[jurisdiction]{extracites}{% \extracitedelim #1} @@ -438,7 +447,7 @@ \usebibmacro{author/translator+others}% \setunit{\addcomma\space}\newblock \usebibmacro{journaltitle}% - \setunit{\addspace} + \setunit{\addspace}% \printlist{language}% \setunit{\addspace}\newblock \usebibmacro{byauthor}% @@ -450,11 +459,11 @@ \usebibmacro{journal+issuetitle}% \setunit{\addspace}\newblock \usebibmacro{byeditor+others}% - \setunit{\addspace} + \setunit{\addspace}% \usebibmacro{note+pages}% - \setunit{\addspace} + \setunit{\addspace}% \usebibmacro{doi+eprint+url}% - \setunit{\addspace} + \setunit{\addspace}% \usebibmacro{addendum+pubstate}% \setunit{\bibpagerefpunct}% \usebibmacro{pageref}% @@ -577,7 +586,8 @@ {\usebibmacro{legal:parliamentary}} {\iffieldequals{entrysubtype}{\treatysubtype} {\usebibmacro{treatycitation}} - {\usebibmacro{treatycitation}}}} + {\usebibmacro{treatycitation}}}}% + \newunit\newblock \usebibmacro{legislation:note}% \newunit\newblock \setunit{\bibpagerefpunct}% @@ -651,18 +661,23 @@ \DeclareBibliographyDriver{misc}{% \usebibmacro{bibindex}% \usebibmacro{begentry}% - \usebibmacro{author/editor+others/translator+others}% + \iffieldequals{entrysubtype}{\undoctype} + {\usebibmacro{undoc}} + {\usebibmacro{author/editor+others/translator+others}% \setunit*{\addcomma\space}% \usebibmacro{misctitle}% \newunit\newblock \usebibmacro{publicationinfo}% \newunit\newblock - \usebibmacro{doi+eprint+url}% + \usebibmacro{doi+eprint+url}}% \newunit\newblock \setunit{\bibpagerefpunct}\newblock \usebibmacro{pageref}% \usebibmacro{finentry}} +%\DeclareBibliographyDriver{misc:index}{% +% \printfield{indextitle}}% + \DeclareBibliographyDriver{online}{% \usebibmacro{bibindex}% \usebibmacro{begentry}% @@ -1029,6 +1044,21 @@ \global\toggletrue{cbx@postnoteprinted}% \newunit\newblock} +\renewbibmacro*{doi+eprint+url}{% + \iftoggle{bbx:doi} + {\printfield{doi}} + {}% + \newunit\newblock + \iftoggle{bbx:eprint} + {\usebibmacro{eprint}} + {}% + \newunit\newblock + \ifboolexpr{ test {\iftoggle{bbx:url}} + or test {\ifentrytype{online}}} + {\usebibmacro{url+urldate}} + {}} + + \newbibmacro*{echrreports}{% \printfield{journaltitle}% \newunit @@ -1200,8 +1230,10 @@ {\printtext{\mkbibparens{\printfield{userb}}\newunit}}% \printtext{\mkbibparens{\usebibmacro{euparenthetical}}}}% \newunit% - \usebibmacro{eu:reportinfo}% - \newunit% + \iftoggle{bbx@shortindex} + {} + {\usebibmacro{eu:reportinfo}% + \newunit}% \usebibmacro{court-note}% } @@ -1369,10 +1401,10 @@ \newunit \printtext{\mkbibparens{% \iflistundef{location} - {} + {}% {\printlist{location}% \setunit{\addcomma\space}}% - \usebibmacro{date}}}} + \usebibmacro{date}}}\newunit} {\usebibmacro{journaldate}% \newunit \usebibmacro{volume+number+eid}% @@ -1434,13 +1466,19 @@ \restorefield{title}{\bbx@tempa}% \ifkeyword{eu}% {\usebibmacro{eujuriscitation:index}}% + {\iftoggle{bbx@shortindex} + {\printfield{title}% + \setunit{\addspace} + \iffieldundef{year} + {} + {\printtext{\mkbibparens{\printfield{year}}}}} {\ifkeyword{echr}% {\usebibmacro{echrjuriscitation}}% {\ifkeyword{int}% {\usebibmacro{intjuriscitation}}% {\ifkeyword{us} {\usebibmacro{usjuriscitation}} - {\usebibmacro{enjuriscitation}}}}}} + {\usebibmacro{enjuriscitation}}}}}}} \newbibmacro*{jurisdictionpages}{% \iffieldequals{entrysubtype}{\subtypenewsp}% @@ -1588,8 +1626,8 @@ \renewbibmacro{note+pages}{% \printfield{pages}% - \setunit{\addspace} - \printfield{note} + \setunit{\addspace}% + \printfield{note}% \newunit} \newbibmacro{online:title}{% @@ -1856,15 +1894,15 @@ \iffieldundef{series}% {\iffieldundef{number} {}% - {\bbx@pubinfoprint% - \printfield{number}\setunit{\addcomma\space}}}% + {\bbx@pubinfoprint + \printfield{number}}}% {\iffieldundef{series} {} {\bbx@pubinfoprint% - \printfield{series}\setunit{\addcomma\space}% + \printfield{series}}% \iffieldundef{number} {}% - {\printfield{number}\setunit{\addcomma\space}}}}} + {\setunit{\addspace}\printfield{number}}}} \newbibmacro{revisedbookvolume}{% \iffieldundef{volume}% @@ -1878,7 +1916,8 @@ and test {\iflistundef{publisher}} and test {\iflistundef{institution}}}% {}% - {\usebibmacro{rep:institution/publisher}% + {\bbx@pubinfoprint + \usebibmacro{rep:institution/publisher}% \usebibmacro{year}}} \newbibmacro*{seriesareport}{% @@ -1903,13 +1942,15 @@ \newunit\newblock} \renewbibmacro*{shorthandintro}{% - \iffieldundef{shorthandintro} + \bbx@ifnottrackingcites + {} + {\iffieldundef{shorthandintro} {\iffieldundef{shorthand} {} {\bbx@unsetpostnotedelim\setunit{\addspace}% \printtext[parens]{\unspace\printfield{shorthand}}}} {\bbx@unsetpostnotedelim\setunit{\addspace}% - \printtext[parens]{\printfield{shorthandintro}}}} + \printtext[parens]{\printfield{shorthandintro}}}}} \newbibmacro{spaceddate}{% \ifboolexpr{ ( test {\iffieldundef{year}} @@ -1953,6 +1994,50 @@ \usebibmacro{translator+othersstrg}}}% \clearname{translator}} {}} + +\newbibmacro*{undoc}{% + \iffieldundef{title} + {} + {\ifnameundef{author}% + {} + {\usebibmacro{author/editor+others/translator+others}% + \setunit*{\addcomma\space}}% + \printfield[untitle]{title}% + \setunit{\addcomma\space}}% + \printlist{institution}% + \newunit + \printfield{titleaddon}% + \newunit\newblock + \iffieldundef{number} + {\usebibmacro{undoc:year+vol+report}} + {\iffieldundef{year} + {\setunit{\addcomma\space}} + {\printtext{\mkbibparens{\usebibmacro{date}}}% + \newunit}% + \printfield{number}}% + \newunit\newblock + \usebibmacro{doi+eprint+url}% + \newunit\newblock + \usebibmacro{legislation:note}} + +\newbibmacro*{undoc:index}{% + \clearname{author}% + \clearname{editor}% + \usebibmacro{undoc}} + +\newbibmacro*{undoc:year+vol+report}{% + \usebibmacro{journaldate}% + \newunit + \usebibmacro{reportvolume}% + \setunit{\addspace}% + \printfield[default]{journaltitle}% + \setunit*{\addspace}% + \iffieldundef{series} + {} + {\newunit + \printfield{series}% + \setunit{\addspace}}% + \printfield{pages}} \newbibmacro*{unrep:date}{% \ifboolexpr{ test {\iffieldundef{journaltitle}}% @@ -2221,9 +2306,7 @@ \newunit\newblock \usebibmacro{treatyinfo}% \newunit\newblock - \usebibmacro{treaty:year+vol+report}% - \newunit\newblock - \newunit\newblock} + \usebibmacro{treaty:year+vol+report}} \newbibmacro{treaty:year+vol+report}{% \iffieldequals{journaltitle}{\officialjournaltitle} @@ -2238,7 +2321,7 @@ {} {\newunit \printfield{series}% - \setunit{\addspace}} + \setunit{\addspace}}% \printfield{pages}}}% \newbibmacro*{treaty:date}{% @@ -2380,7 +2463,7 @@ \renewcommand\bbx@eudirs{eulegislation} \renewcommand\bbx@eudecs{eulegislation} \renewcommand\bbx@echrtreaty{echrtreaty} -\renewcommand\bbx@piltreaty{treaty} +\renewcommand\bbx@piltreaty{piltreaty} \renewcommand\bbx@otherprimleg{legislation} \renewcommand\bbx@othersecleg{legislation} \renewcommand\bbx@otherconleg{legislation} @@ -2465,8 +2548,7 @@ {}% \ifboolexpr{ test {\ifentrytype{legal}}% and test {\iffieldequals{entrysubtype}{\treatysubtype}} }% - {\ifkeyword{int}{\renewcommand{\bbx@relevantindex}{[\bbx@piltreaty]}}{}% - \ifkeyword{echr}{\renewcommand{\bbx@relevantindex}{[\bbx@echrtreat]}}{}}{}% + {\ifkeyword{echr}{\renewcommand{\bbx@relevantindex}{[\bbx@echrtreaty]}}{\renewcommand{\bbx@relevantindex}{[\bbx@piltreaty]}}}{}% \iffieldequals{entrysubtype}{\parliamentarytype}% {\renewcommand{\bbx@relevantindex}{[\bbx@gbparltmat]}}% {}% @@ -2710,7 +2792,10 @@ \DeclareBibliographyDriver{proceedings:index}{\usebibmacro{default:index}} \DeclareBibliographyDriver{inmvreference:index}{\usebibmacro{default:index}} \DeclareBibliographyDriver{inreference:index}{\usebibmacro{default:index}} -\DeclareBibliographyDriver{misc:index}{\usebibmacro{default:index}} +\DeclareBibliographyDriver{misc:index}{% + \iffieldequals{entrysubtype}{\undoctype} + {\usebibmacro{undoc:index}} + {\usebibmacro{default:index}}} \DeclareBibliographyDriver{booklet:index}{\usebibmacro{default:index}} \DeclareBibliographyDriver{techreport:index}{\usebibmacro{default:index}} \DeclareBibliographyDriver{manual:index}{\usebibmacro{default:index}} @@ -2813,9 +2898,14 @@ \newcommand{\printindexearly}{} \AtEndPreamble{% - \@ifpackageloaded{imakeidx} - {\renewcommand{\printindexearly}[1][\jobname]{% - \@ifundefined{#1@idxfile}{\imki@error{#1}}{\bbx@putimindex{#1}}}} + \@ifpackageloaded{imakeidx}{ + \ifimki@splitindex + \renewcommand{\printindexearly}[1][\jobname]{% + \@ifundefined{#1@idxfile}{\imki@error{#1}}{\bbx@putimindextosplit{#1}}} + \else + \renewcommand{\printindexearly}[1][\jobname]{% + \@ifundefined{#1@idxfile}{\imki@error{#1}}{\bbx@putimindex{#1}}} + \fi} {\@ifpackageloaded{index} {\renewcommand{\printindexearly}{\@printindex}} {\renewcommand{\printindexearly}[1]{\PackageError{biblatex-oscola}{You need to load either the imakeidx or index package:}}}}} @@ -2839,6 +2929,25 @@ \@input@{#1.ind} \let\indexname\imki@indexname } +\newcommand{\bbx@putimindextosplit}[1]{% + \let\imki@indexname\indexname + \@nameuse{imki@set@#1}% + \ifimki@nonewpage\else + \imki@clearpage + \fi + \ifKV@imki@intoc + \def\imki@maybeaddtotoc{\@nameuse{phantomsection}% + \addcontentsline{toc}{\imki@toclevel}{\imki@title}}% + \else + \def\imki@maybeaddtotoc{}% + \fi + \ifx\imki@title\imki@check@indexname\else + \def\indexname{\imki@title}% + \fi + \@input@{\jobname-#1.ind} + \let\indexname\imki@indexname +} + %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % @@ -2846,6 +2955,11 @@ % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +\DeclareLabeltitle[misc]{% + \field{shorttitle} + \field{titleaddon} + \field{title}} + \DeclareSourcemap{ \maps[datatype=bibtex]{ \map[overwrite=false]{ @@ -3127,6 +3241,37 @@ \step[fieldsource=tabulate, fieldtarget=usera] } -}} + \map[overwrite=false]{ + \pertype{misc} + \step[fieldsource=entrysubtype, + match={undoc}, + final=true] + \step[fieldsource=instrument_no, + fieldtarget=titleaddon, + origfieldval=true] + \step[fieldsource=doc_no, + fieldtarget=number, + origfieldval=true] + } + \map[overwrite]{ + \pertype{misc} + \step[fieldsource=institution, + fieldset=scratch, + origfieldval=true, + append=true] + \step[fieldsource=titleaddon, + fieldset=scratch, + origfieldval=true, + append=true] + } + \map[overwrite=false]{ + \pertype{misc} + \step[fieldsource=scratch] + \step[fieldsource=title] + \step[fieldset=indextitle, + origfieldval=true] + } + } +} \endinput
\ No newline at end of file diff --git a/Master/texmf-dist/tex/latex/oscola/oscola.cbx b/Master/texmf-dist/tex/latex/oscola/oscola.cbx index 72716b765c5..7125ff94ea4 100644 --- a/Master/texmf-dist/tex/latex/oscola/oscola.cbx +++ b/Master/texmf-dist/tex/latex/oscola/oscola.cbx @@ -2,10 +2,15 @@ % Part of the OSCOLA package for biblatex: see the file % oscola.lbx for copyright and licence information -\ProvidesFile{oscola.cbx}[2012/08/16 v0.1 Biblatex citation style for OSCOLA standard] +\ProvidesFile{oscola.cbx}[2013/05/23 v1.2 Biblatex citation style for OSCOLA standard] \RequireCitationStyle{verbose-inote} +\newcommand{\bbx@ifnottrackingcites}{% + \ifx\blx@imc@ifciteseen\@secondoftwo + \expandafter\@firstoftwo\else + \expandafter\@secondoftwo\fi} + \newcounter{bbx@lastcitedc} \newtoggle{bbx@samefootnote} @@ -32,8 +37,9 @@ \renewbibmacro*{cite}{% \usebibmacro{cite:citepages}% \global\togglefalse{cbx:loccit}% - \ifciteseen - {\iffieldundef{shorthand} + \ifboolexpr {test {\ifciteseen} or test {\ifciteibid}} + {\ifboolexpr {test {\iffieldundef{shorthand}} + or test {\bbx@ifnottrackingcites}} {\ifboolexpr{ test {\ifciteibid} and @@ -46,6 +52,19 @@ {\usebibmacro{cite:shorthand}}} {\usebibmacro{cite:full}}} +\renewbibmacro*{footcite}{% + \usebibmacro{cite:citepages}% + \global\togglefalse{cbx:loccit}% + \ifboolexpr {test {\ifciteseen} or test {\ifciteibid}} + {\ifboolexpr {test {\iffieldundef{shorthand}} + or test {\bbx@ifnottrackingcites}} + {\ifthenelse{\ifciteibid\AND\NOT\iffirstonpage} + {\usebibmacro{footcite:ibid}} + {\usebibmacro{footcite:note}}}% + {\usebibmacro{footcite:shorthand}}} + {\usebibmacro{footcite:full}% + \usebibmacro{footcite:save}}} + \renewbibmacro*{citeindex}{% \ifboolexpr{ test{\ifciteindex} and test{\iftoggle{cbx@weareindexing}}} @@ -57,7 +76,9 @@ \newcommand{\DNI}{\togglefalse{cbx@weareindexing}} \newbibmacro*{footcite:note:old}{% - \ifboolexpr{ test {\ifentrytype{misc}} or test {\ifentrytype{legal}} } + \ifboolexpr{ test {\ifentrytype{misc}} + or test {\ifentrytype{legal}} + or test {\ifentrytype{jurisdiction}}} {\printfield[title]{labeltitle}\setunit*{\addspace}} {\ifnameundef{labelname}% {\printfield{label}}% @@ -87,6 +108,7 @@ \setunit*{\nametitledelim}% \printtext[bibhyperlink]{% \printfield[citetitle]{labeltitle}}} + \newbibmacro*{cite:miscshort}{% \iffieldundef{shorttitle} @@ -238,7 +260,7 @@ {\usebibmacro{cite:shortleg}} {\ifboolexpr{( test {\ifentrytype{commentary}} - or (test {\ifentrytype{legal}} and not test {\iffieldequals{entrysubtype}{\treatysubtype}} ) + or (test {\ifentrytype{legal}} and not test {\iffieldequals{entrysubtype}{\treatysubtype}} ) or (test {\ifentrytype{jurisdiction}} and (not test {\iffieldundef{userc}}) and (not test {\iffieldundef{postnote}})))}% @@ -248,11 +270,12 @@ {\usebibmacro{cite:oldshort}}}}} \renewbibmacro*{footcite:note}{% - \ifboolexpr{test {\ifentrytype{legislation}} + \ifboolexpr{test {\ifentrytype{legislation}} or ( test {\ifentrytype{legal}} - and not test {\iffieldequals{entrysubtype}{\treatysubtype}} )}% + and ( not test {\iffieldequals{entrysubtype}{\treatysubtype}} ))}% {\usebibmacro{cite:short}}% - {\ifentrytype{commentary}% + {\ifboolexpr{ test {\ifentrytype{commentary}} + or ( test {\ifentrytype{legal}} and not test {\iffieldequals{entrysubtype}{\treatysubtype}}) }% {\usebibmacro{footcite:full}}% {\ifboolexpr{ ( test {\ifentrytype{jurisdiction}} and @@ -387,4 +410,5 @@ {\printfield{shorthand}}}% {\printfield{title}}} + \endinput
\ No newline at end of file |