%% --------------------------------------------------------------- %% biblatex-chem --- A set of biblatex implementations of %% chemistry-related bibliography styles %% 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{chem-biochem.bbx}[2013/10/09 v1.1l 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}{plain} {\DeclareFieldFormat{labelnumberwidth}{##1}} {% \ifstrequal{#1}{brackets} {\DeclareFieldFormat{labelnumberwidth}{\mkbibbrackets{##1}}}% {% \ifstrequal{#1}{dot} {\DeclareFieldFormat{labelnumberwidth}{##1\adddot\midsentence}} {\DeclareFieldFormat{labelnumberwidth}{\mkbibparens{##1}}}% }% }% } % Alter settings that carry through from biblatex \ExecuteBibliographyOptions { articletitle = true , doi = false , eprint = false , firstinits = true , isbn = false , maxnames = 15 , maxcitenames = 2 , pageranges = true , url = false , urldate = long , useprefix = true } % Modify the name format \DeclareNameFormat{default}{% \usebibmacro{name:last-first}{#1}{#4}{#5}{#7}% \usebibmacro{name:andothers}% } % Custom field formats \DeclareFieldFormat{doi}{% DOI\addcolon\space \ifhyperref {\href{http://dx.doi.org/#1}{\nolinkurl{#1}}} {\nolinkurl{#1}}% } \DeclareFieldFormat{labelnumberwidth}{\mkbibparens{#1}} \DeclareFieldFormat[article]{pages}{% \iftoggle{bbx:pageranges}{#1}{\mkfirstpage{#1}}% } \DeclareFieldFormat*{title}{#1\adddot} \DeclareFieldFormat[book, collection, inproceedings]{title}{\mkbibemph{#1}} \DeclareFieldFormat{url}{\url{#1}} \DeclareFieldFormat[article]{volume}{\mkbibemph{#1}} % Simple modifications to punctuation, etc. \renewcommand*{\finalnamedelim}{% \finalandcomma \addspace \bibstring{and}% \space } \renewcommand*{\intitlepunct}{\addspace} \renewcommand*{\labelnamepunct}{\addspace} \renewcommand*{\mkbibnameaffix}[1]{\addcomma\addspace#1} \renewcommand*{\newunitpunct}{\addcomma\addspace} % Bibliography strings \DefineBibliographyStrings{english}{% chapter = Chapter , editor = Ed\adddot , editors = Eds\adddot , in = In , page = p , pages = pp , patentus = US Patent , phdthesis = Ph.D.\space Thesis , urlseen = accessed , volume = Vol\adddot } % Bibliography macros \renewbibmacro*{byholder}{% \ifnameundef{holder} {} {% \printtext[parens]{\printnames{holder}}% \adddot }% } \renewbibmacro*{event+venue+date}{% \printfield{eventtitle}% \ifboolexpr{ test {\iffieldundef{venue}} and test {\iffieldundef{eventyear}} } {} {% \printfield{venue}% \newunit \printeventdate \newunit }% } \renewbibmacro*{journal+issuetitle}{% \usebibmacro{journal}% \setunit*{\addspace}% \usebibmacro{volume+number+eid}% \newunit } \renewbibmacro*{maintitle+booktitle}{% \iffieldundef{maintitle} {} {% \usebibmacro{maintitle}% \newunit\newblock }% \usebibmacro{booktitle}% \newunit } \renewbibmacro*{maintitle+title}{% \iffieldsequal{maintitle}{title} {% \clearfield{maintitle}% \clearfield{mainsubtitle}% \clearfield{maintitleaddon}% } {% \iffieldundef{maintitle} {} {\usebibmacro{maintitle}}% \newunit\newblock }% \usebibmacro{title}% \newunit } \renewbibmacro*{name:last-first}[4]{% \ifuseprefix {\usebibmacro{name:delim}{#3#1}% \usebibmacro{name:hook}{#3#1}% \ifblank{#3}{} {\mkbibnameprefix{#3\isdot}% \ifpunctmark{'}{}{\addhighpenspace}}% \mkbibnamelast{#1\isdot}% \ifblank{#2}{} {\addcomma\addlowpenspace \mkbibnamefirst{#2}\isdot}% \ifblank{#4}{} {\addlowpenspace \mkbibnameaffix{#4}\isdot}} {\usebibmacro{name:delim}{#1}% \usebibmacro{name:hook}{#1}% \mkbibnamelast{#1}\isdot \ifblank{#2#3}{}{\addcomma}% \ifblank{#2}{} {\addlowpenspace \mkbibnamefirst{#2}\isdot}% \ifblank{#3}{} {\addlowpenspace \mkbibnameprefix{#3}\isdot}% \ifblank{#4}{} {\addlowpenspace \mkbibnameaffix{#4}\isdot}}% } \renewbibmacro*{note+pages}{% \printfield{note}% \setunit{\bibpagespunct}% \printfield{pages}% \iffieldundef{pages} {% \printfield{doi}% \clearfield{doi}% }% {% \iftoggle{bbx:doi} {} {\clearfield{doi}}% }% } \renewbibmacro*{publisher+location+date}{% \printlist{publisher}% \iflistundef{publisher} {\newunit} {\setunit*{\addcolon\space}}% \printlist{location}% \setunit*{\addcomma\space}% \usebibmacro{date}% \newunit } \renewbibmacro*{related}{% \ifboolexpr{ not test {\iftoggle{bbx:related}} or test {\iffieldundef{related}} } {} {% \setunit{\addsemicolon\space}% \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} {\ifboolexpr{ test {\ifnumgreater{\value{bbx:relatedtotal}}{1}} and test {\ifbibxstring{\thefield{relatedtype}s}} } {\printtext{\bibstring{\thefield{relatedtype}s}\relatedpunct}} {\iffieldbibstring{relatedtype} {\printtext{\bibstring{\thefield{relatedtype}}\relatedpunct}} {}}} {\iffieldbibstring{relatedstring} {\printtext{\bibstring{\thefield{relatedstring}}\relatedpunct}} {\printtext{\printfield{relatedstring}\relatedpunct}}}% \docsvfield{related}}}} \newbibmacro*{related:translatedas}[1]{% \entrydata{#1}{% \usebibmacro{journal+issuetitle}% \newunit \usebibmacro{byeditor+others}% \newunit \usebibmacro{note+pages}% \newunit\newblock \iftoggle{bbx:isbn} {\printfield{issn}} {}% \newunit\newblock \usebibmacro{doi+eprint+url}% }% } \renewbibmacro*{series+number}{% \printfield{series}% \setunit*{\addspace}% \printfield{number}% \newunit \iffieldundef{series} {} {% \printfield{volume}% \clearfield{volume}% \newunit }% } \renewbibmacro*{volume+number+eid}{% \printfield{volume}% \setunit*{\addspace}% \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 \iffieldundef{year} {} {% \printtext[parens]{\usebibmacro{date}}% \setunit{\adddot\space}% }% \iftoggle{bbx:articletitle} {% \usebibmacro{title}% \newunit } {}% \printlist{language}% \newunit\newblock \usebibmacro{byauthor}% \newunit\newblock \usebibmacro{bytranslator+others}% \newunit\newblock \printfield{version}% \setunit{\addspace}% \usebibmacro{journal+issuetitle}% \newunit \usebibmacro{byeditor+others}% \newunit \usebibmacro{note+pages}% \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{book}{% \usebibmacro{bibindex}% \usebibmacro{begentry}% \usebibmacro{author/translator+others}% \setunit{\labelnamepunct}\newblock \usebibmacro{maintitle+title}% \newunit \printlist{language}% \newunit\newblock \printfield{edition}% \newunit \printfield{volumes}% \newunit\newblock \usebibmacro{byauthor}% \setunit{\addsemicolon\space}% \usebibmacro{editor+others}% \setunit{\addsemicolon\space}% \usebibmacro{series+number}% \newunit\newblock \printfield{note}% \setunit{\addsemicolon\space}% \usebibmacro{publisher+location+date}% \setunit{\addsemicolon\space}% \printfield{volume}% \setunit{\addsemicolon\space}% \usebibmacro{chapter+pages}% \setunit{\addsemicolon\space}% \printfield{pagetotal}% \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{booklet}{% \usebibmacro{bibindex}% \usebibmacro{begentry}% \usebibmacro{author/editor+others/translator+others}% \setunit{\labelnamepunct}\newblock \usebibmacro{title}% \newunit \printlist{language}% \newunit\newblock \usebibmacro{byauthor}% \newunit\newblock \usebibmacro{byeditor+others}% \newunit\newblock \printfield{howpublished}% \newunit\newblock \printfield{type}% \newunit\newblock \printfield{note}% \setunit{\addsemicolon\space}% \usebibmacro{location+date}% \setunit{\addsemicolon\space}% \printfield{volume}% \setunit{\addsemicolon\space}% \usebibmacro{chapter+pages}% \newunit \printfield{pagetotal}% \newunit\newblock \usebibmacro{doi+eprint+url}% \newunit\newblock \usebibmacro{addendum+pubstate}% \setunit{\bibpagerefpunct}\newblock \usebibmacro{pageref}% \newunit\newblock \usebibmacro{related}% \usebibmacro{finentry}% } \DeclareBibliographyDriver{collection}{% \usebibmacro{bibindex}% \usebibmacro{begentry}% \usebibmacro{maintitle+title}% \newunit \printfield{edition}% \newunit \printfield{volumes}% \newunit \printlist{language}% \setunit{\addsemicolon\space}% \usebibmacro{editor+others}% \newunit\newblock \setunit{\addsemicolon\space}% \usebibmacro{series+number}% \newunit\newblock \printfield{note}% \setunit{\addsemicolon\space}% \usebibmacro{publisher+location+date}% \setunit{\addsemicolon\space}% \printfield{volume} \setunit{\addsemicolon\space}% \usebibmacro{chapter+pages}% \newunit \printfield{pagetotal}% \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{inbook}{% \usebibmacro{bibindex}% \usebibmacro{begentry}% \usebibmacro{author/translator+others}% \setunit{\labelnamepunct}\newblock \printlist{language}% \newunit\newblock \usebibmacro{byauthor}% \newunit \iftoggle{bbx:chaptertitle} {\usebibmacro{title}} {}% \setunit{\addspace}% \usebibmacro{in:}% \usebibmacro{bybookauthor}% \setunit{\addspace}% \usebibmacro{maintitle+booktitle}% \newunit\newblock \usebibmacro{editor+others}% \newunit\newblock \printfield{edition}% \newunit \printfield{volumes}% \setunit{\addsemicolon\space}% \usebibmacro{series+number}% \newunit\newblock \printfield{note}% \setunit{\addsemicolon\space}% \usebibmacro{publisher+location+date}% \setunit{\addsemicolon\space}% \printfield{colume}% \setunit{\addsemicolon\space}% \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{incollection}{% \usebibmacro{bibindex}% \usebibmacro{begentry}% \usebibmacro{author/translator+others}% \setunit{\labelnamepunct}\newblock \printlist{language}% \newunit\newblock \usebibmacro{byauthor}% \newunit \iftoggle{bbx:chaptertitle} {\usebibmacro{title}} {}% \setunit{\addspace}% \usebibmacro{in:}% \usebibmacro{maintitle+booktitle}% \newunit\newblock \usebibmacro{editor+others}% \newunit\newblock \printfield{edition}% \newunit \printfield{volumes}% \setunit{\addsemicolon\space}% \usebibmacro{series+number}% \newunit\newblock \printfield{note}% \setunit{\addsemicolon\space}% \usebibmacro{publisher+location+date}% \setunit{\addsemicolon\space}% \printfield{volume}% \setunit{\addsemicolon\space}% \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}% \usebibmacro{author/translator+others}% \setunit{\labelnamepunct}\newblock \printlist{language}% \newunit\newblock \usebibmacro{byauthor}% \setunit{\addspace}% \usebibmacro{in:}% \usebibmacro{maintitle+booktitle}% \newunit\newblock \usebibmacro{event+venue+date}% \newunit\newblock \usebibmacro{byeditor+others}% \newunit\newblock \printfield{volumes}% \setunit{\addsemicolon\space}% \printfield{note}% \newunit\newblock \usebibmacro{publisher+location+date}% \setunit{\addsemicolon\space}% \printfield{volume}% \setunit{\addsemicolon\space}% \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{manual}{% \usebibmacro{bibindex}% \usebibmacro{begentry}% \usebibmacro{author/editor}% \setunit{\labelnamepunct}\newblock \usebibmacro{title}% \newunit \printlist{language}% \newunit\newblock \usebibmacro{byauthor}% \newunit\newblock \usebibmacro{byeditor}% \newunit\newblock \printfield{edition}% \newunit\newblock \usebibmacro{series+number}% \newunit\newblock \printfield{type}% \newunit \printfield{version}% \newunit \printfield{note}% \setunit{\addsemicolon\space}% \printlist{organization}% \newunit \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}% \setunit{\bibpagerefpunct}\newblock \usebibmacro{pageref}% \newunit\newblock \usebibmacro{related}% \usebibmacro{finentry}% } \DeclareBibliographyDriver{online}{% \usebibmacro{bibindex}% \usebibmacro{begentry}% \usebibmacro{author/editor+others/translator+others}% \setunit{\labelnamepunct}\newblock \usebibmacro{title}% \newunit \printlist{language}% \newunit\newblock \usebibmacro{byauthor}% \newunit\newblock \usebibmacro{byeditor+others}% \newunit\newblock \printfield{version}% \newunit \printfield{note}% \newunit\newblock \printlist{organization}% \newunit\newblock \iftoggle{bbx:eprint} {\usebibmacro{eprint}} {}% \newunit\newblock \usebibmacro{url+urldate}% \newunit\newblock \usebibmacro{addendum+pubstate}% \setunit{\bibpagerefpunct}\newblock \usebibmacro{pageref}% \newunit\newblock \usebibmacro{related}% \usebibmacro{finentry}% } \DeclareBibliographyDriver{patent}{% \usebibmacro{bibindex}% \usebibmacro{begentry}% \usebibmacro{author}% \setunit{\addspace}% \usebibmacro{byholder}% \setunit{\labelnamepunct}\newblock \usebibmacro{title}% \newunit \printlist{language}% \newunit\newblock \usebibmacro{byauthor}% \setunit{\addspace}% \printfield{type}% \newunit \printfield{number}% \iflistundef{location} {} {\setunit*{\addspace}% \printtext[parens]{% \printlist[][-\value{listtotal}]{location}}}% \newunit\newblock \newunit\newblock \printfield{note}% \newunit\newblock \usebibmacro{date}% \newunit\newblock \usebibmacro{doi+eprint+url}% \newunit\newblock \usebibmacro{addendum+pubstate}% \setunit{\bibpagerefpunct}\newblock \usebibmacro{pageref}% \newunit\newblock \usebibmacro{related}% \usebibmacro{finentry}% } %% %% Copyright (C) 2010-2013 by %% Joseph Wright %% %% 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-chem.bib, %% biblatex-chem.tex, %% biblatex-chem-acs.tex, %% biblatex-chem-angew.tex, %% biblatex-chem-biochem.tex, %% biblatex-chem-rsc.tex, %% chem-acs.bbx, %% chem-acs.cbx, %% chem-angew.bbx, %% chem-angew.cbx, %% chem-biochem.bbx, %% chem-biochem.cbx, %% chem-rsc.bbx and %% chem-rsc.cbx, %% and the derived files biblatex-chem.pdf, %% biblatex-chem-acs.pdf, %% biblatex-chem-angew.pdf, %% biblatex-chem-biochem.pdf and %% biblatex-chem-rsc.pdf. %% %% %% End of file `chem-biochem.bbx'.