diff options
Diffstat (limited to 'Master/texmf-dist/tex/latex/windycity/windycity.cbx')
-rw-r--r-- | Master/texmf-dist/tex/latex/windycity/windycity.cbx | 119 |
1 files changed, 67 insertions, 52 deletions
diff --git a/Master/texmf-dist/tex/latex/windycity/windycity.cbx b/Master/texmf-dist/tex/latex/windycity/windycity.cbx index 8a43318cf55..d5d0a342b5d 100644 --- a/Master/texmf-dist/tex/latex/windycity/windycity.cbx +++ b/Master/texmf-dist/tex/latex/windycity/windycity.cbx @@ -1,7 +1,5 @@ -% Last modified: Wed 17 Jul 2019 09:44:59 AM CDT +% Last modified: Mon 07 Sep 2020 06:40:45 PM CDT -% Copyright (c) 2019 Brian Michael Chase. -% % Permission is granted to copy, distribute and/or modify this % software under the terms of the LaTeX Project Public License (LPPL), % version 1.3. @@ -13,13 +11,13 @@ % implied warranties of merchantability and fitness for a particular % purpose. -\ProvidesFile{windycity.cbx}[2019/07/17 Windy City citation style for +\ProvidesFile{windycity.cbx}[2020/09/07 Windy City citation style for biblatex] -\@ifpackagelater{biblatex}{2017/11/04} +\@ifpackagelater{biblatex}{2019/08/17} {} {\PackageError{biblatex} {Outdated 'biblatex' package} - {Windy City is for biblatex v3.8 and above.\MessageBreak + {Windy City is for biblatex v3.13 and above.\MessageBreak You are using: '\csuse{ver@biblatex.sty}'.\MessageBreak This is a fatal error. I'm aborting now.}% \endinput}% @@ -48,6 +46,9 @@ \renewcommand{\bibendnotewrapper}[1]{% \bibsentence#1}% +\providetoggle{cite:collection} +\providetoggle{cite:long} + % Protect commas against abbreviation dots and terminal punctuation % marks. Note '\addspace'. Using '\space' there causes problems. @@ -146,8 +147,6 @@ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \newbibmacro*{parencite}{% - \usebibmacro{test:collection}% - \usebibmacro{test:crossref}% \ifboolexpr{ test \ifciteibid and not test \iffirstonpage} {\iffieldundef{postnote} @@ -155,23 +154,17 @@ \usebibmacro{parencite:date}% \usebibmacro{cite:volume}}} {}} - {\printtext[bibhyperref]{% + {\ifboolexpr{ test {\ifentrytype{book}} + or test {\ifentrytype{collection}} + or test {\ifentrytype{incollection}} + or test {\ifentrytype{inbook}} + or test {\ifentrytype{letter}}} + {\usebibmacro{test:crossref}}% + {}% needs '%' + \printtext[bibhyperref]{% \usebibmacro{parencite:long}% \usebibmacro{cite:volume}}}} -% See note for 'crossref+long'. - -\newbibmacro*{test:crossref}{% - \ifboolexpr{ test {\iffieldundef{crossref}} - or test {\iffieldundef{title}}} - {} - {\xifinlist{\thefield{crossref}}{\crossreflist} - {\stepcounter{\thefield{crossref}}} - {\listxadd{\crossreflist}{\thefield{crossref}}% - \ifcsdef{c@\thefield{crossref}} - {\setcounter{\thefield{crossref}}{0}}% - {\newcounter{\thefield{crossref}}}}}} - \newbibmacro*{parencite:date}{% \iffieldundef{labelyear} {} @@ -208,7 +201,12 @@ \renewcommand*{\cbx@deflabel}{labelname}% \clearfield{handle}% \clearfield{nameaddon}% - \usebibmacro{author+bookauthor+etc}}}} + \ifboolexpr{ test {\ifnameundef{afterword}} + and test {\ifnameundef{foreword}} + and test {\ifnameundef{introduction}} + and test {\ifnameundef{preface}}} + {\usebibmacro{author+bookauthor+etc}}% + {\usebibmacro{supplement}}}}} \newbibmacro*{parencite:journal}{% {\ifentrytype{article} @@ -285,8 +283,11 @@ {\usebibmacro{author+bookauthor+etc}% \bibstring{review}}% \space - \renewcommand*{\xtitle}{book}% - \usebibmacro{title+labelyear}% +% \renewcommand*{\xtitle}{book}% +% \usebibmacro{title+labelyear}% + \iffieldundef{shortbooktitle} + {\printfield[title]{booktitle}\isdot}% + {\printfield[title]{shortbooktitle}\isdot}% \usebibmacro{cite:volume}}% \newbibmacro*{cite:volume}{% @@ -311,7 +312,10 @@ \usebibmacro{deflabel}% \iftoggle{firstshort} {\usebibmacro{cite:short}}% - {\usebibmacro{crossref+long}}} + {\printtext{% + \usedriver + {\DeclareNameAlias{sortname}{default}}% + {cite:\thefield{entrytype}}}}} % By default, idemtracker is 'false'. As such, '\ifciteidem' returns % false. With idemtracker set to 'true' (or to some value that implies @@ -328,19 +332,18 @@ % collection with entries containing just 'volume' and 'crossref' % fields. Perhaps justifiable in very rare cases. -\newbibmacro*{crossref+long}{% +\newbibmacro*{test:crossref}{% \ifboolexpr{ test {\iffieldundef{crossref}} or test {\iffieldundef{title}}} - {\usebibmacro{cite:long}}% + {\toggletrue{cite:long}}% {\xifinlist{\thefield{crossref}}{\crossreflist} - {\stepcounter{\thefield{crossref}}% - \usebibmacro{author+title+etc}% - \usebibmacro{crossref}}% - {\listxadd{\crossreflist}{\thefield{crossref}}% + {\toggletrue{cite:collection}% + \stepcounter{\thefield{crossref}}} + {\toggletrue{cite:long}% + \listxadd{\crossreflist}{\thefield{crossref}}% \ifcsdef{c@\thefield{crossref}} {\setcounter{\thefield{crossref}}{0}}% - {\newcounter{\thefield{crossref}}} - \usebibmacro{cite:long}}}} + {\newcounter{\thefield{crossref}}}}}} \newbibmacro*{cite:long}{% \printtext{% @@ -394,13 +397,13 @@ \usebibmacro{postnote}% \usebibmacro{doi+url+etc}}} -% If the postnote is empty, print the page ranges of journal articles. -% See CMOS, 17th ed., 14.153, 14.167, and 14.174. As for incollection -% and inbook entries, 14.106 seems to suggest the same, but the -% example in 14.30 suggests otherwise. The examples in 14.108 only -% muddy the waters further. For magazines, CMOS is clear that the -% range can be left out. To do so, simply omit it from your -% bibliography database. +% If the postnote is empty, print the page ranges of journal and +% review articles. See CMOS, 17th ed., 14.153, 14.167, and 14.174. As +% for incollection and inbook entries, 14.106 seems to suggest the +% same, but the example in 14.30 suggests otherwise. The examples in +% 14.108 don't help. For magazines, CMOS is clear that the range can +% be left out. To do so, simply omit it from your bibliography +% database. \newbibmacro*{cite:pages}{% \iffieldundef{pages} @@ -455,23 +458,35 @@ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \DeclareBibliographyDriver{cite:article}{% - \usebibmacro{author+title+ed+note}% + \usebibmacro{author+title+etc}% \usebibmacro{articles}% \usebibmacro{colon+comma+etc}}% \DeclareBibliographyDriver{cite:book}{% - \usebibmacro{author+collection+etc}% - \newunit - \usebibmacro{volume+page}}% + \usebibmacro{test:crossref}% + \iftoggle{cite:long} + {\usebibmacro{author+collection+etc}% + \newunit + \usebibmacro{volume+page}}% + {\iftoggle{cite:collection} + {\usebibmacro{author+incollection+etc}% + \usebibmacro{crossref}}% + {}}} \DeclareBibliographyDriver{cite:incollection}{% \ifentrytype{letter} {\toggletrue{noauth}}% {}% needs '%' - \usebibmacro{author+title+etc}% - \usebibmacro{incollections}% - \newunit - \usebibmacro{volume+page}}% + \usebibmacro{test:crossref}% + \iftoggle{cite:long} + {\usebibmacro{author+incollection+etc}% + \usebibmacro{incollections}% + \newunit + \usebibmacro{volume+page}}% + {\iftoggle{cite:collection} + {\usebibmacro{author+incollection+etc}% + \usebibmacro{crossref}}% + {}}} \DeclareBibliographyDriver{cite:misc}{% \usebibmacro{author+bookauthor+etc}% @@ -481,14 +496,14 @@ \newunit}% \DeclareBibliographyDriver{cite:online}{% - \usebibmacro{author+title+ed+note}% + \usebibmacro{author+title+etc}% \setunit*{\newunitpunct}% needs '*' \usebibmacro{websites}% \usebibmacro{issue+month+etc}{}% \newunit}% \DeclareBibliographyDriver{cite:patent}{% - \usebibmacro{author+title+ed+note}% + \usebibmacro{author+title+etc}% \newunit \printfield{number}% \newunit}% @@ -511,7 +526,7 @@ \usebibmacro{colon+comma+etc}}% \DeclareBibliographyDriver{cite:thesis}{% - \usebibmacro{author+title+ed+note}% + \usebibmacro{author+title+etc}% \setunit{\addspace}% not '\setunit{\space}' \printtext[parens]{\usebibmacro{inst+loc+date}}% \newunit}% |