diff options
Diffstat (limited to 'macros/xetex/latex/langsci/langsci-unified.bbx')
-rw-r--r-- | macros/xetex/latex/langsci/langsci-unified.bbx | 78 |
1 files changed, 66 insertions, 12 deletions
diff --git a/macros/xetex/latex/langsci/langsci-unified.bbx b/macros/xetex/latex/langsci/langsci-unified.bbx index ba20f39ff4..d1de5302ee 100644 --- a/macros/xetex/latex/langsci/langsci-unified.bbx +++ b/macros/xetex/latex/langsci/langsci-unified.bbx @@ -40,14 +40,14 @@ % If an @article entry contains Issuetitle and Editor information, we might % not want to print it. The Unified Style Sheet does not offer explicit -% guidelines on this, but they don't have any examples where either of these -% pieces of information are actually printed. Therefore, we can offer an option -% for the user to decide whether to print it. The default will be not to print -% it since the Unified Style Sheet does not have examples where this information -% is printed. The user can print it by setting `issueandeditor=true` as a package -% option when biblatex is called. +% guidelines on this. It is often used if an article has no page numbers, +% but is supplied with an Article ID (some online-only journals do this). +% But other users might not want it. +% Therefore, we can offer an option for the user to decide whether to print it. +% The default will be to print it. The user can desable printing by setting +% `issueandeditor=false` as a package option when biblatex is called. \newtoggle{issueandeditor} -\DeclareBibliographyOption{issueandeditor}[false]{% +\DeclareBibliographyOption{issueandeditor}[true]{% \settoggle{issueandeditor}{#1}} % Formatting directives for name lists @@ -108,6 +108,43 @@ \mkbibnamefamily{#1}\isdot \ifdefvoid{#2}{}{\revsdnamepunct\bibnamedelimd\mkbibnamegiven{#2}\isdot}% \ifdefvoid{#4}{}{\addcomma\bibnamedelimd\mkbibnamesuffix{#4}\isdot}} + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +% Sort the bibliography, in particular pay +% respect to the cite order +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + +\DeclareSortingTemplate{nycot}{%name-year-citeorder-title, based on nyt from biblatex.def + \sort{ + \field{presort} + } + \sort[final]{ + \field{sortkey} + } + \sort{ + \field{sortname} + \field{author} + \field{editor} + \field{translator} + \field{sorttitle} + \field{title} + } + \sort{ + \field{sortyear} + \field{year} + } + \sort{ + \citeorder + } + \sort{ + \field{sorttitle} + \field{title} + } + \sort{ + \field{volume} + \literal{0} + } +} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % Various bibmacros used in producing the bibliography @@ -218,6 +255,23 @@ {}% \newunit} +% In case that year is not given, but pubstate. This mainly occurs for titles that are forthcoming, in press, etc. +\renewbibmacro*{addendum+pubstate}{% Thanks to https://tex.stackexchange.com/a/154367 for the idea + \printfield{addendum}% + \iffieldequalstr{labeldatesource}{pubstate}{} + {\newunit\newblock\printfield{pubstate}} +} + +\DeclareLabeldate{% + \field{date} + \field{year} + \field{eventdate} + \field{origdate} + \field{urldate} + \field{pubstate} + \literal{nodate} +} + % The next three bib macros are for printing the maintitle and booktitle fields % of an @inproceedings entry with an ISSN as an article in accordance with the % unified style sheet guidelines. @@ -347,10 +401,10 @@ {} {\setunit*{\addcolon\space}}% \printlist{institution}% - \setunit{\addspace}% - \printfield{type}% \setunit*{\addcomma\space}% - \usebibmacro{date}% + \usebibmacro{date} % + \setunit{\adddot\space}% + \printtext[parens]{\printfield{type}}% \newunit} % The following is a hack to satisfy the Unified Stylesheet's decision to give the edition right after the OED as used as a sortlabel. @@ -384,7 +438,7 @@ \DefineBibliographyStrings{english}{% edition = {edn\adddot}, - phdthesis = {dissertation}, + phdthesis = {Doctoral dissertation}, } % basically everything is in sentence case, other than journals and book series (recurring titles) @@ -679,4 +733,4 @@ \AtEveryBibitem{% \savefield*{note}{\lsnote}% \clearfield{note}% -}
\ No newline at end of file +} |