summaryrefslogtreecommitdiff
path: root/macros/xetex/latex/langsci/langsci-unified.cbx
diff options
context:
space:
mode:
authorNorbert Preining <norbert@preining.info>2021-03-18 03:01:43 +0000
committerNorbert Preining <norbert@preining.info>2021-03-18 03:01:43 +0000
commitca17f652236af2ce3a16cb0125fb6e190d59cc17 (patch)
tree1664d8d4a3ba38eacabed5fe0e3d4ff7f2dd966c /macros/xetex/latex/langsci/langsci-unified.cbx
parentbb51b61cfc3fcb367f52d31948039a1468fbcf80 (diff)
CTAN sync 202103180301
Diffstat (limited to 'macros/xetex/latex/langsci/langsci-unified.cbx')
-rw-r--r--macros/xetex/latex/langsci/langsci-unified.cbx108
1 files changed, 60 insertions, 48 deletions
diff --git a/macros/xetex/latex/langsci/langsci-unified.cbx b/macros/xetex/latex/langsci/langsci-unified.cbx
index d944237795..2d569fc575 100644
--- a/macros/xetex/latex/langsci/langsci-unified.cbx
+++ b/macros/xetex/latex/langsci/langsci-unified.cbx
@@ -1,8 +1,8 @@
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% File: langscibook.cls
-%% Author: Language Science Press (http://langsci-press.org)
-%% Date: 2020-03-17 13:12 UTC
-%% Purpose: An implementation of the Unified Style Sheet for Linguistics bibliographies (https://www.linguisticsociety.org/resource/unified-style-sheet).
-%% This work is based on the styles provided by Semantics \& Pragmatics
+%% Author: Language Science Press (http://langsci-press.org)
+%% Date: 2019-03-06 13:12 UTC
+%% Purpose: An implementation of the Unified Style Sheet for Linguistics bibliographies (https://www.linguisticsociety.org/resource/unified-style-sheet).
+%% This work is based on the styles provided by Semantics \& Pragmatics
%% Language: LaTeX
%% Copyright 2017- Language Science Press
%% Licence: This work may be distributed and/or modified under the
@@ -16,7 +16,7 @@
%%% The Current Maintainer of this work is Sebastian Nordhoff.
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\ProvidesFile{sp-authoryear-comp.cbx}
+\ProvidesFile{langsci-unified.cbx}
% For backward compatibility: choose labeldate or labeldateparts depending on the biblatex version
\@ifpackagelater{biblatex}{2016/09/09}
@@ -52,9 +52,9 @@
\ifthenelse{\iffieldequals{labelyear}{\cbx@lastyear}\AND
\(\value{multicitecount}=0\OR\iffieldundef{postnote}\)}
{\setunit{\addcomma}%
- \usebibmacro{cite:extrayear}}
+ \usebibmacro{cite:extradate}}
{\setunit{\compcitedelim}%
- \usebibmacro{cite:labelyear+extrayear}%
+ \usebibmacro{cite:labelyear+extradate}%
\savefield{labelyear}{\cbx@lastyear}}}
\newbibmacro*{cite}{% Based on cite bib macro from authoryear-comp.cbx
@@ -64,7 +64,7 @@
\DeclareFieldAlias{bibhyperref}{default}% Prevent nested hyperlinks
\usebibmacro{cite:label}%
\setunit{\addspace}%
- \usebibmacro{cite:labelyear+extrayear}}%
+ \usebibmacro{cite:labelyear+extradate}}%
\usebibmacro{cite:reinit}}
{\iffieldequals{namehash}{\cbx@lasthash}
{\usebibmacro{labelyearrepeat}}
@@ -72,7 +72,7 @@
\DeclareFieldAlias{bibhyperref}{default}% Prevent nested hyperlinks
\printnames{labelname}%
\setunit{\nameyeardelim}%
- \usebibmacro{cite:labelyear+extrayear}}%
+ \usebibmacro{cite:labelyear+extradate}}%
\savefield{namehash}{\cbx@lasthash}%
\savefield{labelyear}{\cbx@lastyear}}}}
{\usebibmacro{cite:shorthand}%
@@ -86,7 +86,7 @@
\usebibmacro{cite:reinit}}
{\iffieldequals{namehash}{\cbx@lasthash}
{\usebibmacro{labelyearrepeat}}
- {\usebibmacro{cite:labelyear+extrayear}%
+ {\usebibmacro{cite:labelyear+extradate}%
\savefield{namehash}{\cbx@lasthash}%
\savefield{labelyear}{\cbx@lastyear}}}}
{\usebibmacro{cite:shorthand}%
@@ -111,7 +111,7 @@
\ifnumequal{\value{citecount}}{1}
{\usebibmacro{prenote}}
{}%
- \usebibmacro{cite:labelyear+extrayear}}
+ \usebibmacro{cite:labelyear+extradate}}
{\usebibmacro{cite:shorthand}}%
\ifthenelse{\iffieldundef{postnote}\AND
\(\value{multicitetotal}=0\AND\value{citetotal}=1\)}
@@ -130,7 +130,7 @@
\iffieldundef{shorthand}
{\iffieldundef{labelyear}
{\usebibmacro{cite:label}}
- {\usebibmacro{cite:labelyear+extrayear}}%
+ {\usebibmacro{cite:labelyear+extradate}}%
\savefield{labelyear}{\cbx@lastyear}}
{\usebibmacro{cite:shorthand}%
\global\undef\cbx@lastyear}%
@@ -164,7 +164,7 @@
\ifnumequal{\value{citecount}}{1}
{\usebibmacro{prenote}}
{}%
- \usebibmacro{cite:labelyear+extrayear}}
+ \usebibmacro{cite:labelyear+extradate}}
{\usebibmacro{cite:shorthand}}%
\ifthenelse{\iffieldundef{postnote}\AND
\(\value{multicitetotal}=0\AND\value{citetotal}=1\)}
@@ -183,7 +183,7 @@
\iffieldundef{shorthand}
{\iffieldundef{labelyear}
{\usebibmacro{cite:label}}
- {\usebibmacro{cite:labelyear+extrayear}}%
+ {\usebibmacro{cite:labelyear+extradate}}%
\savefield{labelyear}{\cbx@lastyear}}
{\usebibmacro{cite:shorthand}%
\global\undef\cbx@lastyear}%
@@ -207,15 +207,15 @@
{\printtext[bibhyperref]{\printfield[citetitle]{labeltitle}}}
{\printtext[bibhyperref]{\printfield{label}}}}
-\newbibmacro*{cite:labelyear+extrayear}{%
+\newbibmacro*{cite:labelyear+extradate}{%
\iffieldundef{labelyear}
{}
{\printtext[bibhyperref]{\printlabeldateextra}}}
-\newbibmacro*{cite:extrayear}{%
- \iffieldundef{extrayear}
+\newbibmacro*{cite:extradate}{%
+ \iffieldundef{extradate}
{}
- {\printtext[bibhyperref]{\printfield{extrayear}}}}
+ {\printtext[bibhyperref]{\printfield{extradate}}}}
\newbibmacro*{textcite:postnote}{%
\usebibmacro{postnote}%
@@ -293,7 +293,7 @@
\usebibmacro{textcite}}
{}
{\usebibmacro{textcite:postnote}}
-
+
% "This volume" citation commands
\DeclareCiteCommand{\citetv}
{\usebibmacro{prenote}}
@@ -303,7 +303,7 @@
\printtext[bibhyperref]{\printnames{labelname}\addspace\printfield{year}}}
{\multicitedelim}
{\printtext[bibhyperref]{\usebibmacro{postnote}\addspace[this volume]}}
-
+
\DeclareCiteCommand{\textcitetv}
{\usebibmacro{prenote}}
{\ifciteindex
@@ -312,7 +312,7 @@
\printtext[bibhyperref]{\printnames{labelname}\addspace\bibopenparen\printfield{year}}}
{\multicitedelim}
{\printtext[bibhyperref]{\usebibmacro{postnote}\addspace[this volume]\bibcloseparen}}
-
+
\DeclareCiteCommand{\parencitetv}
{\usebibmacro{prenote}}
{\ifciteindex
@@ -321,6 +321,38 @@
\printtext[bibhyperref]{\bibopenparen\printnames{labelname}\addspace\printfield{year}}}
{\multicitedelim}
{\printtext[bibhyperref]{\usebibmacro{postnote}\addspace[this volume]\bibcloseparen}}
+
+% A cite command to produce the full reference in the footer of the landing page of
+% a paper in an edited volume
+
+\DeclareCiteCommand{\fullciteFooter}
+ {\defcounter{maxnames}{\blx@maxbibnames}%
+ \usebibmacro{prenote}}
+ {\usedriver
+ {\DeclareNameAlias{sortname}{default}}
+ {\thefield{entrytype}}}
+ {\multicitedelim}
+ {\usebibmacro{postnote}}
+
+\DeclareCiteCommand{\fullciteImprint}
+ {\defcounter{maxnames}{\blx@maxbibnames}%
+ \usebibmacro{prenote}%
+ \DeclarePunctuationPairs{colon}{*}}
+ {\usedriver
+ {\DeclareNameAlias{sortname}{default}}
+ {\thefield{entrytype}}}
+ {\multicitedelim}
+ {\usebibmacro{postnote}\adddot}
+
+\DeclareCiteCommand{\CiteFullAuthorList}
+ {\boolfalse{citetracker}%
+ \boolfalse{pagetracker}%
+ \defcounter{maxnames}{\blx@maxbibnames}%
+ \usebibmacro{prenote}}
+ {\DeclareNameAlias{labelname}{first-last}%%
+ \printnames{labelname}}
+ {\multicitedelim}
+ {\usebibmacro{postnote}}
\DeclareMultiCiteCommand{\cites}{\cite}{\setunit{\multicitedelim}}
\DeclareMultiCiteCommand{\parencites}[\mkbibparens]{\parencite}{\setunit{\multicitedelim}}
@@ -330,26 +362,6 @@
{\setunit{\multicitedelim}}
\DeclareMultiCiteCommand{\textcites}{\textcite}{}
-\renewcommand*{\nameyeardelim}{\addspace}
-
-\let\citealt\cite
-\let\citet\textcite
-\let\citep\parencite
-\let\citepv\parencitetv
-\let\Citet\Textcite
-\newcommand{\pgcitep}[2]{(\cite{#1}:~#2)}
-\newcommand{\pgcitealt}[2]{\cite{#1}:~#2}
-\newcommand{\pgcitet}[2]{\citeauthor{#1} (\citeyear{#1}:~#2)}
-\newcommand{\pgposscitet}[2]{\citeauthor{#1}'s (\citeyear{#1}:~#2)}
-\newcommand{\seccitealt}[2]{\cite{#1}:~$\S$#2}
-\newcommand{\seccitep}[2]{(\cite{#1}:~$\S$#2)}
-\newcommand{\seccitet}[2]{\citeauthor{#1} (\citeyear{#1}:~$\S$#2)}
-\newcommand{\secposscitet}[2]{\citeauthor{#1}'s (\citeyear{#1}:~$\S$#2)}
-
-\renewcommand*{\postnotedelim}{\addcolon\space}
-\DeclareFieldFormat{postnote}{#1}
-\DeclareFieldFormat{multipostnote}{#1}
-
\DeclareCiteCommand{\citeauthor}
{\boolfalse{citetracker}%
\boolfalse{pagetracker}%
@@ -365,7 +377,7 @@
{\boolfalse{citetracker}%
\boolfalse{pagetracker}%
\usebibmacro{prenote}}
- {\printtext[bibhyperref]{\iffieldundef{year}{\printfield{labelyear}}{\printfield{year}}\printfield{extrayear}}}
+ {\printtext[bibhyperref]{\iffieldundef{year}{\printfield{labelyear}}{\printfield{year}}\printfield{extradate}}}
{\multicitedelim}
{\usebibmacro{postnote}}
@@ -373,7 +385,7 @@
{\boolfalse{citetracker}%
\boolfalse{pagetracker}%
\usebibmacro{prenote}}
- {\printtext[bibhyperref]{\iffieldundef{year}{\printfield{labelyear}}{\printfield{year}}\printfield{extrayear}}}
+ {\printtext[bibhyperref]{\iffieldundef{year}{\printfield{labelyear}}{\printfield{year}}\printfield{extradate}}}
{\multicitedelim}
{\usebibmacro{postnote}}
@@ -387,7 +399,7 @@
\DeclareCiteCommand{\posscitealt}
{\boolfalse{citetracker}%
\boolfalse{pagetracker}}
- {\printtext[bibhyperref]{\printnames{labelname}'s \iffieldundef{year}{\printfield{labelyear}}{\printfield{year}}\printfield{extrayear}}}
+ {\printtext[bibhyperref]{\printnames{labelname}'s \iffieldundef{year}{\printfield{labelyear}}{\printfield{year}}\printfield{extradate}}}
{}
{}
@@ -398,12 +410,12 @@
{}
{}
-\renewcommand*{\multicitedelim}{\addcomma\space}
-
%% changes of citestyle (cbx) (FIXME: documentation missing)
-\renewcommand{\postnotedelim}{: }%
+\renewcommand*{\nameyeardelim}{\addspace}
+\renewcommand*{\postnotedelim}{\addcolon\space}
+\DeclareFieldFormat{postnote}{#1}
+\DeclareFieldFormat{multipostnote}{#1}
\renewcommand{\multicitedelim}{\addsemicolon\space}%
\renewcommand{\compcitedelim}{\multicitedelim}
-% \renewcommand{\nameyeardelim}{ }%
\endinput