summaryrefslogtreecommitdiff
path: root/macros/latex/contrib/biblatex-contrib/windycity/windycity.cbx
diff options
context:
space:
mode:
Diffstat (limited to 'macros/latex/contrib/biblatex-contrib/windycity/windycity.cbx')
-rw-r--r--macros/latex/contrib/biblatex-contrib/windycity/windycity.cbx146
1 files changed, 89 insertions, 57 deletions
diff --git a/macros/latex/contrib/biblatex-contrib/windycity/windycity.cbx b/macros/latex/contrib/biblatex-contrib/windycity/windycity.cbx
index f6bbabfb26..85d4ad37f2 100644
--- a/macros/latex/contrib/biblatex-contrib/windycity/windycity.cbx
+++ b/macros/latex/contrib/biblatex-contrib/windycity/windycity.cbx
@@ -1,4 +1,4 @@
-% Last modified: Wed 07 Jul 2021 05:45:51 PM CDT
+% Last modified: Tue 09 Nov 2021 07:46:18 PM CST
% Permission is granted to copy, distribute and/or modify this
% software under the terms of the LaTeX Project Public License (LPPL),
@@ -11,7 +11,7 @@
% implied warranties of merchantability and fitness for a particular
% purpose.
-\ProvidesFile{windycity.cbx}[2021/07/07 Windy City citation style for
+\ProvidesFile{windycity.cbx}[2021/11/09 Windy City citation style for
biblatex]
\@ifpackagelater{biblatex}{2019/08/17}
{}
@@ -168,8 +168,17 @@
{\multicitedelim}%
{\usebibmacro{cite:postnote}}%
+\DeclareCiteCommand{\parenauth}[\mkbibparens]
+ {\usebibmacro{prenote}}%
+ {\usebibmacro{citeindex}%
+ \toggletrue{cbx:skipdate}%
+ \usebibmacro{parencite}}%
+ {\multicitedelim}%
+ {\usebibmacro{postnote}}%
+
\DeclareMultiCiteCommand{\idemcites}{\idemcite}{\multicitedelim}%
-\DeclareMultiCiteCommand{\footidemcites}[\mkbibfootnote]{\footidemcite}{\multicitedelim}
+\DeclareMultiCiteCommand{\footidemcites}[\mkbibfootnote]{\footidemcite}{\multicitedelim}%
+\DeclareMultiCiteCommand{\parenauths}[\mkbibparens]{\parenauth}{\multicitedelim}%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% Parenthetical Citations %%
@@ -189,16 +198,18 @@
\usebibmacro{parencite:multicite}}}
\newbibmacro*{parencite:date}{%
- \ifboolexpr{ test {\ifentrytype{online}}
- and test {\iffieldundef{year}}}
- {\newunit
- \usebibmacro{pubstate}{}}%
- {\usebibmacro{parencite:origyear}%
- \iffieldnums{labelyear}
- {}% needs '%'
- {\newunit}%
- \usebibmacro{labeldate+endyear}%
- \printfield{extradate}}}
+ \iftoggle{cbx:skipdate}
+ {}
+ {\ifboolexpr{ test {\ifentrytype{online}}
+ and test {\iffieldundef{year}}}
+ {\newunit
+ \usebibmacro{pubstate}{}}%
+ {\usebibmacro{parencite:origyear}%
+ \iffieldnums{labelyear}
+ {}% needs '%'
+ {\newunit}%
+ \usebibmacro{labeldate+endyear}%
+ \printfield{extradate}}}}
\newbibmacro*{parencite:origyear}{%
\iffieldundef{origyear}
@@ -249,7 +260,7 @@
and test {\ifnameundef{foreword}}
and test {\ifnameundef{introduction}}
and test {\ifnameundef{preface}}}
- {\usebibmacro{author+bookauthor+etc}}%
+ {\usebibmacro{collection+author+etc}}%
{\usebibmacro{supplement}}}}}
%%%%%%%%%%%%%%%%%%%%%%%%%%
@@ -269,6 +280,7 @@
\usebibmacro{savefields}}%
\newbibmacro*{cite:seen}{%
+ \usebibmacro{test:loccit}%
\iffieldundef{shorthand}
{\ifboolexpr{ test \ifciteibid
and togl {short}
@@ -282,12 +294,22 @@
{\printfield{shorthand}%
\usebibmacro{cite:volume}}}}
+\newbibmacro*{test:loccit}{%
+ \ifboolexpr{ togl {ibidpage}
+ and test \ifciteibid
+ and test \ifloccit
+ and not test \iffirstonpage}
+ {\global\toggletrue{ibid:loccit}}%
+ {}}
+
\newbibmacro*{cite:ibid}{%
\iftoggle{ibid}
{\iftoggle{shortlinks}
{\printtext[bibhyperref]{%
- \usebibmacro{cite:ibid+loccit}}}
- {\usebibmacro{cite:ibid+loccit}}}
+ \bibcpstring{ibidem}%
+ \usebibmacro{cite:volume}}}
+ {\bibcpstring{ibidem}%
+ \usebibmacro{cite:volume}}}
{\global\toggletrue{cbx:short}%
\ifentrytype{review}
{\usebibmacro{ibid:review}}%
@@ -296,13 +318,6 @@
\usebibmacro{cite:author+title+etc}}}
{\usebibmacro{cite:author+title+etc}}}}}
-\newbibmacro*{cite:ibid+loccit}{%
- \bibcpstring{ibidem}%
- \ifboolexpr{ togl {ibidpage}
- and test \ifloccit}
- {\global\toggletrue{ibid:loccit}}%
- {\usebibmacro{cite:volume}}}
-
\newbibmacro*{ibid:review}{%
\ifnameundef{author}
{\bibcpstring{reviewnoauth}%
@@ -316,17 +331,14 @@
\iftoggle{noauth}
{\usebibmacro{shorttitle+shortlinks}}%
{}% needs '%'
- \ifboolexpr{ togl {ibidpage}
- and test \ifloccit}
- {\global\toggletrue{ibid:loccit}}%
- {\usebibmacro{cite:volume}}}
+ \usebibmacro{cite:volume}}%
\newbibmacro*{cite:short}{%
\global\toggletrue{cbx:short}%
- \usebibmacro{short:multicite}%
+ \usebibmacro{test:multicite}%
\ifentrytype{review}
{\usebibmacro{short:review}}%
- {\usebibmacro{author+bookauthor+etc}%
+ {\usebibmacro{collection+author+etc}%
\usebibmacro{shorttitle+shortlinks}%
\ifboolexpr{ togl {ibidpage}
and test \ifloccit
@@ -334,7 +346,7 @@
{\global\toggletrue{ibid:loccit}}%
{\usebibmacro{cite:volume}}}}
-\newbibmacro*{short:multicite}{%
+\newbibmacro*{test:multicite}{%
\ifboolexpr{ test {\iffieldequals{namehash}{\bbx@lasthash}}
and togl {multicite}
and togl {short}}
@@ -355,39 +367,31 @@
\setunit{\space}%
\usebibmacro{shorttitle}{book}}%
{\usebibmacro{author+bookauthor+etc}%
- \usebibmacro{shorttitle+shortlinks}}}}
- \usebibmacro{cite:volume}}%
+ \usebibmacro{shorttitle+shortlinks}}}}}
+
+\newbibmacro*{collection+author+etc}{%
+ \ifboolexpr{ test {\ifentrytype{unpublished}}
+ and test {\iffieldundef{title}}
+ and not test {\iffieldundef{collection}}}
+ {\usebibmacro{unpublished:collection}}%
+ {\usebibmacro{author+bookauthor+etc}}}
\newbibmacro*{cite:volume}{%
- \usebibmacro{cite:punctuation}%
- \iftoggle{swapvol}
- {\ifboolexpr{ togl {collection:bk}
- or togl {collection:ib}}
- {\usebibmacro{volume+page}}%
- {}}
- {}}
+ \iftoggle{ibid:loccit}
+ {}
+ {\usebibmacro{cite:punctuation}%
+ \iftoggle{swapvol}
+ {\ifboolexpr{ togl {collection:bk}
+ or togl {collection:ib}}
+ {\usebibmacro{volume+page}}%
+ {}}
+ {}}}
\newbibmacro*{cite:punctuation}{%
\iffieldstart{postnote}{;}
{}
{\newunit}}%
-% Thanks to David Fussner's biblatex-chicago for pointing me to this
-% command by Philipp Lehman. Source:
-% https://groups.google.com/forum/#!topic/comp.text.tex/kG003fkZK1I
-
-\newrobustcmd*{\iffieldstart}[2]{%
- \iffieldundef{#1}
- {\@secondoftwo}% originally '\@gobbletwo'
- {\begingroup
- \edef\@tempa{%
- \long\def\noexpand\iffieldstart@i####1\detokenize{#2}####2}%
- \@tempa\@nil{\endgroup\ifblank{##1}}%
- \savefield*{#1}{\@tempa}%
- \expandafter\iffieldstart@i\detokenize
- \expandafter\expandafter\expandafter{%
- \expandafter\@tempa\detokenize{#2}}\@nil}}%
-
\newbibmacro*{volume+page}{%
\iffieldundef{volume}
{}
@@ -494,9 +498,11 @@
\ifboolexpr{ test {\iffieldundef{postnote}}
and test {\iffieldundef{pages}}
and test {\iffieldundef{url}}}
- {\usebibmacro{doi+url+etc}}%
+ {\usebibmacro{unpublished:note+etc}%
+ \usebibmacro{doi+url+etc}}%
{\usebibmacro{cite:pages}%
\usebibmacro{postnote}%
+ \usebibmacro{unpublished:note+etc}%
\usebibmacro{doi+url+etc}}}
% If the postnote is empty, print the page ranges of journal and
@@ -619,7 +625,33 @@
\DeclareBibliographyDriver{cite:thesis}{%
\usebibmacro{author+title+etc}%
\setunit{\addspace}% not '\setunit{\space}'
- \printtext[parens]{\usebibmacro{inst+loc+date}}%
+ \printtext[parens]{%
+ \usebibmacro{thesis:type+pubstate}%
+ \usebibmacro{inst+loc+date}}%
+ \newunit}%
+
+\DeclareBibliographyDriver{cite:unpublished}{%
+ \iffieldundef{collection}
+ {\usebibmacro{author+title+etc}%
+ \setunit{\addspace}% not '\setunit{\space}'
+ \printtext[parens]{%
+ \iffieldundef{type}
+ {\usebibmacro{pubstate}{}}%
+ {\printfield{type}%
+ \setunit{\addcomma\space}}%
+ \usebibmacro{unpublished:series}%
+ \usebibmacro{inst+loc+date}}}
+ {\usebibmacro{collection+author+etc}%
+ \iffieldundef{title}
+ {}
+ {\usebibmacro{title+titleaddon}{}%
+ \setunit{\addcomma\space}%
+ \iffieldundef{year}
+ {\printlabeldate}% for 'n.d.'
+ {\printdate
+ \global\clearfield{year}}% needs '\global'
+ \newunit
+ \usebibmacro{unpublished:collection}}}% needs '%'
\newunit}%
\endinput