summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/biblatex-phys
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2012-07-14 23:30:42 +0000
committerKarl Berry <karl@freefriends.org>2012-07-14 23:30:42 +0000
commitcc9fc8c1031222ff0f0899b0119f8166de180e37 (patch)
tree14e7766b61c8b17226fa3a56214db816976712dc /Master/texmf-dist/tex/latex/biblatex-phys
parent9c45fe88cb4094081b2b1243cd17bcc43439c041 (diff)
new package biblatex-phys 0.9 (12jul12)
git-svn-id: svn://tug.org/texlive/trunk@27058 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.bbx409
-rw-r--r--Master/texmf-dist/tex/latex/biblatex-phys/phys.cbx43
2 files changed, 452 insertions, 0 deletions
diff --git a/Master/texmf-dist/tex/latex/biblatex-phys/phys.bbx b/Master/texmf-dist/tex/latex/biblatex-phys/phys.bbx
new file mode 100644
index 00000000000..037202ccd4c
--- /dev/null
+++ b/Master/texmf-dist/tex/latex/biblatex-phys/phys.bbx
@@ -0,0 +1,409 @@
+%% ---------------------------------------------------------------
+%% biblatex-phys --- A biblatex implementation of the AIP and APS
+%% bibliography style
+%% Maintained by Joseph Wright
+%% E-mail: joseph.wright@morningstar2.co.uk
+%% Released under the LaTeX Project Public License v1.3c or later
+%% See http://www.latex-project.org/lppl.txt
+%% ---------------------------------------------------------------
+%%
+
+\ProvidesFile{phys.bbx}[2012/07/12 v0.9 biblatex bibliography style]
+
+% Load the standard style to avoid copy-pasting unnecessary material
+\RequireBibliographyStyle{numeric-comp}
+
+% New options
+\newtoggle{bbx:articletitle}
+\newtoggle{bbx:chaptertitle}
+\newtoggle{bbx:pageranges}
+\DeclareBibliographyOption{articletitle}[true]{%
+ \settoggle{bbx:articletitle}{#1}%
+}
+\DeclareBibliographyOption{chaptertitle}[true]{%
+ \settoggle{bbx:chaptertitle}{#1}%
+}
+\DeclareBibliographyOption{pageranges}[true]{%
+ \settoggle{bbx:pageranges}{#1}%
+}
+\DeclareBibliographyOption{biblabel}{%
+ \ifstrequal{#1}{brackets}
+ {%
+ \DeclareFieldFormat{labelnumberwidth}{\mkbibbrackets{##1}}%
+ \setlength{\biblabelsep}{10 pt}%
+ }
+ {%
+ \DeclareFieldFormat{labelnumberwidth}{\mkbibsuperscript{##1}}%
+ \setlength{\biblabelsep}{0 pt}%
+ }%
+}
+
+% Alter settings that carry through from biblatex
+\ExecuteBibliographyOptions
+ {
+ articletitle = true ,
+ chaptertitle = true ,
+ biblabel = superscript,
+ doi = false ,
+ eprint = false ,
+ firstinits = true ,
+ isbn = false ,
+ maxnames = 999 ,
+ maxcitenames = 2 ,
+ pageranges = true ,
+ url = false
+ }
+
+% Modify the name format
+\DeclareNameFormat{default}{%
+ \usebibmacro{name:first-last}{#1}{#4}{#5}{#7}%
+ \usebibmacro{name:andothers}%
+}
+
+\renewbibmacro*{name:first-last}[4]{%
+ \usebibmacro{name:delim}{#2#3#1}%
+ \usebibmacro{name:hook}{#2#3#1}%
+ \ifblank{#2}{}{\mkbibnamefirst{#2}\isdot\bibnamedelimd}%
+ \ifblank{#3}{}{%
+ \mkbibnameprefix{#3}\isdot
+ \ifpunctmark{'}
+ {}
+ {\ifuseprefix{\bibnamedelimc}{\bibnamedelimd}}}%
+ \mkbibnamelast{#1}\isdot
+ \ifblank{#4}{}
+ {\addcomma\space\mkbibnameaffix{#4}\isdot}%
+}
+
+% Custom field formats
+\DeclareFieldFormat[inproceedings]{booktitle}{#1}
+\DeclareFieldFormat[online]{date}{\mkbibparens{#1}\nopunct}
+\DeclareFieldFormat{doi}{%
+ \ifhyperref
+ {\href{http://dx.doi.org/#1}{\nolinkurl{#1}}}
+ {\nolinkurl{#1}}%
+}
+\DeclareFieldFormat{journaltitle}{#1\isdot}
+\DeclareFieldFormat[article]{pages}{%
+ \iftoggle{bbx:pageranges}{#1}{\mkfirstpage{#1}}%
+}
+\DeclareFieldFormat[article,inproceedings,patent]{title}{%
+ \iftoggle{bbx:articletitle}
+ {\mkbibquote{#1\isdot}}
+ {}%
+}
+\DeclareFieldFormat[incollection]{title}{%
+ \iftoggle{bbx:chaptertitle}
+ {\mkbibquote{#1\isdot}}
+ {}%
+}
+\DeclareFieldFormat{url}{\url{#1}}
+\DeclareFieldFormat[article]{volume}{\mkbibbold{#1}}
+\DeclareFieldFormat{year}{\mkbibparens{#1}}
+
+% Simple modifications to punctuation, etc.
+\renewcommand*{\intitlepunct}{\addspace}
+\renewcommand*{\newunitpunct}{\addcomma\space}
+
+% Bibliography strings
+\DefineBibliographyStrings{english}{%
+ byeditor = edited by,
+ chapter = Chap\adddot,
+ volume = Vol\adddot
+}
+
+% Bibliography macros
+\renewbibmacro*{chapter+pages}{%
+ \setunit{\addspace}%
+ \printfield{chapter}%
+ \setunit{\bibpagespunct}%
+ \printfield{pages}%
+ \newunit
+}
+
+\renewbibmacro*{institution+location+date}{%
+ \setunit{\addspace}%
+ \printtext[parens]{%
+ \printlist{institution}%
+ \newunit
+ \printlist{location}%
+ \newunit
+ \usebibmacro{date}%
+ }%
+}
+
+\renewbibmacro*{journal+issuetitle}{%
+ \usebibmacro{journal}%
+ \setunit*{\addspace}%
+ \iffieldundef{series}
+ {}
+ {\newunit
+ \printfield{series}%
+ \setunit{\addspace}}%
+ \usebibmacro{volume+number+eid}%
+ \setunit{\addspace}%
+ \usebibmacro{issue}%
+ \newunit
+}
+
+\renewbibmacro*{maintitle+booktitle}{%
+ \iffieldundef{maintitle}
+ {}
+ {%
+ \usebibmacro{maintitle}%
+ \newunit
+ }%
+ \usebibmacro{booktitle}%
+ \newunit\newblock
+ \iffieldundef{volume}
+ {}
+ {%
+ \printfield{volume}%
+ \clearfield{volume}%
+ \printfield{part}%
+ \clearfield{part}%
+ }%
+ \newunit
+}
+
+\newbibmacro*{organization+date}{%
+ \setunit{\addspace}%
+ \printtext[parens]{%
+ \printlist{organization}%
+ \newunit
+ \usebibmacro{date}%
+ }%
+ \newunit
+}
+
+\renewbibmacro*{publisher+location+date}{%
+ \setunit{\addspace}%
+ \printtext[parens]{%
+ \printlist{publisher}%
+ \newunit
+ \printlist{location}%
+ \newunit
+ \usebibmacro{date}%
+ }%
+ \newunit
+}
+
+\renewbibmacro*{volume+number+eid}{%
+ \printfield{volume}%
+ \newunit
+ \printfield{eid}%
+}
+
+% New bibliography drivers, using the required order of fields. These
+% are mainly copied from standard.bbx then modified.
+\DeclareBibliographyDriver{article}{%
+ \usebibmacro{bibindex}%
+ \usebibmacro{begentry}%
+ \usebibmacro{author/translator+others}%
+ \setunit{\labelnamepunct}\newblock
+ \usebibmacro{title}%
+ \newunit
+ \printlist{language}%
+ \newunit\newblock
+ \usebibmacro{byauthor}%
+ \newunit\newblock
+ \usebibmacro{bytranslator+others}%
+ \newunit\newblock
+ \printfield{version}%
+ \newunit\newblock
+ \usebibmacro{journal+issuetitle}%
+ \newunit
+ \usebibmacro{byeditor+others}%
+ \newunit
+ \usebibmacro{note+pages}%
+ \newunit\newblock
+ \iftoggle{bbx:isbn}
+ {\printfield{issn}}
+ {}%
+ \newunit\newblock
+ \usebibmacro{doi+eprint+url}%
+ \setunit{\addspace}%
+ \printfield{year}%
+ \newunit\newblock
+ \iffieldundef{pages}
+ {%
+ \iftoggle{bbx:doi}
+ {}
+ {\printfield{doi}}%
+ }
+ {}%
+ \newunit\newblock
+ \usebibmacro{addendum+pubstate}%
+ \setunit{\bibpagerefpunct}\newblock
+ \usebibmacro{pageref}%
+ \newunit\newblock
+ \usebibmacro{finentry}%
+}
+
+\DeclareBibliographyDriver{inproceedings}{%
+ \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{maintitle+booktitle}%
+ \newunit\newblock
+ \usebibmacro{byeditor+others}%
+ \newunit\newblock
+ \iffieldundef{maintitle}
+ {\printfield{volume}%
+ \printfield{part}}
+ {}%
+ \newunit
+ \printfield{volumes}%
+ \newunit\newblock
+ \usebibmacro{series+number}%
+ \newunit\newblock
+ \printfield{note}%
+ \newunit\newblock
+ \usebibmacro{organization+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{finentry}%
+}
+
+\DeclareBibliographyDriver{patent}{%
+ \usebibmacro{bibindex}%
+ \usebibmacro{begentry}%
+ \usebibmacro{author}%
+ \setunit{\labelnamepunct}\newblock
+ \usebibmacro{title}%
+ \newunit
+ \printlist{language}%
+ \newunit\newblock
+ \usebibmacro{byauthor}%
+ \newunit\newblock
+ \printfield{type}%
+ \setunit*{\addspace}%
+ \printfield{number}%
+ \iflistundef{location}
+ {}
+ {\setunit*{\addspace}%
+ \printtext[parens]{%
+ \printlist[][-\value{listtotal}]{location}}}%
+ \setunit{\addspace}%
+ \printtext[parens]{%
+ \usebibmacro{byholder}%
+ \newunit
+ \usebibmacro{date}%
+ }%
+ \newunit\newblock
+ \printfield{note}%
+ \newunit\newblock
+ \usebibmacro{doi+eprint+url}%
+ \newunit\newblock
+ \usebibmacro{addendum+pubstate}%
+ \setunit{\bibpagerefpunct}\newblock
+ \usebibmacro{pageref}%
+ \newunit\newblock
+ \usebibmacro{finentry}%
+}
+
+% Deal with repeated names or journals in entry sets: based on
+% http://tex.stackexchange.com/a/63013
+\DeclareBibliographyDriver{set}{%
+ \entryset
+ {%
+ \ifbool{bbx:subentry}
+ {\printfield[bibentrysetcount]{entrysetcount}%
+ \setunit*{\addnbspace}}
+ {}%
+ }
+ {%
+ \ifnumequal{\thefield{entrysetcount}}{1}
+ {%
+ \savefield{journaltitle}{\bbx@set@journal}%
+ \savefield{namehash}{\bbx@set@namehash}%
+ }
+ {}%
+ }%
+ \newunit\newblock
+ \usebibmacro{setpageref}%
+ \finentry
+ \global\undef\bbx@set@namehash
+ \global\undef\bbx@set@journal
+}
+
+\renewbibmacro*{author}{%
+ \ifboolexpr{
+ test \ifuseauthor
+ and
+ not test {\ifnameundef{author}}
+ }
+ {%
+ \iffieldequals{namehash}{\bbx@set@namehash}
+ {\nopunct}
+ {%
+ \global\undef\bbx@set@namehash
+ \printnames{author}%
+ \iffieldundef{authortype}
+ {}
+ {%
+ \setunit{\addcomma\space}%
+ \usebibmacro{authorstrg}%
+ }%
+ }%
+ }
+ {}%
+}
+
+\renewbibmacro*{journal}{%
+ \iffieldundef{journaltitle}
+ {}
+ {%
+ \iffieldequals{journaltitle}{\bbx@set@journal}
+ {\bibstring[\mkibid]{ibidem}}
+ {%
+ \global\undef\bbx@set@journal
+ \printtext[journaltitle]{%
+ \printfield[titlecase]{journaltitle}%
+ \setunit{\subtitlepunct}%
+ \printfield{journalsubtitle}%
+ }%
+ }%
+ }%
+}
+
+%%
+%% Copyright (C) 2012 by
+%% Joseph Wright <joseph.wright@morningstar2.co.uk>
+%%
+%% It may be distributed and/or modified under the conditions of
+%% the LaTeX Project Public License (LPPL), either version 1.3c of
+%% this license or (at your option) any later version. The latest
+%% version of this license is in the file:
+%%
+%% http://www.latex-project.org/lppl.txt
+%%
+%% This work is "maintained" (as per LPPL maintenance status) by
+%% Joseph Wright.
+%%
+%% This work consists of the files biblatex-phys.bib,
+%% biblatex-phys.tex,
+%% phys.bbx and
+%% phys.cbx,
+%% and the derived file biblatex-phys.pdf.
+%%
+%%
+%% End of file `phys.bbx'. \ No newline at end of file
diff --git a/Master/texmf-dist/tex/latex/biblatex-phys/phys.cbx b/Master/texmf-dist/tex/latex/biblatex-phys/phys.cbx
new file mode 100644
index 00000000000..84a0ed9b009
--- /dev/null
+++ b/Master/texmf-dist/tex/latex/biblatex-phys/phys.cbx
@@ -0,0 +1,43 @@
+%% ---------------------------------------------------------------
+%% biblatex-phys --- A biblatex implementation of the AIP and APS
+%% bibliography style
+%% Maintained by Joseph Wright
+%% E-mail: joseph.wright@morningstar2.co.uk
+%% Released under the LaTeX Project Public License v1.3c or later
+%% See http://www.latex-project.org/lppl.txt
+%% ---------------------------------------------------------------
+%%
+
+\ProvidesFile{phys.cbx}[2012/07/12 v0.9 biblatex citation style]
+
+\RequireCitationStyle{numeric-comp}
+
+\ExecuteBibliographyOptions
+ {
+ autocite = superscript,
+ autopunct = false ,
+ sorting = none
+ }
+
+%%
+%% Copyright (C) 2012 by
+%% Joseph Wright <joseph.wright@morningstar2.co.uk>
+%%
+%% It may be distributed and/or modified under the conditions of
+%% the LaTeX Project Public License (LPPL), either version 1.3c of
+%% this license or (at your option) any later version. The latest
+%% version of this license is in the file:
+%%
+%% http://www.latex-project.org/lppl.txt
+%%
+%% This work is "maintained" (as per LPPL maintenance status) by
+%% Joseph Wright.
+%%
+%% This work consists of the files biblatex-phys.bib,
+%% biblatex-phys.tex,
+%% phys.bbx and
+%% phys.cbx,
+%% and the derived file biblatex-phys.pdf.
+%%
+%%
+%% End of file `phys.cbx'.