diff options
author | Karl Berry <karl@freefriends.org> | 2010-11-22 00:35:44 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2010-11-22 00:35:44 +0000 |
commit | 85f7041e0b2f447c48856bffbd4943c0ffc0a94c (patch) | |
tree | fc3bf72fedb71b11353c25de929ab51d86404146 /Master/texmf-dist/tex/latex/biblatex-philosophy/philosophy-standard.bbx | |
parent | 7e6df8f048b4e07863f71df4d22ed7761ee38913 (diff) |
biblatex-philosophy (21nov10)
git-svn-id: svn://tug.org/texlive/trunk@20530 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/biblatex-philosophy/philosophy-standard.bbx')
-rw-r--r-- | Master/texmf-dist/tex/latex/biblatex-philosophy/philosophy-standard.bbx | 266 |
1 files changed, 190 insertions, 76 deletions
diff --git a/Master/texmf-dist/tex/latex/biblatex-philosophy/philosophy-standard.bbx b/Master/texmf-dist/tex/latex/biblatex-philosophy/philosophy-standard.bbx index 13ee37c84d5..f434181d5e9 100644 --- a/Master/texmf-dist/tex/latex/biblatex-philosophy/philosophy-standard.bbx +++ b/Master/texmf-dist/tex/latex/biblatex-philosophy/philosophy-standard.bbx @@ -1,10 +1,12 @@ -% $Id: philosophy-standard.bbx,v 0.7a 2010/04/03 Valbusa$ +% $Id: philosophy-standard.bbx,v 0.7b 2010/11/20Valbusa$ % 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-standard.bbx}[$Id: philosophy-standard.bbx,v 0.7a 2010/04/03 valbsua beta $] +\ProvidesFile{philosophy-standard.bbx}[$Id: philosophy-standard.bbx,v 0.7b 2010/11/20 valbsua beta $] + +\RequireBibliographyStyle{standard} \DeclareLanguageMapping{italian}{italian-philosophy} \DeclareLanguageMapping{english}{english-philosophy} @@ -34,8 +36,6 @@ \csuse{bool#1}{bbx:scauthors}} \DeclareBibliographyOption{scauthorsbib}[true]{% \csuse{bool#1}{bbx:scauthorsbib}} - \DeclareBibliographyOption{romanvol}[true]{% - \csuse{bool#1}{bbx:romanvol}} \DeclareBibliographyOption{origparens}[true]{% \csuse{bool#1}{bbx:origparens}} \DeclareBibliographyOption{origbrackets}[true]{% @@ -48,6 +48,8 @@ \newcommand{\bbx@publocformat}{} \newcommand{\bbx@volnumformat}{} \newcommand{\bbx@origfieldsformat}{} +\newcommand{\bbx@editionformat}{} +\newcommand{\bbx@volumeformat}{} \DeclareBibliographyOption{publocformat}[publocyear]{% \renewcommand{\bbx@publocformat}{#1}} @@ -55,6 +57,10 @@ \renewcommand{\bbx@volnumformat}{#1}} \DeclareBibliographyOption{origfieldsformat}[semicolon]{% \renewcommand{\bbx@origfieldsformat}{#1}} +\DeclareBibliographyOption{editionformat}[arabic]{% + \renewcommand{\bbx@editionformat}{#1}} +\DeclareBibliographyOption{volumeformat}[arabic]{% + \renewcommand{\bbx@volumeformat}{#1}} % Execute options @@ -69,21 +75,17 @@ inbeforejournal=false, volnumformat=volnumdefault, origfieldsformat=semicolon, + editionformat=arabic, + volumeformat=arabic, } -%*********************************************************************************************************** -% -% AT BEGIN SHORTHANDS -% -%*********************************************************************************************************** -% + +% AT BEGIN SHORTHANDS +%**************************************** \AtBeginShorthands{\boolfalse{bbx:annotation}} -%*********************************************************************************************************** -% -% AT BEGIN BILIOGRAPHY -% -%*********************************************************************************************************** +% AT BEGIN BILIOGRAPHY +%**************************************** \AtBeginBibliography{% % SMALL CAPS AUTHORS NAME \ifbool{bbx:scauthorsbib}{% @@ -102,11 +104,8 @@ }{}% } -%*********************************************************************************************************** -% -% AT BEGIN DOCUMENT -% -%*********************************************************************************************************** +% AT BEGIN DOCUMENT +%**************************************** \AtBeginDocument{% \ifbool{bbx:origbrackets}{\booltrue{bbx:origparens} \renewcommand{\origleftparen}{\bibleftbracket} @@ -117,15 +116,11 @@ {}% } -%*********************************************************************************************************** -% -% FIELDS FORMAT -% -%*********************************************************************************************************** +% FIELDS FORMAT +%***************************************** -%--------------------------------------------------------------------- % new commands -%--------------------------------------------------------------------- +%--------------------------------------------- \newcommand*{\pureopenparen}{\blx@postpunct(} \newcommand*{\purecloseparen}{\blx@postpunct)\midsentence} @@ -153,24 +148,47 @@ \renewcommand*{\subtitlepunct}{\addperiod\space} \renewcommand*{\intitlepunct}{\nopunct\addspace} \newcommand*{\volnumpunct}{\addcomma\space} -\newcommand*{\volumfont}{\uppercase} +\newcommand*{\volumfont}{% + \ifdefstring{\bbx@volumeformat}{romanupp} + {\uppercase}% + {\ifdefstring{\bbx@volumeformat}{romansc} + {\scshape}% + {}}% roman lowercase +} + +\newcommand*{\editionfont}{% + \ifdefstring{\bbx@editionformat}{romanupp} + {\uppercase}% + {\ifdefstring{\bbx@editionformat}{romansc} + {\scshape}% + {}}% roman lowercase + }% + +% font for volume \newrobustcmd*{\volfnt}[1]{% \begingroup \expandafter\volumfont \expandafter{\romannumeral#1}% \endgroup} - + +% font for edition number +\newrobustcmd*{\edfnt}[1]{% + \begingroup + \expandafter\editionfont + \expandafter{\romannumeral#1}% + \endgroup} + \appto\biburlsetup{\Urlmuskip=0mu\relax}% Thanks to Enrico Gregorio -%--------------------------------------------------------------------- % fields format -%--------------------------------------------------------------------- +%---------------------------------------------- % TITLE \DeclareFieldFormat[inbook]{title}{\mkbibemph{#1}} \DeclareFieldFormat[thesis]{title}{\mkbibemph{#1}} +\DeclareFieldFormat[review]{title}{#1} % CITETITLE \DeclareFieldFormat[inbook]{citetitle}{\mkbibemph{#1}} @@ -191,6 +209,13 @@ % URL \DeclareFieldFormat{url}{\url{#1}} +\DeclareFieldFormat{edition}{% + \ifinteger{#1} + {\ifdefstring{\bbx@editionformat}{arabic} + {\mkbibordedition{#1}~\bibstring{edition}} + {\edfnt{#1}~\bibstring{edition}}}% + {#1\isdot}} + % ANNOTATION LIBRARY \DeclareFieldFormat{annotation}{\annotationfont #1} \DeclareFieldFormat{library}{\libraryfont #1} @@ -199,22 +224,37 @@ \DeclareFieldFormat{backrefparens}{\mkpureparens{#1}} \DeclareFieldFormat{pureparens}{\mkpureparens{#1}} -\DeclareFieldFormat{number}{\ifdefstring{\bbx@volnumformat}{volnumstrings}{\bibstring{number}\adddotspace #1}{#1}}% number in a series -\DeclareFieldFormat[article]{number}{\ifdefstring{\bbx@volnumformat}{volnumstrings}{\bibstring{number}\adddotspace #1}{#1}}% number in a series +\DeclareFieldFormat{number}{% + \ifdefstring{\bbx@volnumformat}{volnumstrings}{% + \bibstring{number}\adddotspace #1}{#1}}% number in a series +\DeclareFieldFormat[article]{number}{% + \ifdefstring{\bbx@volnumformat}{volnumstrings}{% + \bibstring{number}\adddotspace #1}{#1}}% number in a series + +\DeclareFieldFormat{volume}{\bibstring{volume}~\ifdefstring{\bbx@volumeformat}{arabic}{#1}{\volfnt{#1}}}% volume of a book + +\DeclareFieldFormat[article]{volume}{% + \ifdefstring{\bbx@volnumformat}{volnumstrings}{% + \bibstring{volume}\addnbspace\ifdefstring{\bbx@volumeformat}{arabic}{#1}{\volfnt{#1}}}{\ifdefstring{\bbx@volumeformat}{arabic}{#1}{\volfnt{#1}}}} -\DeclareFieldFormat{volume}{\ifdefstring{\bbx@volnumformat}{volnumstrings}{\bibstring{volume}\addnbspace\ifbool{bbx:romanvol}{\volfnt{#1}}{#1}}{\ifbool{bbx:romanvol}{\volfnt{#1}}{#1}}} -\DeclareFieldFormat[article]{volume}{\ifdefstring{\bbx@volnumformat}{volnumstrings}{\bibstring{volume}\addnbspace\ifbool{bbx:romanvol}{\volfnt{#1}}{#1}}{\ifbool{bbx:romanvol}{\volfnt{#1}}{#1}}} \DeclareFieldFormat{series}{% \ifinteger{#1} {\mkbibordseries{#1}~\bibstring{jourser}} {\ifbibstring{#1}{\bibstring{#1}}{#1}}} -%*********************************************************************************************************** -% -% NEW MACROS -% -%*********************************************************************************************************** +% NEW MACROS +%*********************************************** + +\renewbibmacro*{citeindex}{% +\ifciteindex{\indexnames{labelname}}} +\renewbibmacro*{bibindex}{% +\ifbibindex{\indexnames{author}% +\indexnames{editor}% +\indexnames{editora}% +\indexnames{editorb}% +\indexnames{editorc}}% +{}}% \renewbibmacro*{pageref}{% \iflistundef{pageref} @@ -245,9 +285,8 @@ {\usebibmacro{orglocpubyear}} {\usebibmacro{orgpublocyear}}}} -%*********************************************************************************************************** -% Definisco le macro che verranno utilizzate per stampare le informazioni relative alla traduzione, che sono state inserite all'interno dei record bibliografici nei campi orig-. -%*********************************************************************************************************** + +%************************************************** \newbibmacro*{origfields}{% \iflistundef{origlocation}% @@ -356,8 +395,8 @@ \printfield[usera]{usera}% \setunit{\addcomma\space}% \usebibmacro{in:}}% - \setunit{\addspace}% - \newblock + \setunit{\addspace}% + \newblock \iffieldundef{origtitle}{}{% \printfield[origtitle]{origtitle}% \setunit{\addcomma\space}} @@ -383,8 +422,8 @@ \printfield{usera}% \setunit{\addcomma\space}% \usebibmacro{in:}}% - \setunit{\addspace}% - \newblock + \setunit{\addspace}% + \newblock \iffieldundef{origtitle}{}{% \printfield[origtitle]{origtitle}% \setunit{\addcomma\space}}% @@ -404,11 +443,11 @@ \printtext{\bibstring{transtolang}% \iffieldundef{usera}% {\setunit{\addspace}}% - {\setunit{\addspace} + {\setunit{\addspace}% \printfield{usera}% \setunit{\addcomma\space}% - \usebibmacro{in:}% - \setunit{\addspace}}% + \usebibmacro{in:}}% + \setunit{\addspace}% \iffieldundef{origtitle}{}{% \printfield[origtitle]{origtitle}% \newunit\newblock} @@ -421,10 +460,7 @@ {\ifdefstring{\bbx@origfieldsformat}{brackets}{\origrightbracket}{}}}}} - -%*********************************************************************************************************** -%*********************************************************************************************************** - + \renewbibmacro*{annotation}{% \ifbool{bbx:library}{% \setunit{\addperiod\space}% @@ -443,8 +479,6 @@ {\finentry}} -%*********************************************************************************************************** - \renewbibmacro*{addendum+pubstate}{% \printfield{addendum}% \newunit\newblock @@ -455,8 +489,6 @@ \usebibmacro{annotation}% } -%*********************************************************************************************************** -%*********************************************************************************************************** \newbibmacro*{artaddendum+pubstate}{% \printfield{addendum}% \newunit\newblock @@ -467,7 +499,7 @@ \usebibmacro{annotation}% } -% Questa è una nuova macro, analoga alla pecedente, ma per le voci \bibtype{inbook} +% Questa Ë una nuova macro, analoga alla pecedente, ma per le voci \bibtype{inbook} %*********************************************************************************************************** \newbibmacro*{inbookaddendum+pubstate}{% \printfield{addendum}% @@ -479,7 +511,7 @@ \usebibmacro{annotation}% } -% Questa è una nuova macro, analoga alla pecedente, ma per le voci \bibtype{incollection} +% Questa Ë una nuova macro, analoga alla pecedente, ma per le voci \bibtype{incollection} %*********************************************************************************************************** \newbibmacro*{incolladdendum+pubstate}{% \printfield{addendum}% @@ -491,12 +523,10 @@ \usebibmacro{annotation}% } -%*********************************************************************************************************** -%*********************************************************************************************************** \renewbibmacro*{series+number}{% \printfield{series}% - \setunit*{\addcomma\space}% + \setunit*{\addcomma\space}% \printfield{number}% \newunit} @@ -545,8 +575,8 @@ {} {\newunit \printfield{series}% - \setunit{\addspace}}% - \newunit + \setunit{\addspace}\midsentence}% + \newunit% \ifdefstring{\bbx@volnumformat}{volnumstrings}{\usebibmacro{volnumstrings}}% {\ifdefstring{\bbx@volnumformat}{volnumparens}{\usebibmacro{volnumparens}}% {\usebibmacro{volnumdefault}}}% @@ -566,7 +596,7 @@ {} {\newunit \printfield{series}% - \setunit{\addspace}}% + \setunit{\addspace}\midsentence}% \newunit \ifdefstring{\bbx@volnumformat}{volnumstrings}{\usebibmacro{volnumstrings}}% {\ifdefstring{\bbx@volnumformat}{volnumparens}{\usebibmacro{volnumparens}}% @@ -612,19 +642,98 @@ \newunit\newblock \usebibmacro{pageref}% \usebibmacro{finentry}} + + \DeclareBibliographyDriver{book}{% + \usebibmacro{bibindex}% + \usebibmacro{begentry}% + \usebibmacro{author/editor+others/translator+others}% + \setunit{\labelnamepunct}\newblock + \usebibmacro{maintitle+title}% + \newunit + \printlist{language}% + \newunit\newblock + \usebibmacro{byauthor}% + \newunit\newblock + \usebibmacro{byeditor+others}% + \newunit\newblock + \printfield{edition}% + \newunit + \printfield{volumes}% + \newunit\newblock + \usebibmacro{series+number}% + \newunit\newblock + \printfield{note}% + \newunit\newblock + \usebibmacro{publisher+location+date}% + \newunit\newblock + \iffieldundef{maintitle} + {\printfield{volume}% + \printfield{part}} + {}% + \newunit + \usebibmacro{chapter+pages}% + \newunit + \printfield{pagetotal}% + \newunit\newblock + \iftoggle{bbx:isbn} + {\printfield{isbn}} + {}% + \newunit\newblock + \usebibmacro{doi+eprint+url}% + \newunit\newblock + \usebibmacro{addendum+pubstate}% + \newunit\newblock + \usebibmacro{pageref}% + \usebibmacro{finentry}} - \newbibmacro*{incollection:full}{% - \usebibmacro{maintitle+booktitle}% +\DeclareBibliographyDriver{collection}{% + \usebibmacro{bibindex}% + \usebibmacro{begentry}% + \usebibmacro{editor+others}% + \setunit{\labelnamepunct}\newblock + \usebibmacro{maintitle+title}% + \newunit + \printlist{language}% \newunit\newblock \usebibmacro{byeditor+others}% \newunit\newblock \printfield{edition}% \newunit - \iffieldundef{maintitle} + \printfield{volumes}% + \newunit\newblock + \usebibmacro{series+number}% + \newunit\newblock + \printfield{note}% + \newunit\newblock + \usebibmacro{publisher+location+date}% + \newunit\newblock + \iffieldundef{maintitle} {\printfield{volume}% \printfield{part}} {}% \newunit +\usebibmacro{chapter+pages}% + \newunit + \printfield{pagetotal}% + \newunit\newblock + \iftoggle{bbx:isbn} + {\printfield{isbn}} + {}% + \newunit\newblock + \usebibmacro{doi+eprint+url}% + \newunit\newblock + \usebibmacro{addendum+pubstate}% + \newunit\newblock + \usebibmacro{pageref}% + \usebibmacro{finentry}} + + \newbibmacro*{incollection:full}{% + \usebibmacro{maintitle+booktitle}% + \newunit\newblock + \usebibmacro{byeditor+others}% + \newunit\newblock + \printfield{edition}% + \newunit \printfield{volumes}% \newunit\newblock \usebibmacro{series+number}% @@ -633,6 +742,11 @@ \newunit\newblock \usebibmacro{publisher+location+date}% \newunit\newblock + \iffieldundef{maintitle} + {\printfield{volume}% + \printfield{part}} + {}% + \newunit \usebibmacro{chapter+pages}% \newunit\newblock \iftoggle{bbx:isbn} @@ -646,8 +760,8 @@ \usebibmacro{pageref}% \usebibmacro{finentry}} - \newbibmacro*{inbook:full}{% -\usebibmacro{bybookauthor}% +\newbibmacro*{inbook:full}{% + \usebibmacro{bybookauthor}% \newunit\newblock \usebibmacro{maintitle+booktitle}% \newunit\newblock @@ -655,11 +769,6 @@ \newunit\newblock \printfield{edition}% \newunit - \iffieldundef{maintitle} - {\printfield{volume}% - \printfield{part}} - {}% - \newunit \printfield{volumes}% \newunit\newblock \usebibmacro{series+number}% @@ -668,6 +777,11 @@ \newunit\newblock \usebibmacro{publisher+location+date}% \newunit\newblock + \iffieldundef{maintitle} + {\printfield{volume}% + \printfield{part}} + {}% + \newunit \usebibmacro{chapter+pages}% \newunit\newblock \iftoggle{bbx:isbn} |