% $Id: philosophy-classic.bbx,v 0.7c 2011/05/16 Valbusa$ % Copyright 2009-2011 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.bbx}[philosophy-classic.bbx,v 0.7c 2011/05/16 valbusa beta$] \RequireBibliographyStyle{authoryear} \RequireBibliographyStyle{philosophy-standard} % DECLARE AND EXECUTE BIBLIOGRAPHY OPTIONS %********************************************************************* \newtoggle{bbx:square} \DeclareBibliographyOption{square}[true]{% \settoggle{bbx:square}{#1}} \ExecuteBibliographyOptions{% uniquename=false, pagetracker, singletitle=false, square=false, mergedate=basic} %$$$$$$ \newcounter{maxnamesincross} \newcounter{minnamesincross} % AT BEGIN SHORTHANDS %***************************************** \AtBeginShorthands{% \togglefalse{bbx:annotation} \renewcommand{\labelnamepunct}{\addcomma\space} \renewbibmacro*{publocyear}{% \iflistundef{publisher}{} {\printlist{publisher}} \setunit*{\addcomma\space}% \printlist{location}% \setunit*{\space}% \printtext{\printfield{labelyear}}% \newunit} \renewbibmacro*{loccolonpub}{% \printlist{location}% \iflistundef{publisher} {\setunit*{\addspace}} {\setunit*{\addcolon\space}}% \printlist{publisher}% \setunit*{\addcomma\space}% \printtext{\printfield{labelyear}}% \newunit} \renewbibmacro*{locpubyear}{% \printlist{location}% \iflistundef{publisher} {\setunit*{\addspace}} {\setunit*{\addcomma\space}}% \printlist{publisher}% \setunit*{\addcomma\space}% \printtext{\printfield{labelyear}}% \newunit} \renewbibmacro*{date+extrayear}{}} % AT BEGIN DOCUMENT %************************************************** \AtBeginDocument{% \setcounter{maxnamesincross}{\value{maxnames}} \setcounter{minnamesincross}{\value{minnames}} \iftoggle{bbx:square} {\renewcommand{\bibopenparen}{\bibopenbracket}% \renewcommand{\bibcloseparen}{\bibclosebracket}} {}} %********************************************************************* % NUOVE MACRO %********************************************************************* % mergedate=basic %\renewbibmacro*{date+extrayear}{% % \iffieldundef{labelyear} % {} % {\printtext[parens]{% % \printfield{labelyear}% % \printfield{extrayear}}}}% % \renewbibmacro*{date}{% % \iffieldundef{month} % {} % {\printdate}}% \renewbibmacro*{issue+date}{% \ifboolexpr{ test {\iffieldundef{issue}} and test {\iffieldundef{month}} } {} {\ifdefstring{\bbx@volnumformat}{volnumparens} {\printtext{% \printfield{issue}% \setunit*{\addspace}% \printdate}}% {\printtext[parens]{% \printfield{issue}% \setunit*{\addspace}% \printdate}}}% \newunit}% % changed \renewbibmacro*{bbx:editor}[1]{% \ifboolexpr{ test \ifuseeditor and not test {\ifnameundef{editor}} } {\usebibmacro{bbx:dashcheck} {\bibnamedash} {\printnames{editor}% \setunit{\addspace}% \usebibmacro{bbx:savehash}}% \usebibmacro{#1}% \clearname{editor}% \setunit{\addspace}}% {\global\undef\bbx@lasthash \usebibmacro{labeltitle}% \setunit*{\addspace}}% \usebibmacro{date+extrayear}} % Macro per la forma ``Publisher, Location Year''. %**************************************************************** \newbibmacro*{publocyear}{% \iflistundef{publisher}% {} {\printlist{publisher}} \setunit*{\addcomma\space}% \printlist{location}% \newunit} \newbibmacro*{inpublocyear}{% \iflistundef{institution}% {} {\printlist{institution}} \setunit*{\addcomma\space}% \printlist{location}% \newunit} \newbibmacro*{orgpublocyear}{% \iflistundef{organization}% {} {\printlist{organization}} \setunit*{\addcomma\space}% \printlist{location}% \newunit} % Macro per la forma ``Location: Publisher, Year'' %**************************************************************** \newbibmacro*{loccolonpub}{% \printlist{location}% \iflistundef{publisher}% {\setunit*{\addspace}} {\setunit*{\addcolon\space}}% \printlist{publisher}% \newunit} \newbibmacro*{inloccolonpub}{% \printlist{location}% \iflistundef{institution}% {\setunit*{\addspace}} {\setunit*{\addcolon\space}}% \printlist{institution}% \newunit} \newbibmacro*{orgloccolonpub}{% \printlist{location}% \iflistundef{organization}% {\setunit*{\addspace}} {\setunit*{\addcolon\space}}% \printlist{organization}% \newunit} % Macro per la forma ``Location, Publisher, Year'' %************************************************************** \newbibmacro*{locpubyear}{% \printlist{location}% \iflistundef{publisher}% {\setunit*{\addspace}} {\setunit*{\addcomma\space}}% \printlist{publisher}% \newunit} \newbibmacro*{inlocpubyear}{% \printlist{location}% \iflistundef{institution}% {\setunit*{\addspace}} {\setunit*{\addcomma\space}}% \printlist{institution}% \newunit} \newbibmacro*{orglocpubyear}{% \printlist{location}% \iflistundef{organization}% {\setunit*{\addspace}} {\setunit*{\addcomma\space}}% \printlist{organization}% \newunit} %********************************************************************* %% BIBLIOGRAPHY DRIVERS %********************************************************************* \newbibmacro*{crossdate+extrayear}{% \iffieldundef{year}% {}% {\printtext[parens]{\printdateextra}}} \DeclareCiteCommand{\bbx@crossref} {}% {\ifuseeditor{%\ifthenelse{\value{listtotal}=2} %{\printnames[][-\value{maxnamesincross}]{labelname}} %{\printnames[][-\value{minnamesincross}]{labelname}} \printnames{labelname}} {\usebibmacro{labeltitle}} \setunit*{\addspace}% \printtext{\usebibmacro{crossdate+extrayear}}}% {}% {}% \DeclareBibliographyDriver{incollection}{% \usebibmacro{bibindex}% \usebibmacro{begentry}% \usebibmacro{author/translator+others}% \setunit{\labelnamepunct}\newblock \usebibmacro{title}% \newunit \printlist{language}% \newunit\newblock \usebibmacro{byauthor}% \newunit\newblock \usebibmacro{in:}% \iffieldundef{crossref}% {\usebibmacro{incollection:full}}% {\printtext{\setunit{\unspace}}% Thanks to Sander Gliboff \bbx@crossref{\thefield{crossref}}% \newunit\newblock \printfield{userd}% \newunit\newblock \usebibmacro{chapter+pages}% \newunit\newblock \iftoggle{bbx:isbn} {\printfield{isbn}} {}% \newunit\newblock \usebibmacro{doi+eprint+url}% \newunit\newblock \usebibmacro{incolladdendum+pubstate}% \newunit\newblock \usebibmacro{pageref}% \usebibmacro{finentry}}} \DeclareBibliographyDriver{inbook}{% \usebibmacro{bibindex}% \usebibmacro{begentry}% \usebibmacro{author/translator+others}% \setunit{\labelnamepunct}\newblock \usebibmacro{title}% \newunit \printlist{language}% \newunit\newblock \usebibmacro{byauthor}% \newunit\newblock \usebibmacro{in:}% \iffieldundef{crossref}% {\usebibmacro{inbook:full}}% {%\printtext{\setunit{\unspace}}% Thanks to Sander Gliboff \bbx@crossref{\thefield{crossref}}% \newunit\newblock \printfield{userd}% \newunit\newblock \usebibmacro{chapter+pages}% \newunit\newblock \iftoggle{bbx:isbn} {\printfield{isbn}} {}% \newunit\newblock \usebibmacro{doi+eprint+url}% \newunit\newblock \usebibmacro{inbookaddendum+pubstate}% \newunit\newblock \usebibmacro{pageref}% \usebibmacro{finentry}}} \endinput