1

I would like to change the order of number and year in biblatex. I have tried

\documentclass[a4paper,10pt,twoside]{article}
\usepackage[hidelinks]{hyperref}
%\usepackage{lipsum}
%%%%%
%bibliography
%%%%%
\usepackage[style=alphabetic,backend=biber,isbn=false,doi=false,url=false,hyperref=true,block=none]{biblatex}
\usepackage{filecontents}
\begin{filecontents*}{mybibfile.bib}
@article{ams-07,
    AUTHOR = {Ardizzoni, A. and Menini, C. and {\c{S}}tefan, D.},
     TITLE = {Hochschild cohomology and ``smoothness'' in monoidal categories},
   JOURNAL = {J. Pure Appl. Algebra},
  FJOURNAL = {Journal of Pure and Applied Algebra},
    VOLUME = {208},
      YEAR = {2007},
    NUMBER = {1},
     PAGES = {297--330},
      ISSN = {0022-4049},
     CODEN = {JPAAA2},
   MRCLASS = {16E40},
  MRNUMBER = {2269845},
MRREVIEWER = {Mariano Suarez-Alvarez},
       DOI = {10.1016/j.jpaa.2005.12.003},
       URL = {http://dx.doi.org/10.1016/j.jpaa.2005.12.003},
}
@article{hoc-45,
    AUTHOR = {Hochschild, G.},
     TITLE = {On the cohomology groups of an associative algebra},
   JOURNAL = {Ann. of Math. (2)},
  FJOURNAL = {Annals of Mathematics. Second Series},
    VOLUME = {46},
      YEAR = {1945},
     PAGES = {58--67},
      ISSN = {0003-486X},
   MRCLASS = {09.1X},
  MRNUMBER = {0011076},
MRREVIEWER = {R. Baer},
}
@book{mac-98,
    AUTHOR = {Mac Lane, Saunders},
     TITLE = {Categories for the working mathematician},
    SERIES = {Graduate Texts in Mathematics},
    VOLUME = {5},
   EDITION = {Second Edition},
 PUBLISHER = {Springer-Verlag},
   ADDRESS = {New York},
      YEAR = {1998},
     PAGES = {xii+314},
      ISBN = {0-387-98403-8},
   MRCLASS = {18-02},
  MRNUMBER = {1712872 (2001j:18001)},
}
\end{filecontents*}
\addbibresource{mybibfile.bib}
\renewcommand*{\newunitpunct}{\addcomma\space}
\renewbibmacro*{volume+number+eid}{%
\printfield{volume}
%\printfield{date}
\printfield{number}
}
%\DeclareFieldFormat{journaltitle}{\mkbibemph{#1},} % italic journal title with comma
\DeclareFieldFormat[article,book,inbook,incollection,thesis,unpublished]{title}{\mkbibemph{#1}}%\addperiod % italic title with period
\DeclareFieldFormat[article,book,inbook,incollection,thesis,unpublished]{journaltitle}{#1} % title of journal article is printed as normal text
\DeclareFieldFormat[article,book,inbook,incollection,thesis,unpublished]{volume}{vol. {\bf #1}}
\DeclareFieldFormat[article]{date}{#1}
\DeclareFieldFormat[book,inbook,incollection,thesis,unpublished]{date}{(#1)}
\DeclareFieldFormat[article,book,inbook,incollection,thesis,unpublished]{number}{no. #1,}
\DeclareFieldFormat[article,book,inbook,incollection,thesis,unpublished]{pages}{#1}
\renewbibmacro{in:}{}

%%%%%


\begin{document}
In \cite{mac-98}, \cite{ams-07} and perhaps \cite{hoc-45}.

\printbibliography

\end{document}

Which gives: enter image description here

While I would like something like

... vol. 208 (2007), no. 1, 297-330.

for [AMS07]. Any ideas? Thank you!

2
  • and what would you like to get? Apr 21, 2016 at 11:35
  • something like '... vol. 208 (2007), no 1, 297-330.' in [AMS07]
    – nunatak
    Apr 21, 2016 at 11:38

1 Answer 1

1

Use

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

You should also move the punctuation commands out of \DeclareFieldFormat and can make use of \bibstrings

\DeclareFieldFormat*{title}{\mkbibemph{#1}}
\DeclareFieldFormat*{journaltitle}{#1}
\DeclareFieldFormat*{volume}{\bibstring{volume}~\mkbibbold{#1}}
\DeclareFieldFormat[article]{volume}{\bibstring{jourvol}~\mkbibbold{#1}}
\DeclareFieldFormat*{date}{\mkbibparens{#1}}
\DeclareFieldFormat[article]{date}{#1}
\DeclareFieldFormat*{number}{\bibstring{number}~#1}
\DeclareFieldFormat*{pages}{#1}

If you want to apply a directive to all entry types, you can use the starred version instead, that is shorter and you don't forget any types. E.g.

\DeclareFieldFormat*{pages}{#1}

instead of \DeclareFieldFormat[article,book,inbook,incollection,thesis,unpublished]{pages}{#1}.


Since you wrap all your dates in parentheses, you might want to add the - admittedly hacky -

\renewbibmacro*{date}{\setunit{\addspace}\printdate}

to avoid a comma-bracket situation.

0

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .