3

I have the following:

enter image description here

Is it a good Idea to merge the

Iss. 1 number in [6] to 76(1)

(such that is is more consistent with [7]) or is that no good citation style?

So I like to replace the number with the issue if and only if there is no number defined? Is that possible?

With the following setting:

\usepackage[
        backend=biber,
        %citestyle = alphabetic, 
        %bibstyle = ieee-alphabetic,  
        sortlocale=en_US,
        sorting=nyt,
        backref=true,
        hyperref=true,
        firstinits=true,
        style=numeric,%style=alphabetic,
        defernumbers=true,
        isbn=false,
        %eid=true,
        doi=true,
        %series=true,
        eprint=false,
        bibencoding = utf8
]{biblatex}

\renewcommand*{\mkbibnamefirst}[1]{\textsc{#1}}
\renewcommand*{\mkbibnamelast}[1]{\textsc{#1}}
\renewcommand*{\mkbibnameprefix}[1]{\textsc{#1}}
\renewcommand*{\mkbibnameaffix}[1]{\textsc{#1}}

\DeclareFieldFormat{eid}{Art.\addnbspace#1}
\DeclareFieldFormat{issue}{Iss.\addnbspace#1}
\DeclareFieldFormat{volume}{Vol.\addnbspace#1}

\DeclareFieldFormat[article]{number}{\mkbibparens{#1}}

\AtEveryBibitem{%
  \ifentrytype{article}{%
    \clearfield{month}%
    \clearfield{day}%+
  }{%
  }%
}

% http://tex.stackexchange.com/questions/154864/biblatex-use-doi-only-if-there-is-no-url
% only URL if no DOI otherwise DOI
\renewbibmacro*{doi+eprint+url}{%
    \iftoggle{bbx:doi}
    {\printfield{doi}}
    {}%
    \newunit\newblock
    \iftoggle{bbx:eprint}
    {\usebibmacro{eprint}}
    {}%
    \newunit\newblock
    \iftoggle{bbx:url}
    {\iffieldundef{doi}{\usebibmacro{url+urldate}}{}}
    {}}

\renewbibmacro*{publisher+location+date}{%
    \printlist{publisher}%
    \setunit*{\addcomma\space}%
    \printlist{location}%
    \setunit*{\addcomma\space}%
    \usebibmacro{date}%
    \newunit
}
\renewbibmacro*{institution+location+date}{%
    \printlist{institution}%
    \setunit*{\addcomma\space}%
    \printlist{location}%
    \setunit*{\addcomma\space}%
    \usebibmacro{date}%
    \newunit
}
\renewbibmacro*{organization+location+date}{%
    \printlist{institution}%
    \setunit*{\addcomma\space}%
    \printlist{location}%
    \setunit*{\addcomma\space}%
    \usebibmacro{date}%
    \newunit
}

% makes volume of journal bold and adds colon
\DeclareFieldFormat[article]{volume}{\textbf{#1}}
  • 1
    In biblatex-speak the issue is used for "Summer"/"Spring" etc. designations instead of numbers (for which we should use number). So you should probably make your .bib file conform to this rule. You can of course let Biber do that for you if you want. – moewe Jan 18 '16 at 10:17
  • ahh thanks!, how to do this, with biber? – Gabriel Jan 18 '16 at 11:34
8

The biblatex documentation has the following to say about the issue field (p. 19):

The issue of a journal. This field is intended for journals whose individual issues are identified by a designation such as ‘Spring’ or ‘Summer’ rather than the month or a number. Since the placement of issue is similar to month and number, this field may also be useful with double issues and other special cases.

So you should use the number field in this case

@article{PhysRevE.76.011301,
  title = {Force transmission in a packing of pentagonal particles},
  author = {Azéma, Emilien and Radjaï, Farhang and Peyroux, Robert and Saussine, Gilles},
  journal = {Phys. Rev. E},
  volume = {76},
  number = {1},
  pages = {011301},
  date = {2007-07},
  doi = {10.1103/PhysRevE.76.011301},
}

If you cannot do that (you should really, though) you can use Biber's sourcemapping to do that for you

\DeclareSourcemap{
  \maps[datatype=bibtex]{
    \map{
      \step[fieldsource=issue, match=\regexp{\A(\d+)\Z}, final]
      \step[fieldset=number, fieldvalue={$1}]
      \step[fieldset=issue, null]
    }
  }
}

This copies the issue to the number field if the former contains only digits and then deletes the issue field.

MWE

\documentclass[british]{article}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage{babel}
\usepackage{csquotes}
\usepackage[backend=biber]{biblatex}

\usepackage{filecontents}
\begin{filecontents*}{\jobname.bib}
@article{PhysRevE.76.011301,
  title = {Force transmission in a packing of pentagonal particles},
  author = {Azéma, Emilien and Radjaï, Farhang and Peyroux, Robert and Saussine, Gilles},
  journal = {Phys. Rev. E},
  volume = {76},
  issue = {1},
  pages = {011301},
  date = {2007-07},
  doi = {10.1103/PhysRevE.76.011301},
}
@article{PhysRevE.86.031303,
  title = {Discrete simulation of dense flows of polyhedral grains down a rough inclined plane},
  author = {Azéma, Emilien and Descantes, Yannick and Roquet, Nicolas and Roux, Jean-Noël and Chevoir, François},
  journal = {Phys. Rev. E},
  volume = {86},
  number = {3},
  pages = {031303},
  date = {2012-06},
  doi = {10.1103/PhysRevE.86.031303},
}
\end{filecontents*}

\addbibresource{\jobname.bib}

\DeclareSourcemap{
  \maps[datatype=bibtex]{
    \map{
      \step[fieldsource=issue, match=\regexp{\A(\d+)\Z}, final]
      \step[fieldset=number, fieldvalue={$1}]
      \step[fieldset=issue, null]
    }
  }
}

\begin{document}
\nocite{*}
\printbibliography
\end{document}
  • aw men, this is crazy awesome, appreciate you showed how to do this! – Gabriel Jan 18 '16 at 13:17
  • 1
    @Gabriel If the answer helped you you are of course very welcome to accept it. – moewe Feb 1 '16 at 13:15

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.