-
Notifications
You must be signed in to change notification settings - Fork 0
/
libstyle.cbx
35 lines (29 loc) · 1.06 KB
/
libstyle.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
\ProvidesFile{libstyle.cbx}
\RequireCitationStyle{authoryear-ibid}
% TODO fix beacuse of newer latex version
%\DeclareNameFormat{labelname}{\usebibmacro{name:last-first}{#1}{#4}{#5}{#7}%
% \usebibmacro{name:andothers}
%}
\DeclareFieldFormat{citehyperref}{%
\DeclareFieldAlias{bibhyperref}{noformat}% Avoid nested links
\bibhyperref{#1}}
\renewbibmacro*{cite}{\printtext[citehyperref]{%
\ignorespaces
\global\boolfalse{cbx:loccit}%
\iffieldundef{shorthand}
{\ifthenelse{\ifciteibid\AND\NOT\iffirstonpage}
{\usebibmacro{cite:ibid}}
{\ifthenelse{\ifnameundef{labelname}\OR\iffieldundef{labelyear}}
{\usebibmacro{cite:label}%
\setunit{\addspace}}
{\printnames{labelname}%
\setunit{\nameyeardelim}}%
\usebibmacro{cite:paren:labelyear+extrayear}}}
{\usebibmacro{cite:shorthand}}}}
\newbibmacro*{cite:paren:labelyear+extrayear}{%
\iffieldundef{labelyear}
{}
{\printtext[parens]{%
\printfield{labelyear}%
\printfield{extrayear}}}}
\endinput