2

I have some problem in customizing bibliography style of @article using biblatex and biber when writing my paper. The picture shows the bibliography style generated by running .tex file. Refstyle

However, I want to: 1. Remove the comma (,) between the last and first names of authors. 2. Switch the sequence of volume, number and year as: year; volume(number):

For example, in the picture Reference[3]: 56.7 (2013) should be 2013; 56(7):

Many thanks.

The following are my .tex and .bib files:

.tex file

\documentclass[a4paper, 10pt]{article}

\usepackage[top=2cm, bottom=2cm, left=3cm, right=3cm]{geometry}
\usepackage[backend=biber,style=numeric-comp,sortcites=true,maxbibnames=100,firstinits=true,terseinits=true,sorting=none]{biblatex}
\usepackage{hyperref}  
\addbibresource{mybib.bib}

\renewcommand*{\finalnamedelim}{\multinamedelim} 

\renewcommand*{\bibpagespunct}{\intitlepunct}

\DeclareFieldFormat[book, article, thesis, inproceedings]{title}{#1}
\DeclareFieldFormat{journaltitle}{#1}
\DeclareFieldFormat{booktitle}{#1}
\DeclareFieldFormat{pages}{#1}

\DeclareNameAlias{default}{last-first}

\renewbibmacro{in:}{\ifentrytype{article} {} {\printtext{\bibstring{in} \intitlepunct}}}


\begin{document}

This is an example for illustration of customizing bibliography style.~\cite{gams,AIChE,Azeez2013}

\printbibliography

\end{document}

.bib file

@article{Azeez2013,
    author = {Azeez, O. S. and Isafiade, A. J. and Fraser, D. M.},
    title = {Supply-based superstructure synthesis of heat and mass exchange networks},
    journal = {Computers \& Chemical Engineering},
    volume = {56},
    number = {7},
    pages = {184--201},
    year = {2013}
}

@book{gams,
    author = {Rosenthal, Racd Ejijig},
    title = {GAMS---A User's Guide},
    year = {2010},
    publisher = {GAMS Development Corporation}
}

@inproceedings{AIChE,
    author = {Savelski, Minor J and Bagajewicz, Michel J},
    title = {Design and retrofit of water utilization systems in refineries and process plants},
    booktitle = {Annual National AIChE Meeting},
    year = {1997},
    location = {Los Angeles, USA}
}
  • what is the special in the output desired? – touhami Jul 31 '15 at 9:49
  • 2
    Normally it is preferred to ask one question at a time. Many components of your question have already been answered elsewhere. A good start is Guidelines for customizing biblatex styles. This \DeclareNameAlias{default}{last-first} \renewcommand*{\finalnamedelim}{\multinamedelim} \DeclareFieldFormat*{title}{#1} \DeclareFieldFormat*{booktitle}{#1} already does some of the things you asked for. – moewe Jul 31 '15 at 9:51
  • It would also be really helpful if you could state what exactly you want changed. (I find it quite hard to see the pattern with the semicolon). But please conduct a search of this site first for each of the items. – moewe Jul 31 '15 at 9:52
  • @moewe I edited my problem to make it clearer. Thanks, moewe. I am now reading the materials you offered. I hope I could solve the problem. – Nick Aug 1 '15 at 2:33
  • If you want to get rid of the pp maybe see my question on avoiding a side-effect. (Also implicitly explains how to get rid of it.) Especially if you might want to specify non-default pagination still. I also asked about in. – cfr Aug 1 '15 at 2:52
3

The necessary modifications for @article to look as you wish are as follows

\renewbibmacro*{journal+issuetitle}{%
  \usebibmacro{journal}%
  \setunit*{\addspace}%
  \iffieldundef{series}
    {}
    {\newunit
     \printfield{series}%
     \setunit{\addspace}}%
  \setunit{\addspace}%
  \usebibmacro{issue+date}%
  \setunit{\addcolon\space}%
  \usebibmacro{issue}%
  \setunit{\addsemicolon\space}%
  \usebibmacro{volume+number+eid}%
  \newunit}

To change the order of the fields: first year, only then volume and number.

Then

\DeclareFieldFormat[article,periodical]{number}{\mkbibparens{#1}}
\renewbibmacro*{volume+number+eid}{%
  \printfield{volume}%
  \printfield{number}%
  \setunit{\addcomma\space}%
  \printfield{eid}}

To typeset volume and number as "56(3)".

And finally

\renewbibmacro*{issue+date}{%
  \iffieldundef{issue}
    {\usebibmacro{date}}
    {\printfield{issue}%
     \setunit*{\addspace}%
     \usebibmacro{date}}%
  \newunit}

To make sure the date is not wrapped in parentheses.

MWE

\documentclass[a4paper, 10pt]{article}
\usepackage{geometry}
\usepackage[backend=biber,style=numeric-comp,sortcites=true,maxbibnames=100,firstinits=true,terseinits=true,sorting=none]{biblatex}
\usepackage{filecontents}
\usepackage{hyperref}  

\begin{filecontents*}{\jobname.bib}
@article{Azeez2013,
    author = {Azeez, O. S. and Isafiade, A. J. and Fraser, D. M.},
    title = {Supply-based superstructure synthesis of heat and mass exchange networks},
    journal = {Computers \& Chemical Engineering},
    volume = {56},
    number = {7},
    pages = {184--201},
    year = {2013}
}

@book{gams,
    author = {Rosenthal, Racd Ejijig},
    title = {GAMS---A User's Guide},
    year = {2010},
    publisher = {GAMS Development Corporation}
}

@inproceedings{AIChE,
    author = {Savelski, Minor J and Bagajewicz, Michel J},
    title = {Design and retrofit of water utilization systems in refineries and process plants},
    booktitle = {Annual National AIChE Meeting},
    year = {1997},
    location = {Los Angeles, USA}
}
\end{filecontents*}

\addbibresource{\jobname.bib}

\renewcommand*{\finalnamedelim}{\multinamedelim} 

\renewcommand*{\bibpagespunct}{\intitlepunct}

\DeclareFieldFormat[book, article, thesis, inproceedings]{title}{#1}
\DeclareFieldFormat{journaltitle}{#1}
\DeclareFieldFormat{booktitle}{#1}
\DeclareFieldFormat{pages}{#1}

\DeclareNameAlias{default}{last-first}

\renewbibmacro{in:}{\ifentrytype{article} {} {\printtext{\bibstring{in} \intitlepunct}}}


\renewbibmacro*{journal+issuetitle}{%
  \usebibmacro{journal}%
  \setunit*{\addspace}%
  \iffieldundef{series}
    {}
    {\newunit
     \printfield{series}%
     \setunit{\addspace}}%
  \setunit{\addspace}%
  \usebibmacro{issue+date}%
  \setunit{\addcolon\space}%
  \usebibmacro{issue}%
  \setunit{\addsemicolon\space}%
  \usebibmacro{volume+number+eid}%
  \newunit}

\DeclareFieldFormat[article,periodical]{number}{\mkbibparens{#1}}
\renewbibmacro*{volume+number+eid}{%
  \printfield{volume}%
  \printfield{number}%
  \setunit{\addcomma\space}%
  \printfield{eid}}

\renewbibmacro*{issue+date}{%
  \iffieldundef{issue}
    {\usebibmacro{date}}
    {\printfield{issue}%
     \setunit*{\addspace}%
     \usebibmacro{date}}%
  \newunit}

\begin{document}

This is an example for illustration of customizing bibliography style.~\cite{gams,AIChE,Azeez2013}

\printbibliography

\end{document}

Azeez, OS, Isafiade, AJ, Fraser, DM. Supply-based superstructure synthesis of heat and mass exchange networks. Computers & Chemical Engineering 2013; 56(7): 184–201.

  • Can you change the title of the question to a more specific one? – Johannes_B Aug 1 '15 at 12:35
  • @Johannes_B Mhh, can you think of a good title? – moewe Aug 1 '15 at 12:37
  • :-D No, that's why i asked you :-) It is hard as this is a multi-question Q. – Johannes_B Aug 1 '15 at 12:38
  • 1
    That seems to be fine :-) Go for it. – Johannes_B Aug 1 '15 at 13:13
  • 1
    Most of these macros are in standard.bbx, but some are in biblatex.def. Other still (that are more style-dependent) can be found in the .bbx and .cbx files of your style, in your case numeric-comp.bbx/numeric-comp.cbx. If you don't know where to find these files, type kpsewhich <file> in your command line and the command line will tell you where the file resides. Keep in mind that you should never modify a file you got from your TeX distribution, with biblatex it suffices to make the adjustments in the preamble. – moewe Aug 2 '15 at 15:26

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.