summaryrefslogtreecommitdiff
path: root/macros/latex/contrib/biblatex-contrib/biblatex-luh-ipw/standard-luh-ipw.bbx
blob: 22e29c88bdc1e7f9184aad937e1cd249e21e631f (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
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
% standard-luh-ipw.bbx, Oliver Heins (oheins@sopos.org) 2012--2013

\ProvidesFile{standard-luh-ipw.bbx}[2013/11/18 v0.3 bibliography style for use with biblatex 2.x]

\DeclareBibliographyOption{ipwstrict}[true]{%
  \ifstrequal{#1}{true}
    {\ExecuteBibliographyOptions{emphtitle=false,yearinparens=false}}
    {}}

\newtoggle{bbx:emphtitle}
\DeclareBibliographyOption{emphtitle}[true]{%
  \settoggle{bbx:emphtitle}{#1}}
\DeclareBibliographyOption{noemphtitle}[true]{% Deprecated, use
  \ifstrequal{#1}{true}         % emphtitle instead
    {\settoggle{bbx:emphtitle}{false}}
    {\settoggle{bbx:emphtitle}{true}}}

\ExecuteBibliographyOptions{emphtitle=true,
                            noemphtitle=false,
                            ipwstrict=false}

\newcommand{\mkbibvolume}[1]{\bibstring{jourvol}\adddot~#1}

\DeclareLanguageMapping{english}{english-luh-ipw}
\DeclareLanguageMapping{german}{german-luh-ipw}

\renewcommand*{\bibleftparen}{{\upshape (}}
\renewcommand*{\bibrightparen}{{\upshape )}\midsentence}
\renewcommand*{\bibleftbracket}{{\upshape [}}
\renewcommand*{\bibrightbracket}{{\upshape ]}\midsentence}
%\renewcommand*{\subtitlepunct}{\iffieldundef{subtitle}{}{\newunitpunct}}
\renewcommand*{\labelnamepunct}{\addcolon\space}
\renewcommand*{\nametitledelim}{\addcolon\space}

\DeclareFieldFormat{origyear}{\mkbibparens{\upshape{#1}}}
\DeclareFieldFormat[article,periodical]{volume}{\mkbibvolume{#1}}% volume of a journal
\DeclareFieldFormat[article,periodical]{issue}{% volume of a journal
  \ifnumerals{#1}
    {\addcomma\space\bibstring{issue}\adddot~#1}
    {\printtext[parens]{#1}}} 

%% Wenn die Option emphtitle=false, werden die Titel nicht hervorgehoben
\DeclareFieldFormat{citetitle}{\iftoggle{bbx:emphtitle}{\mkbibemph{#1}}{#1}}
\DeclareFieldFormat
  [article,inbook,incollection,inproceedings,patent,thesis,unpublished]
  {citetitle}{\iftoggle{bbx:emphtitle}{\mkbibquote{#1\isdot}}{#1\isdot}}
\DeclareFieldFormat{booktitle}{\iftoggle{bbx:emphtitle}{\mkbibemph{#1}}{#1}}
\DeclareFieldFormat{journaltitle}{\iftoggle{bbx:emphtitle}{\mkbibemph{#1}}{#1}}
\DeclareFieldFormat{issuetitle}{\iftoggle{bbx:emphtitle}{\mkbibemph{#1}}{#1}}
\DeclareFieldFormat{maintitle}{\iftoggle{bbx:emphtitle}{\mkbibemph{#1}}{#1}}
\DeclareFieldFormat{title}{\iftoggle{bbx:emphtitle}{\mkbibemph{#1}}{#1}}
\DeclareFieldFormat
  [article,inbook,incollection,inproceedings,patent,thesis,unpublished]
  {title}{\iftoggle{bbx:emphtitle}{\mkbibquote{#1\isdot}}{#1\isdot}}


%% -> vor 'number' (z.B. ', Nr. ')
\newcommand*{\journumstring}{%
  \addcomma\space%
  \bibstring{number}%
  \addnbspace}

%% Formatierung bei Zeitschriften
\renewbibmacro*{volume+number+eid}{%
  \setunit{\addcomma\space}%
  \printfield{eid}%
  \iffieldundef{number}
  {}
  {\setunit{\addcomma\addspace\journumstring}%
   \printfield{number}}%
  \iffieldundef{volume}
    {\iffieldundef{month}
      {}
      {\setunit{\addcomma\space}}}%
    {\setunit{\addcomma\space}%
     \printfield{volume}%
     \iffieldundef{date}
       {}
       {\printtext[parens]{\printfield{date}}}}
  \newunit\newblock
  \setunit{\addcomma\space}%
  \printfield{eid}}

\endinput