1

I found Change the order of the address and publisher in Biblatex

and tried:

\documentclass{report}
\usepackage{biblatex}
\addbibresource{biblatex-examples.bib}

\renewbibmacro*{pages+year}{%
  \printlist{pages}%
  \iflistundef{year}
    {\setunit*{\addcomma\space}}
    {\setunit*{\addcolon\space}}%
  \printlist{year}
  \newunit}

\begin{document}
Bla \cite{aksin}
\printbibliography
\end{document}

But that didn't work. Any other suggestion?

enter image description here I got the above but I would like to have something like:

enter image description here

KcFnMi
  • 1,242
  • 1
    Please post a complete (yet minimal) code that we can compile. – Bernard May 21 '19 at 11:00
  • There is no bibmacro called pages+year in the standard styles and you should get a warning about that. Redefining the macro therefore changes nothing. Please tell us which style you use in an MWE (https://tex.meta.stackexchange.com/q/228/35864, https://tex.meta.stackexchange.com/q/4407/35864). The solution will definitely depend on that. – moewe May 21 '19 at 11:35
  • Any news here? As I mentioned in the last comment, the answer will depend on the bibliography style as well as on the exact output you would like to see. So it would be appreciated if you could add a small example document and explain in slightly more detail the output you would like to see. If there is no new development here in due time I will vote to close as unclear what you are asking because he question is too vague in its current state to be answered properly without guessing. – moewe May 24 '19 at 14:57
  • Thanks for the links. Can I provide more info? – KcFnMi May 25 '19 at 13:03

2 Answers2

1

There are several custom styles on CTAN that move the date to the end. biblatex-ieee's style=ieee, biblatex-nature's style=nature and biblatex-phys' style=phys come to mind. Maybe one of those comes close to what you want already.


If you want to modify the standards styles you can either modify the driver or try to trick your way round doing that. In any case redefining a macro pages+year will not help, because this macro does not exist, which means that it is not used at all.

Since modifying the drivers usually takes more code, I will demonstrate a way around that. If I were to write my own style, I would probably modify the driver, though.

First we disable the normal date printing macros and then we insert a new date printing macro into those macros that print the page numbers. Not all entry types have pages, though, so you might end up removing some dates. The code below has a primitive check to avoid that.

\documentclass{article}
\usepackage[style=numeric]{biblatex}
\addbibresource{biblatex-examples.bib}

\newtoggle{bbx:datemissing}

\renewbibmacro*{date}{\toggletrue{bbx:datemissing}%
}

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

\newbibmacro*{date:print}{%
  \togglefalse{bbx:datemissing}%
  \printdate}

\renewbibmacro*{chapter+pages}{%
  \printfield{chapter}%
  \setunit{\bibpagespunct}%
  \printfield{pages}%
  \newunit
  \usebibmacro{date:print}%
  \newunit}

\renewbibmacro*{note+pages}{%
  \printfield{note}%
  \setunit{\bibpagespunct}%
  \printfield{pages}%
  \newunit
  \usebibmacro{date:print}%
  \newunit}

\renewbibmacro*{addendum+pubstate}{%
  \iftoggle{bbx:datemissing}
    {\usebibmacro{date:print}}
    {}%
  \printfield{addendum}%
  \newunit\newblock
  \printfield{pubstate}}

\begin{document}
Bla \cite{aksin}
\printbibliography
\end{document}

Ozge Aksın et al. “Effect of immobilization on catalytic characteristics of saturated Pd-N-heterocyclic carbenes in Mizoroki-Heck reactions”. In: J. Organomet. Chem. 691.13, pp. 3027–3036. 2006.

moewe
  • 175,683
0

moewe's solution is excellent, but it has the (possibly unintended) side effect of putting the url before the date. Here is my alternative solution which doesn't do that, i.e. the fields in an article citation will be ordered journal, pages, year, url.

\renewbibmacro*{issue+date}{}%       %  Remove date

\renewbibmacro*{note+pages}{% % Add date after pages \printfield{note}% \setunit{\bibpagespunct}% \printfield{pages}% \setunit{\addcomma\addspace}% % NEW \usebibmacro{date}% % NEW \newunit}

Essentially, I have removed the date from the issue+date macro (bit hacky, but it is only used by the article and periodical classes, so I don't care), and added it to the note+pages macro (only used by article).