summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/biblatex-philosophy/philosophy-classic.cbx
blob: 8b73823b7c7edb2e2a0c5be8345a5d0ee8d7d234 (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
% $Id: philosophy-classic.cbx,v 0.7 2010/03/30 Valbusa$
%	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-classic.cbx}[philosophy-classic.cbx,v 0.7 2010/03/230 valbusa beta$]

\RequireCitationStyle{authoryear-comp}
\DeclareLanguageMapping{italian}{italian-philosophy}

\newbool{cbx:scauthorscite}

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

\ExecuteBibliographyOptions{%
scauthorscite=false
}

%***********************************************************************************************************
%
% 						AT EVERY CITE
%
%***********************************************************************************************************
\AtEveryCite{%
  \ifbool{cbx:scauthorscite}%
  	{\renewcommand*{\mkbibnamelast}[1]{\textsc{#1}}%
	\renewcommand*{\mkbibnamefirst}[1]{\textsc{#1}}%
	\renewcommand*{\mkbibnameprefix}[1]{\textsc{#1}}}%
	{}%
}

%******************************
% hyperlink for names
%*****************************
\DeclareNameFormat{labelname}{%
\bibhyperref{%
  \ifcase\value{uniquename}%
    \usebibmacro{name:last}{#1}{#3}{#5}{#7}%
  \or
    \ifuseprefix
      {\usebibmacro{name:first-last}{#1}{#4}{#5}{#8}}
      {\usebibmacro{name:first-last}{#1}{#4}{#6}{#8}}%
  \or
    \usebibmacro{name:first-last}{#1}{#3}{#5}{#7}%
  \fi
  \usebibmacro{name:andothers}}}

%********************************************************************
% hypelink for \citetitle and \citeyear commands
%*******************************************************************
\DeclareCiteCommand{\citetitle}
  {\boolfalse{citetracker}%
   \boolfalse{pagetracker}%
   \usebibmacro{prenote}}
  {\indexfield{indextitle}%
    \printtext[bibhyperref]{\printfield[citetitle]{labeltitle}}}
  {\multicitedelim}
  {\usebibmacro{postnote}}

\DeclareCiteCommand*{\citetitle}
  {\boolfalse{citetracker}%
   \boolfalse{pagetracker}%
   \usebibmacro{prenote}}
  {\indexfield{indextitle}%
    \printtext[bibhyperref]{\printfield[citetitle]{title}}}
  {\multicitedelim}
  {\usebibmacro{postnote}}  
  
\DeclareCiteCommand{\citeyear} 
  {\boolfalse{citetracker}% 
   \boolfalse{pagetracker}% 
   \usebibmacro{prenote}} 
  {\printtext[bibhyperref]{\printfield{year}}} 
  {\multicitedelim} 
  {\usebibmacro{postnote}} 

\DeclareCiteCommand{\sdcite}
  {\boolfalse{citetracker}%
   \boolfalse{pagetracker}%
   \usebibmacro{prenote}}
  {\indexnames{labelname}%
   \printtext[bibhyperref]{\printnames{labelname}}%
   \setunit{\addcomma\space}%
   \indexfield{indextitle}%
   \printtext[bibhyperref]{\printfield[citetitle]{labeltitle}}}
  {\multicitedelim}
  {\usebibmacro{postnote}}


\endinput