summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/biblatex-philosophy/philosophy-verbose.cbx
blob: bb6cd610567bd24b6a3c94444638d6fa41465b30 (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
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
% $Id: philosophy-verbose.cbx,v 0.7b 2010/11/20 17:00:00 15:42:33 valbusa beta $
%	Copyright 2009-2010 Ivan Valbusa. This package is author-maintained. 
%	Permission is granted to copy, distribute and/or modify this software under the 
%	terms of the LaTeX Project Public License, version 1.3c 
%	http://www.ctan.org/tex-archive/macros/latex/base/lppl.txt.

\ProvidesFile{philosophy-verbose.cbx}
[$Id: philosophy-verbose.cbx,v 0.7b 2010/11/20 17:00:00 15:42:33 valbusa beta $]

\RequireCitationStyle{verbose-trad2}

\newbool{cbx:scauthorscite}
\newbool{cbx:latinemph}
\newbool{cbx:commacit}
\newbool{cbx:loccit}

\DeclareBibliographyOption{scauthorscite}[true]{%
  \csuse{bool#1}{cbx:scauthorscite}}
\DeclareBibliographyOption{latinemph}[true]{%
  \csuse{bool#1}{cbx:latinemph}}
\DeclareBibliographyOption{commacit}[true]{%
  \csuse{bool#1}{cbx:commacit}}

\ExecuteBibliographyOptions{%
idemtracker=false,
loccittracker=strict,
citetracker=true,
scauthorscite=false,
latinemph=false,
commacit=false}

\newbibmacro*{cite:loccit}{%
  \printtext{%
    \bibhyperlink{cite\csuse{cbx@lastcite@\thefield{entrykey}}}{%
      \bibstring[\mkibid]{loccit}}}%
  \global\booltrue{cbx:loccit}}


\renewbibmacro*{cite:ibid}{%
  \ifloccit
    {\usebibmacro{cite:loccit}}
    {\printtext{%
    \bibhyperlink{cite\csuse{cbx@lastcite@\thefield{entrykey}}}{%
      \bibstring[\mkibid]{ibidem}}}%
    }}

 \renewbibmacro*{cite:title}{%
 \ifsingletitle{\bibstring[\mkibid]{opcit}}{
  \printtext[bibhyperlink]{%
    \printfield[citetitle]{labeltitle}%
    \ifbool{cbx:commacit}{\setunit{\addcomma\space}}
    {\setunit{\addspace\midsentence}}}%
      \bibstring{cit}}}

  
\AtEveryCite{\boolfalse{bbx:annotation}}


\DeclareNameFormat{scdefault}{%
  \iffirstinits
    {\usebibmacro{name:first-last}{\textsc{#1}}{\textsc{#4}}{\textsc{#5}}{\textsc{#7}}}
    {\ifblank{#3}{\usebibmacro{name:first-last}{\textsc{#1}}{#3}{#5}{\textsc{#7}}}{\usebibmacro{name:first-last}{\textsc{#1}}{\textsc{#3}}{\textsc{#5}}{\textsc{#7}}}}%
  \usebibmacro{name:andothers}}

\renewbibmacro*{cite:full}{%
  \printtext[bibhypertarget]{%
    \usedriver
      {\ifbool{cbx:scauthorscite}{\DeclareNameAlias{sortname}{scdefault}}{\DeclareNameAlias{sortname}{default}}}
      {\thefield{entrytype}}}%
  \usebibmacro{shorthandintro}}
 
 \newbibmacro*{ccite}{% 
  \global\boolfalse{cbx:loccit}% 
  \bibhypertarget{cite\the\value{instcount}}{% 
    \ifciteseen 
      {\iffieldundef{shorthand} 
         {\ifciteibid 
            {\usebibmacro{cite:ibid}} 
            {\usebibmacro{cite:title}}% 
     \usebibmacro{cite:save}} 
         {\usebibmacro{cite:shorthand}}} 
      {\usebibmacro{ccite:full}% 
       \usebibmacro{cite:save}}}} 

\newbibmacro*{ccite:full}{% 
  \renewbibmacro*{author}{}% 
  \renewbibmacro*{editor}{}% 
  \renewbibmacro*{translator}{}% 
  \renewbibmacro*{editor+others}{}% 
  \printtext[bibhypertarget]{% 
    \usedriver 
      {\DeclareNameAlias{sortname}{default}} 
      {\thefield{entrytype}}}% 
  \usebibmacro{shorthandintro}} 
          
\DeclareCiteCommand{\ccite} 
  {\usebibmacro{prenote}} 
  {\usebibmacro{citeindex}% 
   \usebibmacro{ccite}} 
  {\multicitedelim} 
  {\usebibmacro{cite:postnote}} 
  
\AtEveryCite{%
  \ifbool{cbx:latinemph}{\renewcommand*{\mkibid}{\emph}}{}%
 \ifbool{cbx:scauthorscite}{\DeclareNameFormat{labelname}{%
  \ifcase\value{uniquename}%
    \usebibmacro{name:last}{\textsc{#1}}{\textsc{#3}}{\textsc{#5}}{\textsc{#7}}%
  \or
    \ifuseprefix
      {\usebibmacro{name:first-last}{\textsc{#1}}{\textsc{#4}}{\textsc{#5}}{\textsc{#8}}}
      {\usebibmacro{name:first-last}{\textsc{#1}}{\textsc{#4}}{\textsc{#6}}{\textsc{#8}}}%
  \or
    \usebibmacro{name:first-last}{\textsc{#1}}{\textsc{#3}}{\textsc{#5}}{\textsc{#7}}%
  \fi
  \usebibmacro{name:andothers}}}{}}
  


\DeclareCiteCommand{\cbx@crossref}
  {\let\scshape\normalfont}% per evitare il maiuscoletto all'interno della voce
  {\ifciteseen{\usebibmacro{editor+others}%
  \setunit*{\addcomma\space}\printtext[bibhyperlink]{%
    \printfield[citetitle]{labeltitle}%
    \setunit{\addspace\midsentence}%
    \bibstring{cit}}}{\usebibmacro{incollection:full}}}%
  {}%
  {}%	


\DeclareCiteCommand{\cbx@inbookcrossref}
  {\let\scshape\normalfont}% per evitare il maiuscoletto all'interno della voce
  {\ifciteseen{\usebibmacro{bybookauthor}%
  \setunit*{\addcomma\space}\printtext[bibhyperlink]{%
    \printfield[citetitle]{labeltitle}%
    \setunit{\addspace\midsentence}%
    \bibstring{cit}\midsentence}}{\usebibmacro{inbook:full}}}%
  {}%
  {}%

\endinput