-
Notifications
You must be signed in to change notification settings - Fork 0
/
biblatex-mnras.cbx
50 lines (41 loc) · 1.75 KB
/
biblatex-mnras.cbx
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
%% ---------------------------------------------------------------
%% biblatex-mnras --- A biblatex implementation of the MNRAS
%% citation style
%% Maintained by Fabian Scheuermann
%% E-mail: f.scheuermann@uni-heidelberg.de
%% Released under the LaTeX Project Public License v1.3c or later
%% See http://www.latex-project.org/lppl.txt
%% ---------------------------------------------------------------
%%
\ProvidesFile{biblatex-mnras.cbx}[2022/06/10 v1.0 biblatex citation style]
% Load the standard style to avoid copy-pasting unnecessary material
\RequireCitationStyle{authoryear-comp}
\ExecuteBibliographyOptions{
citetracker=true, % we need this to change to et al. the second time
mincitenames=1,
maxcitenames=2,
sorting=ynt,
uniquename=false,
uniquelist=false
}
% use ampercent between authors
% https://tex.stackexchange.com/questions/455828/biblatex-multiple-authors-and-should-become-dot-between-title-and-pu
\DeclareDelimFormat{finalnamedelim}{\addspace\&\space}
% remove a comma between name and year if natbib=true ist used
\DeclareDelimFormat{nameyeardelim}{\addspace}
% up to theree authors are written out but second time et al. is used
% https://tex.stackexchange.com/questions/48846/biblatex-et-al-beginning-from-second-citation
\AtEveryCitekey{\ifciteseen{}{\defcounter{maxnames}{3}}}
% the citealias commands (from natbib=true) do not contain hyperlinks
\DeclareCiteCommand{\citetalias}
{\usebibmacro{prenote}}
{\usebibmacro{citeindex}%
\printtext[bibhyperref]{\@citealias{\thefield{entrykey}}}}
{\multicitedelim}
{\usebibmacro{postnote}}
\DeclareCiteCommand{\citepalias}[\mkbibparens]
{\usebibmacro{prenote}}
{\usebibmacro{citeindex}%
\printtext[bibhyperref]{\@citealias{\thefield{entrykey}}}}
{\multicitedelim}
{\usebibmacro{postnote}}