summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/biblatex/cbx/draft.cbx
blob: 7d304f676835c4a20ccd061a6b9898eb4f094982 (plain)
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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
% $Id: draft.cbx,v 1.2a 2011/02/13 12:05:37 lehman stable $

\ProvidesFile{draft.cbx}
[\abx@cbxid $Id: draft.cbx,v 1.2a 2011/02/13 12:05:37 lehman stable $]

\ExecuteBibliographyOptions{autocite=plain}

\DeclareFieldFormat{citekey}{\cbx@mkcitekey{#1}}
\DeclareUrlCommand{\cbx@mkcitekey}{\urlstyle{citekey}}
\def\url@citekeystyle{\def\UrlFont{\bfseries}}
\newbool{cbx:parens}

\newbibmacro*{cite}{%
  \printtext[bibhyperref]{\printfield[citekey]{entrykey}}}

\newbibmacro*{textcite}{%
  \printnames{labelname}%
  \setunit*{%
    \global\booltrue{cbx:parens}%
    \addspace\bibopenparen}%
  \ifnumequal{\value{citecount}}{1}
    {\usebibmacro{prenote}}
    {}%
  \usebibmacro{cite}}

\newbibmacro*{textcite:postnote}{%
  \iffieldundef{postnote}
    {\ifbool{cbx:parens}
       {\bibcloseparen}
       {}}
    {\ifbool{cbx:parens}
       {\setunit{\postnotedelim}}
       {\setunit{\addspace\bibopenparen}}%
     \printfield{postnote}\bibcloseparen}}

\DeclareCiteCommand{\cite}
  {\usebibmacro{prenote}}
  {\usebibmacro{cite}}
  {\multicitedelim}
  {\usebibmacro{postnote}}

\DeclareCiteCommand{\parencite}[\mkbibparens]
  {\usebibmacro{prenote}}
  {\usebibmacro{cite}}
  {\multicitedelim}
  {\usebibmacro{postnote}}

\DeclareCiteCommand{\footcite}[\mkbibfootnote]
  {\usebibmacro{prenote}}
  {\usebibmacro{cite}}
  {\multicitedelim}
  {\usebibmacro{postnote}}

\DeclareCiteCommand{\footcitetext}[\mkbibfootnotetext]
  {\usebibmacro{prenote}}
  {\usebibmacro{cite}}
  {\multicitedelim}
  {\usebibmacro{postnote}}

\DeclareCiteCommand{\textcite}
  {\boolfalse{cbx:parens}}
  {\usebibmacro{textcite}}
  {\ifbool{cbx:parens}
     {\bibcloseparen\global\boolfalse{cbx:parens}}
     {}%
   \multicitedelim}
  {\usebibmacro{textcite:postnote}}

\endinput