I went trough Guidelines for customizing biblatex styles and could solve some of the problems I encountered while customizing the alphabetic style (an answer for authoryear style is given in Biblatex – How to change format of journal, volume and page numbers in bibliography) to my needs
For a journal article
@article{somearticle,
title = {some article},
volume = {5},
number = {1},
journaltitle = {some journal},
author = {Some, {Person} },
date = {2005-12-01},
pages = {175--176},
langid = {english},
}
I'd like to have an output of the form
…,5(1):175-176 (2005),…
I managed to to this by the redefinitions:
\documentclass{article}
\usepackage[american]{babel}
\usepackage{csquotes}
\usepackage[backend=biber,style=alphabetic]{biblatex}
\usepackage{filecontents}
\begin{filecontents}{\jobname.bib}
@article{somearticle,
title = {some article},
volume = {5},
number = {1},
journaltitle = {some journal},
author = {Some, {Person} },
date = {2005-12-01},
pages = {175--176},
langid = {english},
}
\end{filecontents}
\addbibresource{\jobname.bib}
\renewbibmacro*{journal+issuetitle}{%
\usebibmacro{journal}%
\setunit*{\addspace}%
\iffieldundef{series}
{}
{\newunit
\printfield{series}%
\setunit{\addspace}}%
\usebibmacro{volume+number+eid}%
\setunit{\addcolon}%
\setunit*{\addnbthinspace}
\printfield{pages}
\setunit*{\addnbspace}
\usebibmacro{issue+date}%
\setunit{\addcolon\space}%
\usebibmacro{issue}%
\newunit}
\renewbibmacro*{volume+number+eid}{%
\printfield{volume}%
% \setunit*{\adddot}% DELETED
\setunit*{\addnbthinspace}% NEW (optional); there's also \addnbthinspace
\printfield{number}%
\setunit{\addcomma\space}%
\printfield{eid}}
\DeclareFieldFormat[article]{number}{\mkbibparens{#1}}
\DeclareFieldFormat[article]{pages}{#1}
\AtEveryBibitem{\clearfield{month}}
\AtEveryBibitem{\clearfield{day}}
\begin{document}
\cite{somearticle}
\printbibliography
\end{document}
Instead I get …,5(1):175-176 (2005), 175-176,
i.e. the page numbers are printed twice. How can I get rid of the second printing of the page numbers?
Best Answer
Just add
\clearfield{pages}
directly after\printfield{pages}
But since the macro
note+pages
is only used by@rticle
s you might as well redefine it