0

I need to set up biblatex to obtain the following citation style:

Book: 1. Doe, J.: Book Title. Publisher, Location (date)

Article: 1. Doe, J.: Title. Journal. Number (Issue), pp. pages (year)

Chapter: 1. Doe, J.: Chapter Title. In: DoeEditor, J. (eds.) Book Title, pp. pages. Publisher, Location (year)

inProceedings: 1. Doe, J.: Title. In: Proceedings Title, pp. pages. Location (year)

This is as far as I've been able to come:

\documentclass{article}

\usepackage[style=numeric, 
            backend=biber,
            firstinits=true]{biblatex}
\addbibresource{references.bib}
\DeclareFieldFormat{labelnumberwidth}{#1\adddot}
\renewcommand*{\labelnamepunct}{\addcolon\space}
\DeclareNameAlias{default}{last-first}
\DeclareFieldFormat[article, book, incollection, report]{title}{#1} 
\DeclareFieldFormat[proceedings, inproceedings]{maintitle}{#1} 
\DeclareFieldFormat[article]{journaltitle}{#1\adddot}
\DeclareFieldFormat[inproceedings, incollection]{booktitle}{#1\adddot}
\renewbibmacro{in:}{%
  \ifentrytype{article}{}{\printtext{\bibstring{in}\intitlepunct}}}
\renewbibmacro*{volume+number+eid}{%
  \printfield{volume}%
  \setunit*{\addspace}%
  \printfield[parens]{number}%
  \setunit{\addcomma\space}%
}

\begin{document}
Examples \cite{Doe2014} \cite{Doe2016} \cite{Doe2017} \cite{Doe32015}

\printbibliography
\end{document}

and the output is: enter image description here

My questions are:

  • How can I put the year as the field and use ( ) in all entry types?
  • How can I remove the pp. from the pages field?
  • How can I remove the " " from the inProceedings title?
  • How can I reformat the editors field in the book chapter to get it closer to what I need?

Bib file sample:

@Book{Doe2017,
  author    = {Doe, Jhon},
  title     = {A Book Title},
  year      = {2017},
  publisher = {Some Publisher},
  location  = {Some Location},
}

@Article{Doe2016,
  author  = {Doe, Jhon and Doe2, Jhon2},
  title   = {Some journal article},
  journal = {Fancy Journal},
  year    = {2016},
  volume  = {56},
  number  = {3},
  pages   = {1-99},
}

@InCollection{Doe32015,
  author    = {Doe3, Jhon3},
  title     = {A book chapter},
  booktitle = {A book title},
  year      = {2015},
  editor    = {Editor1, Name and Editor2, Name2},
  publisher = {Some publisher},
  location  = {Some location},
  pages     = {54-82},
}

@InProceedings{Doe2014,
  author    = {Doe, Martha},
  title     = {A conference paper},
  booktitle = {Fancy Conference Proceedings},
  year      = {2014},
  location  = {Touristy Location},
  pages     = {1-10},
}
  • 2
    Please note that this is a Q&A site where we prefer to ask only one question per question. If you ask more questions you risk people not answering because they know only partial solutions or you risk getting solutions that don't address everything you look for. – moewe Apr 25 '17 at 18:05
1

Try

\documentclass{article}

\usepackage[style=numeric, 
            backend=biber,
            firstinits=true]{biblatex}


\usepackage{filecontents}
\begin{filecontents}{\jobname.bib}
@Book{Doe2017,
  author    = {Doe, Jhon},
  title     = {A Book Title},
  year      = {2017},
  publisher = {Some Publisher},
  location  = {Some Location},
}

@Article{Doe2016,
  author  = {Doe, Jhon and Doe2, Jhon2},
  title   = {Some journal article},
  journal = {Fancy Journal},
  year    = {2016},
  volume  = {56},
  number  = {3},
  pages   = {1-99},
}

@InCollection{Doe32015,
  author    = {Doe3, Jhon3},
  title     = {A book chapter},
  booktitle = {A book title},
  year      = {2015},
  editor    = {Editor1, Name and Editor2, Name2},
  publisher = {Some publisher},
  location  = {Some location},
  pages     = {54-82},
}

@InProceedings{Doe2014,
  author    = {Doe, Martha},
  title     = {A conference paper},
  booktitle = {Fancy Conference Proceedings},
  year      = {2014},
  location  = {Touristy Location},
  pages     = {1-10},
}
\end{filecontents}

\addbibresource{\jobname.bib}

\DeclareFieldFormat{labelnumberwidth}{#1\adddot}

\renewcommand*{\labelnamepunct}{\addcolon\space}

\DeclareNameAlias{default}{family-given}

\DeclareFieldFormat*{title}{#1} 
\DeclareFieldFormat*{maintitle}{#1} 
\DeclareFieldFormat{journaltitle}{#1}
\DeclareFieldFormat*{booktitle}{#1}
\DeclareFieldFormat[article,periodical]{number}{\mkbibparens{#1}}

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

\renewbibmacro*{volume+number+eid}{%
  \printfield{volume}%
  \setunit*{\addspace}%
  \printfield{number}%
  \setunit{\addcomma\space}%
  \printfield{eid}}

\DeclareFieldFormat*{date}{\mkbibparens{#1}}

\newbibmacro*{pubinstorg+location}[1]{%
  \printlist{location}%
  \iflistundef{#1}
    {\setunit*{\addcomma\space}}
    {\setunit*{\addcolon\space}}%
  \printlist{#1}%
  \newunit}

\renewbibmacro*{publisher+location+date}{\usebibmacro{pubinstorg+location}{publisher}}
\renewbibmacro*{institution+location+date}{\usebibmacro{pubinstorg+location}{institution}}
\renewbibmacro*{organization+location+date}{\usebibmacro{pubinstorg+location}{organization}}

\renewbibmacro*{issue+date}{%
  \iffieldundef{issue}
    {}
    {\printtext[parens]{\printfield{issue}}}%
  \newunit}

\newbibmacro*{addendum+pubstate}{%
  \printfield{addendum}%
  \newunit\newblock
  \printfield{pubstate}}
\newbibmacro*{addendum+pubstate}{%
  \printfield{addendum}%
  \newunit\newblock
  \printfield{pubstate}%
  \setunit{\addspace}%
  \printdate}


\begin{document}
Examples \cite{Doe2014} \cite{Doe2016} \cite{Doe2017} \cite{Doe32015}

\printbibliography
\end{document}

And have a look at Citing @inbook with biblatex: how to put authors/editors before book title? and Move names of editors followed by (Ed./Eds.) and a comma before title in biblatex for the editor order.

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.