4

I am having difficulties with setting up the layout of my bibliography. I would like to have a numeric style which does a none sorting so its order is as it appears in the text. Plus I would like my bibliography entry to look like this (so authoryear style):

References

[1] Surname, Y.G. Year. Title ...

I don't know what to do and can't come up with anymore keywords to look for it. I just started using biblatex.

My setup is as follows:

\documentclass[12pt,a4paper]{scrartcl}
\usepackage[english]{babel}
\usepackage[utf8]{inputenc}
\usepackage{csquotes}
\usepackage{textcomp}
\usepackage{hyperref}

\usepackage[
    backend=biber,
    bibstyle=authoryear,
    citestyle=numeric-comp
    sorting=none,
]{biblatex}

\bibliography{mybib}

\begin{document}

Structures \cite{definition}

\newpage

\printbibliography

\end{document}
  • 1
    Welcome to TeX.SX! You can highlight code blocks by either indenting them by four spaces or by selecting them and hitting {} from the editing gui. – Andrew Jun 5 '15 at 9:00
  • Please give more information what exactly your problem is. – phx Jun 5 '15 at 10:11
  • A numeric style (getting little numbers pointing to the numbered bibliography entries) contradicts with an authoryear style (putting the names and years in the text and the bibliography). – Johannes_B Jun 5 '15 at 11:47
  • I don´t want the authoryear style for the text. I´d like the numeric style but have my bibliography look like authoryear. There must be a way ?! – Solaro Jun 6 '15 at 1:29
  • 1
    Sure there's a way (not necessarily easy), but I hope you realize that "authoryear" is not a style per se, but a general description of how bibliographical information should be sorted. An actual "authoryear" style usually involves a very detailed specification. Saying you want to use "authoryear" is kind of like saying you want a "primate" when you actually mean you want a squirrel monkey. – jon Jun 6 '15 at 2:40
2

By default, biblatex's numeric styles use a authortite-flavoured bibliography style. But with a little trick we can make it use a authoryear one.

For this, use citestyle=numeric-comp, bibstyle=authoryear, as optional argument to biblatex and add

\makeatletter
\input{numeric.bbx}
\makeatother

to your preamble. Then the numeric bibstyle is applied to authoryear. This works because the numeric bibliography style numeric.bbx acts as a sort of "add-on" to the standard.bbx style and changes only definitions that do not conflict with authoryear.bbx.

It then only remains to drop the parentheses. The approach here was taken from lockstep's answer to biblatex: How to remove the parentheses around the year in authoryear style?. It requires the xpatch package

\xpatchbibmacro{date+extrayear}{%
  \printtext[parens]%
}{%
  \setunit{\addperiod\space}%
  \printtext%
}{}{}

MWE

\documentclass{article}
\usepackage[
    backend=biber,
    citestyle=numeric-comp,
    bibstyle=authoryear,
]{biblatex}
\usepackage{xpatch}

\makeatletter
\input{numeric.bbx}
\makeatother

\xpatchbibmacro{date+extrayear}{%
  \printtext[parens]%
}{%
  \setunit{\addperiod\space}%
  \printtext%
}{}{}

\addbibresource{biblatex-examples.bib}

\begin{document}
\cite{wilde,geer,worman}
\printbibliography
\end{document}

enter image description here

  • For sorting you probably just want sorting=none,. – moewe Jun 7 '15 at 8:21
  • Thank you very much !!! It works without a problem, very helpful !!! – Solaro Jun 8 '15 at 2:08
0

I think what you are looking for, is the style of the bibliography. Maybe https://www.sharelatex.com/learn/Bibtex_bibliography_styles will help you

  • 3
    That won't do any good, the styles (bst) of the BibTeX system are unrelated and incompatible with biblatex styles. – Johannes_B Jun 6 '15 at 20:02

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.