summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/biblatex-phys
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2013-01-28 22:54:33 +0000
committerKarl Berry <karl@freefriends.org>2013-01-28 22:54:33 +0000
commitb408bb5e71abeaab64eb560f06d2e2eb562403f1 (patch)
tree98588d40f8bff491638dbeda2c52185052d02dbf /Master/texmf-dist/tex/latex/biblatex-phys
parentf63d8bcfd3e84789de971e7c27ff04ff11ae5c81 (diff)
biblatex-phys 0.9d (27jan13)
git-svn-id: svn://tug.org/texlive/trunk@28972 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/biblatex-phys')
-rw-r--r--Master/texmf-dist/tex/latex/biblatex-phys/phys.bbx151
-rw-r--r--Master/texmf-dist/tex/latex/biblatex-phys/phys.cbx2
2 files changed, 134 insertions, 19 deletions
diff --git a/Master/texmf-dist/tex/latex/biblatex-phys/phys.bbx b/Master/texmf-dist/tex/latex/biblatex-phys/phys.bbx
index 6a7211231c9..c544b798dbb 100644
--- a/Master/texmf-dist/tex/latex/biblatex-phys/phys.bbx
+++ b/Master/texmf-dist/tex/latex/biblatex-phys/phys.bbx
@@ -8,7 +8,7 @@
%% ---------------------------------------------------------------
%%
-\ProvidesFile{phys.bbx}[2013/01/04 v0.9b biblatex bibliography style]
+\ProvidesFile{phys.bbx}[2013/01/27 v0.9d biblatex bibliography style]
% Load the standard style to avoid copy-pasting unnecessary material
\RequireBibliographyStyle{numeric-comp}
@@ -70,6 +70,20 @@
% Custom field formats
\DeclareFieldFormat[inproceedings]{booktitle}{#1}
+\DeclareFieldFormat{eprint:arxiv}{%
+ \ifhyperref
+ {\href{http://arxiv.org/\abx@arxivpath/#1}{%
+ arXiv\addcolon
+ \nolinkurl{#1}%
+ \iffieldundef{eprintclass}
+ {}
+ {\addspace\UrlFont{\mkbibbrackets{\thefield{eprintclass}}}}}}
+ {arXiv\addcolon
+ \nolinkurl{#1}
+ \iffieldundef{eprintclass}
+ {}
+ {\addspace\UrlFont{\mkbibbrackets{\thefield{eprintclass}}}}}}
+\DeclareFieldAlias{eprint:arXiv}{eprint:arxiv}
\DeclareFieldFormat[online]{date}{\mkbibparens{#1}\nopunct}
\DeclareFieldFormat{doi}{%
\ifhyperref
@@ -82,15 +96,7 @@
\iffieldundef{doi}
{%
\iffieldundef{url}
- {
- \iffieldundef{eprint}
- {\@firstofone}
- {
- \iffieldequalstr{eprinttype}{arXiv}
- {\href{http://arxiv.org/\abx@arxivpath/\thefield{eprint}}}
- {\@firstofone}%
- }%
- }
+ {\@firstofone}
{\href{\thefield{url}}}%
}
{\href{http://dx.doi.org/\thefield{doi}}}%
@@ -112,6 +118,7 @@
{\mkbibquote{#1\isdot}}
{}%
}
+\DeclareFieldFormat{related:translatedas}{\mkbibbrackets{#1}}
\DeclareFieldFormat{titlecase}{\MakeSentenceCase{#1}}
\DeclareFieldFormat{url}{\url{#1}}
\DeclareFieldFormat[article]{volume}{\mkbibbold{#1}}
@@ -164,13 +171,15 @@
}
\renewbibmacro*{maintitle+booktitle}{%
- \iffieldundef{maintitle}
- {}
- {%
- \usebibmacro{maintitle}%
- \newunit
- }%
- \usebibmacro{booktitle}%
+ \printtext[doi/url-link]{%
+ \iffieldundef{maintitle}
+ {}
+ {%
+ \usebibmacro{maintitle}%
+ \newunit
+ }%
+ \usebibmacro{booktitle}%
+ }%
\newunit\newblock
\iffieldundef{volume}
{}
@@ -254,9 +263,58 @@
\setunit{\bibpagerefpunct}\newblock
\usebibmacro{pageref}%
\newunit\newblock
+ \usebibmacro{related}%
\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:}%
+ \usebibmacro{bybookauthor}%
+ \setunit*{\addcomma\space}%
+ \usebibmacro{maintitle+booktitle}%
+ \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\newblock
+ \iftoggle{bbx:isbn}
+ {\printfield{isbn}}
+ {}%
+ \newunit\newblock
+ \usebibmacro{doi+eprint+url}%
+ \newunit\newblock
+ \usebibmacro{addendum+pubstate}%
+ \setunit{\bibpagerefpunct}\newblock
+ \usebibmacro{pageref}%
+ \newunit\newblock
+ \usebibmacro{related}%
+ \usebibmacro{finentry}}
+
\DeclareBibliographyDriver{inproceedings}{%
\usebibmacro{bibindex}%
\usebibmacro{begentry}%
@@ -298,6 +356,7 @@
\setunit{\bibpagerefpunct}\newblock
\usebibmacro{pageref}%
\newunit\newblock
+ \usebibmacro{related}%
\usebibmacro{finentry}%
}
@@ -335,6 +394,7 @@
\setunit{\bibpagerefpunct}\newblock
\usebibmacro{pageref}%
\newunit\newblock
+ \usebibmacro{related}%
\usebibmacro{finentry}%
}
@@ -395,7 +455,7 @@
{%
\global\undef\bbx@set@journal
\printtext[journaltitle]{%
- \printfield[titlecase]{journaltitle}%
+ \printfield{journaltitle}%
\setunit{\subtitlepunct}%
\printfield{journalsubtitle}%
}%
@@ -403,6 +463,61 @@
}%
}
+
+% This is the original definition from standard.bbx, but
+% a relatedstring is printed only if it was explicitely defined.
+\newbibmacro*{related}{%
+ \ifboolexpr{
+ not test {\iftoggle{bbx:related}}
+ or
+ test {\iffieldundef{related}}
+ }
+ {}
+ {%
+ \setunit{\addperiod\addspace}%
+ \setcounter{bbx:relatedcount}{0}%
+ \setcounter{bbx:relatedtotal}{0}%
+ \def\do##1{\stepcounter{bbx:relatedtotal}}%
+ \docsvfield{related}%
+ \def\do{%
+ \stepcounter{bbx:relatedcount}%
+ \ifnumgreater{\value{bbx:relatedcount}}{1}
+ {\printtext{\relateddelim}}
+ {}}%
+ \ifbibmacroundef{related:\strfield{relatedtype}}
+ {\appto{\do}{\usebibmacro{related:default}}}
+ {\appto{\do}{\usebibmacro*{related:\strfield{relatedtype}}}}%
+ \iffieldformatundef{related:\strfield{relatedtype}}
+ {\def\bbx@tempa{related}}
+ {\def\bbx@tempa{related:\strfield{relatedtype}}}%
+ \printtext[\bbx@tempa]{%
+ \iffieldundef{relatedstring}
+ {}
+ {\iffieldbibstring{relatedstring}
+ {\printtext{\bibstring{\thefield{relatedstring}}\relatedpunct}}
+ {\printtext{\printfield{relatedstring}\relatedpunct}}}%
+ \docsvfield{related}}}}
+
+\newbibmacro*{related:translatedas}[1]{%
+ \entrydata{#1}{%
+ \usebibmacro{journal+issuetitle}%
+ \newunit
+ \usebibmacro{note+pages}%
+ \newunit\newblock
+ \setunit{\addspace}%
+ \printfield{year}%
+ \setunit{\addspace}%
+ \iffieldundef{pages}
+ {%
+ \printfield{doi}%
+ \clearfield{doi}%
+ }%
+ {}%
+ \usebibmacro{doi+eprint+url}%
+ }%
+}
+
+
%%
%% Copyright (C) 2012,2013 by
%% Joseph Wright <joseph.wright@morningstar2.co.uk>
diff --git a/Master/texmf-dist/tex/latex/biblatex-phys/phys.cbx b/Master/texmf-dist/tex/latex/biblatex-phys/phys.cbx
index 79922f5f4d2..748e57a28c6 100644
--- a/Master/texmf-dist/tex/latex/biblatex-phys/phys.cbx
+++ b/Master/texmf-dist/tex/latex/biblatex-phys/phys.cbx
@@ -8,7 +8,7 @@
%% ---------------------------------------------------------------
%%
-\ProvidesFile{phys.cbx}[2013/01/22 v0.9c biblatex citation style]
+\ProvidesFile{phys.cbx}[2013/01/27 v0.9d biblatex citation style]
\RequireCitationStyle{numeric-comp}