From e6826e3bb3139f2329f722784dfa24c5cbb824dc Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Sun, 17 Mar 2013 21:52:06 +0000 Subject: biblatex-philosophy git-svn-id: svn://tug.org/texlive/trunk@29411 c570f23f-e606-0410-a88d-b1316a301751 --- .../biblatex-philosophy/philosophy-modern.bbx | 336 +++++++++------------ 1 file changed, 140 insertions(+), 196 deletions(-) (limited to 'Master/texmf-dist/tex/latex/biblatex-philosophy/philosophy-modern.bbx') diff --git a/Master/texmf-dist/tex/latex/biblatex-philosophy/philosophy-modern.bbx b/Master/texmf-dist/tex/latex/biblatex-philosophy/philosophy-modern.bbx index 907555b7dd8..bf678627f0c 100644 --- a/Master/texmf-dist/tex/latex/biblatex-philosophy/philosophy-modern.bbx +++ b/Master/texmf-dist/tex/latex/biblatex-philosophy/philosophy-modern.bbx @@ -1,71 +1,62 @@ -% $Id: philosophy-modern.bbx,v 0.8b 2012/05/06 Valbusa$ -% Copyright 2009-2012 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-modern.bbx}[philosophy-modern.bbx,v 0.8b 2012/05/06 valbusa beta$] +%% +%% This is file `philosophy-modern.bbx', +%% generated with the docstrip utility. +%% +%% The original source files were: +%% +%% biblatex-philosophy.dtx (with options: `modern-bbx') +%% ______________________________________________________ +%% The biblatex-philosophy package +%% Copyright (C) 2009-2013 Ivan Valbusa +%% All rights reserved +%% +%% License information appended +%% +\ProvidesFile{philosophy-modern.bbx} + [2013/03/15 v0.8c valbusa beta] \RequireBibliographyStyle{philosophy-classic} - \newtoggle{bbx:yearleft} \DeclareBibliographyOption{yearleft}[true]{% \settoggle{bbx:yearleft}{#1}} - \ExecuteBibliographyOptions{% -dashed=true, -yearleft=false} - -%% new lengths -%%--------------------------------------------------------------------------------------------- -\newlength{\yeartitle} + yearleft=false} +\newlength{\yeartitle} \newlength{\postnamesep} -\setlength{\yeartitle}{0.8em}% +\setlength{\yeartitle}{0.8em}% \setlength{\postnamesep}{0.5ex plus 2pt minus 1pt} \setlength{\bibitemsep}{\postnamesep} \setlength{\bibnamesep}{1.5ex plus 2pt minus 1pt} \setlength{\bibhang}{4\parindent} -%% new commands -%%--------------------------------------------------------------------------------------------- -\newcommand{\postsep}{\par\nobreak\vskip\postnamesep\hskip-\bibhang\ignorespaces} -\renewcommand{\labelnamepunct}{\unspace} - \AtBeginBibliography{ - \iftoggle{bbx:yearleft}{% - \setlength{\yeartitle}{\fill}} - {}% - } -\AtBeginShorthands{% - \renewcommand{\postsep}{}% - \renewcommand{\labelnamepunct}{\addcomma\space}} - -%%--------------------------------------------------------------------------------------------- -%% MACROS -%%--------------------------------------------------------------------------------------------- +\iftoggle{bbx:yearleft}{% +\setlength{\yeartitle}{\fill}} +{}} +\newcommand{\postsep}{\par\nobreak\vskip\postnamesep% + \hskip-\bibhang\ignorespaces} +\renewcommand{\labelnamepunct}{} +\AtBeginShorthands{% +\renewcommand{\postsep}{}% +\renewcommand{\labelnamepunct}{\newunitpunct}} \renewbibmacro*{date+extrayear}{% - \makebox[\bibhang][r]{% - \printtext{% - \iffieldundef{year}% - {}% - {\printfield{labelyear}\printfield{extrayear}}% - \hskip\yeartitle}}} + \begingroup% + \clearfield{month}% + \makebox[\bibhang][r]{\printtext{% + \iffieldundef{labelyear}% + {\printtext{\midsentence\bibstring{nodate}}}% + {\printtext{\printdateextra}}% + \hskip\yeartitle}}% + \endgroup}% -% label for entries without 'editor' and 'author' -%%------------------------------------------------------------- \renewbibmacro*{labeltitle}{% \iffieldundef{label}% - {\iffieldundef{shorttitle} - {\printfield{title}% - \clearfield{title}}% - {\printfield[title]{shorttitle}}}% - {\printtext{\printfield{label}}% - \postsep}} - -% macro 'author' -%%--------------------------------------------------- + {\iffieldundef{shorttitle} + {\printfield{title}\clearfield{title}}% + {\printfield[title]{shorttitle}}}% + {\printtext{\printfield{label}}% +\postsep}} \renewbibmacro*{author}{% \ifboolexpr{ test \ifuseauthor @@ -73,59 +64,91 @@ yearleft=false} not test {\ifnameundef{author}} } {\usebibmacro{bbx:dashcheck} - {}%MOD + {}% {\usebibmacro{bbx:savehash}% \printnames{author}% \iffieldundef{nameaddon}{}% {\setunit{\addspace}% \printtext[brackets]{\printfield{nameaddon}}}% - \iffieldundef{authortype} - {}% - {\setunit{\addcomma\space}}% + \iffieldundef{authortype} + {}% + {\setunit{\addcomma\space}}% \usebibmacro{authorstrg}% -% \setunit{\addspace}% ? - \postsep%ADD - }}% - {\global\undef\bbx@lasthash - \usebibmacro{labeltitle}% - \setunit*{\addspace}}% - \usebibmacro{date+extrayear}} - + \postsep}}% + {\global\undef\bbx@lasthash + \usebibmacro{labeltitle}% + \setunit*{\addspace}}% + \usebibmacro{date+extrayear}}% + +\renewbibmacro*{editor}{% + \usebibmacro{bbx:editor}{editorstrg}} +\renewbibmacro*{editor+others}{% + \usebibmacro{bbx:editor}{editor+othersstrg}} \renewbibmacro*{bbx:editor}[1]{% \ifboolexpr{ test \ifuseeditor and not test {\ifnameundef{editor}} }% - {\usebibmacro{bbx:dashcheck} - {}% removed \bibnamedash + {\usebibmacro{bbx:dashcheck}% + {}% {\printnames{editor}% - \postsep%ADD - \usebibmacro{bbx:savehash}}% - \clearname{editor}}% - {\global\undef\bbx@lasthash + \postsep%ADD + \usebibmacro{bbx:savehash}}}% + {\global\undef\bbx@lasthash% \usebibmacro{labeltitle}}% \usebibmacro{date+extrayear}% - \iffieldundef{label} - {\usebibmacro{#1}\setunit{\addcomma\space}}{}% - } + \iffieldundef{label}% + {\usebibmacro{#1}% + \clearname{editor}% + \printtext{\addcomma\space}}{}}% +\DeclareCiteCommand{\bbx@crossref@inbook} + {}% + {\usebibmacro{citeindex}% + \ifuseeditor{% + \ifthenelse{\value{listtotal}=2}% + {\printnames[][-\value{maxnamesincross}]{labelname}}% + {\printnames[][-\value{minnamesincross}]{labelname}}}% + {\usebibmacro{labeltitle}}% + \setunit*{\addspace}% + \usebibmacro{classic:date+extrayear}}% + {}% + {}% - - % restoreclassic -%%--------------------------------------------------- -\define@key{blx@bib}{restoreclassic}[true]{% - \ifstrequal{#1}{true} - { -\setlength{\bibhang}{\parindent} -\renewcommand{\labelnamepunct}{\addcomma\space} +\DeclareCiteCommand{\bbx@crossref@incollection} + {}% + {\usebibmacro{citeindex}% + \ifuseeditor{% + \ifthenelse{\value{listtotal}=2}% + {\printnames[][-\value{maxnamesincross}]{labelname}}% + {\printnames[][-\value{minnamesincross}]{labelname}}}% + {\usebibmacro{labeltitle}} + \setunit*{\addspace}% + \usebibmacro{classic:date+extrayear}}% + {}% + {}% - \renewbibmacro*{date+extrayear}{%mergedate=basic +\newbibmacro*{classic:date+extrayear}{% + \begingroup% + \clearfield{month}% \iffieldundef{labelyear} - {} + {\printtext[parens]{\midsentence\bibstring{nodate}}}% {\printtext[parens]{% - \printfield{labelyear}% - \printfield{extrayear}}}}% - + \printfield{labelyear}% + \printfield{extrayear}}}% + \endgroup}% +\define@key{blx@bib1}{restoreclassic}[]{} +\define@key{blx@bib2}{restoreclassic}[true]{% + \ifstrequal{#1}{true}{% + \setlength{\bibhang}{\parindent}% + \renewcommand{\labelnamepunct}{\newunitpunct} +\renewbibmacro*{date+extrayear}{% + \begingroup% + \clearfield{month}% + \iffieldundef{labelyear} + {\printtext[parens]{\midsentence\bibstring{nodate}}}% + {\printtext[parens]{\printdateextra}}% + \endgroup}% \renewbibmacro*{author}{% \ifboolexpr{ test \ifuseauthor @@ -139,18 +162,22 @@ yearleft=false} \iffieldundef{nameaddon}{}% {\setunit{\addspace}% \printtext[brackets]{\printfield{nameaddon}}}% - \iffieldundef{authortype} - {\setunit{\addspace}} - {\setunit{\addcomma\space}}}% +\iffieldundef{authortype} + {\setunit{\addspace}} + {\setunit{\addcomma\space}}}% \iffieldundef{authortype} {}% {\usebibmacro{authorstrg}% - \setunit{\addspace}}}% +\setunit{\addspace}}}% {\global\undef\bbx@lasthash \usebibmacro{labeltitle}% \setunit*{\addspace}}% - \usebibmacro{date+extrayear}} + \usebibmacro{date+extrayear}}% +\renewbibmacro*{editor}{% + \usebibmacro{bbx:editor}{editorstrg}} +\renewbibmacro*{editor+others}{% + \usebibmacro{bbx:editor}{editor+othersstrg}} \renewbibmacro*{bbx:editor}[1]{% \ifboolexpr{ test \ifuseeditor @@ -160,118 +187,35 @@ yearleft=false} {\usebibmacro{bbx:dashcheck} {\bibnamedash} {\printnames{editor}% - \setunit{\addspace}% - \usebibmacro{bbx:savehash}}% +\setunit{\addspace}% +\usebibmacro{bbx:savehash}}% \usebibmacro{#1}% \clearname{editor}% \setunit{\addspace}}% {\global\undef\bbx@lasthash \usebibmacro{labeltitle}% \setunit*{\addspace}}% - \usebibmacro{date+extrayear}} - -\renewbibmacro*{labeltitle}{% - \iffieldundef{label} - {\iffieldundef{shorttitle} - {\printfield{title}% - \clearfield{title}} - {\printfield[title]{shorttitle}}} - {\printfield{label}}} -} - {}} + \usebibmacro{date+extrayear}}% - -%%--------------------------------------------------------------------------------------------- -% BIBLIOGRAPHY DRIVERS -%%--------------------------------------------------------------------------------------------- -\newbibmacro*{crosslabeltitle}{% +\renewbibmacro*{labeltitle}{% \iffieldundef{label}% - {\iffieldundef{shorttitle} - {\printfield{title}% - \clearfield{title}}% - {\printfield[title]{shorttitle}}}% - {\printtext{\printfield{label}}}} - -\DeclareCiteCommand{\bbx@crossref} - {}% - {\ifuseeditor{\ifthenelse{\value{listtotal}=2} - {\printnames[][-\value{maxnamesincross}]{labelname}} - {\printnames[][-\value{minnamesincross}]{labelname}}} - {\usebibmacro{crosslabeltitle}} - \setunit*{\addspace}% - \printtext{\usebibmacro{crossdate+extrayear}}}% - {}% - {}% - -\DeclareBibliographyDriver{periodical}{% - \usebibmacro{bibindex}% - \usebibmacro{begentry}% - \usebibmacro{editor}% - \ifuseeditor{% trick for entry with ``label'' field - \setunit{\addcomma\space}} - {}\newblock - %\setunit{\labelnamepunct}\newblock - \usebibmacro{title+issuetitle}% - \newunit - \printlist{language}% - \newunit\newblock - \usebibmacro{byeditor}% - \newunit\newblock - \printfield{note}% - \newunit\newblock - \iftoggle{bbx:isbn} - {\printfield{issn}} - {}% - \newunit\newblock - \usebibmacro{doi+eprint+url}% - \newunit\newblock - \usebibmacro{addendum+pubstate}% - \setunit{\bibpagerefpunct}\newblock - \usebibmacro{pageref}% - \usebibmacro{finentry}} - -\DeclareBibliographyDriver{collection}{% - \usebibmacro{bibindex}% - \usebibmacro{begentry}% - \usebibmacro{editor+others}% - \ifuseeditor{% trick for entry with ``label'' field - \setunit{\addcomma\space}} - {}\newblock - \usebibmacro{maintitle+title}% - \newunit - \printlist{language}% - \newunit\newblock - \usebibmacro{byeditor+others}% - \newunit\newblock - \printfield{edition}% - \newunit - \iffieldundef{maintitle} - {\printfield{volume}% - \printfield{part}} - {}% - \newunit - \printfield{volumes}% - \newunit\newblock - \usebibmacro{series+number}% - \newunit\newblock - \printfield{note}% - \newunit\newblock - \usebibmacro{publisher+location+date}% - \newunit\newblock - \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}} - - -\endinput \ No newline at end of file + {\iffieldundef{shorttitle}% + {\printfield{title}% + \clearfield{title}}% + {\printfield[title]{shorttitle}}}% + {\printfield{label}}}% + }{}}% +%% +%% Copyright 2009-2013 by Ivan Valbusa +%% +%% This program is provided under the terms of the +%% LaTeX Project Public License distributed from CTAN +%% archives in directory macros/latex/base/lppl.txt. +%% +%% Author: Ivan Valbusa +%% ivan dot valbusa at univr dot it +%% +%% This work has the LPPL maintenance status "author-maintained". +%% +%% +%% End of file `philosophy-modern.bbx'. -- cgit v1.2.3