summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2025-01-01 20:53:27 +0000
committerKarl Berry <karl@freefriends.org>2025-01-01 20:53:27 +0000
commit4bc4c61003a57c57c73705696a6bad4151337c67 (patch)
treece46033cd4533ee7ae364863899828cd4ff10353 /Master/texmf-dist/tex/latex
parent69fdb5f97aa62423c1982052789c0943bea52297 (diff)
biblatex-cse (1jan25)
git-svn-id: svn://tug.org/texlive/trunk@73262 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex')
-rw-r--r--Master/texmf-dist/tex/latex/biblatex-cse/biblatex-cse.bbx135
-rw-r--r--Master/texmf-dist/tex/latex/biblatex-cse/biblatex-cse.cbx23
2 files changed, 158 insertions, 0 deletions
diff --git a/Master/texmf-dist/tex/latex/biblatex-cse/biblatex-cse.bbx b/Master/texmf-dist/tex/latex/biblatex-cse/biblatex-cse.bbx
new file mode 100644
index 00000000000..e71f783e061
--- /dev/null
+++ b/Master/texmf-dist/tex/latex/biblatex-cse/biblatex-cse.bbx
@@ -0,0 +1,135 @@
+%% This is file `biblatex-cse.bbx',
+%%
+%% Copyright (C) 2024 by João Lourenço <joao.lourenco@fct.unl.pt>
+%%
+%% This file may be distributed and/or modified under the conditions of
+%% the LaTeX Project Public License, either version 1.3c of this license
+%% or (at your option) any later version. The latest version of this
+%% license is in:
+%%
+%% http://www.latex-project.org/lppl.txt
+%%
+%% and version 1.3c or later is part of all distributions of LaTeX
+%% version 2006/05/20 or later.
+%%
+\def\fileversion{1.1.0}
+\def\filedate {2025/01/01}
+\edef\filename {biblatex-cse}
+
+\ProvidesFile{\filename.cbx}[%
+ \filedate\ v\fileversion (João M. Lourenço) Council of Science Editors bibliography style]
+
+\RequireBibliographyStyle{authoryear}
+
+% From: https://tex.stackexchange.com/questions/12254/biblatex-how-to-remove-the-parentheses-around-the-year-in-authoryear-style
+% By courtesy of Enrico Gregorio (egreg)
+\def\act@on@bibmacro#1#2{%
+ \expandafter#1\csname abx@macro@\detokenize{#2}\endcsname
+}
+\def\patchbibmacro{\act@on@bibmacro\patchcmd}
+\def\pretobibmacro{\act@on@bibmacro\pretocmd}
+\def\apptobibmacro{\act@on@bibmacro\apptocmd}
+\def\showbibmacro{\act@on@bibmacro\show}
+
+\ExecuteBibliographyOptions{
+ maxcitenames=2,
+ minbibnames=10,
+ maxbibnames=10,
+ dashed=false,
+ uniquelist=false,
+ giveninits=true,
+ urldate=iso,
+ date=year,
+ seconds=true,
+}
+
+% \usepackage{xpatch}
+
+% Remove commas between family and given names
+\DeclareNameAlias{sortname}{family-given}
+\renewrobustcmd*{\revsdnamepunct}{}
+\renewrobustcmd*{\bibinitdelim}{}
+
+% Remove commas between family and given names
+\renewrobustcmd*{\revsdnamepunct}{}
+\renewrobustcmd*{\bibinitdelim}{}
+
+% Remove dot after initials
+\renewrobustcmd*{\bibinitperiod}{}
+
+% Remove quotation marks from title
+\DeclareFieldFormat*{title}{#1}
+
+% Remove emphasized from titles
+\DeclareFieldFormat*{journaltitle}{#1\isdot}
+\DeclareFieldFormat{postnote}{#1}
+\DeclareFieldFormat{multipostnote}{#1}
+\renewcommand*{\bibpagespunct}{\addcolon}
+\renewcommand{\postnotedelim}{%
+ \iffieldpages{postnote}
+ {\addcolon\space}
+ {\addspace}}
+
+% Remove "and" before last author
+\DefineBibliographyExtras{english}{%
+ \DeclareFieldFormat{pages}{#1}
+ \DeclareDelimFormat{finalnamedelim}{%
+ \ifnumgreater{\value{liststop}}{2}{%
+ \printdelim{multinamedelim}}{\addspace\bibstring{and}\space}}}
+
+% Add dot after list of authors (and before year) and remove parentheses in date
+% \xpatchbibmacro{date+extradate}{%
+\patchbibmacro{date+extradate}{%
+ \printtext[parens]%
+}{%
+ \setunit*{\addperiod\space}%
+ \printtext%
+}{}{}
+
+% Remove "in:" prefix in journal title
+\renewbibmacro{in:}{}
+
+% Cite as "family initials"
+\DeclareNameFormat{labelname}{%
+ \ifcase\value{uniquename}%
+ \usebibmacro{name:family}
+ {\namepartfamily}
+ {\namepartgiven}
+ {\namepartprefix}
+ {\namepartsuffix}%
+ \or
+ \ifuseprefix
+ {\usebibmacro{name:family-given}
+ {\namepartfamily}
+ {\namepartgiveni}
+ {\namepartprefix}
+ {\namepartsuffixi}}
+ {\usebibmacro{name:family-given}
+ {\namepartfamily}
+ {\namepartgiveni}
+ {\namepartprefixi}
+ {\namepartsuffixi}}%
+ \or
+ \usebibmacro{name:family-given}
+ {\namepartfamily}
+ {\namepartgiven}
+ {\namepartprefix}
+ {\namepartsuffix}%
+ \fi
+ \usebibmacro{name:andothers}}
+
+% Always remove "and" before last author
+\ifdefined\prebibhook%
+ \DeclareDelimFormat{finalnamedelim}{%
+ \printdelim{multinamedelim}%
+ }%
+\else\ifdefined\bibliography%
+ \let\origbibliography=\bibliography%
+ \renewcommand{\bibliography}{%
+ \DeclareDelimFormat{finalnamedelim}{%
+ \printdelim{multinamedelim}%
+ }%
+ \origbibliography%
+ }%
+\fi\fi
+
diff --git a/Master/texmf-dist/tex/latex/biblatex-cse/biblatex-cse.cbx b/Master/texmf-dist/tex/latex/biblatex-cse/biblatex-cse.cbx
new file mode 100644
index 00000000000..45722ed88c5
--- /dev/null
+++ b/Master/texmf-dist/tex/latex/biblatex-cse/biblatex-cse.cbx
@@ -0,0 +1,23 @@
+%% This is file `biblatex-cse.cbx',
+%%
+%% Copyright (C) 2024 by João Lourenço <joao.lourenco@fct.unl.pt>
+%%
+%% This file may be distributed and/or modified under the conditions of
+%% the LaTeX Project Public License, either version 1.3c of this license
+%% or (at your option) any later version. The latest version of this
+%% license is in:
+%%
+%% http://www.latex-project.org/lppl.txt
+%%
+%% and version 1.3c or later is part of all distributions of LaTeX
+%% version 2006/05/20 or later.
+%%
+\def\fileversion{1.1.0}
+\def\filedate {2025/01/01}
+\edef\filename {biblatex-cse}
+
+\ProvidesFile{\filename.cbx}[%
+ \filedate\ v\fileversion (João M. Lourenço) Council of Science Editors bibliography style]
+
+\RequireCitationStyle{authoryear}
+