## LaTeX forum ⇒ BibTeX, biblatex and biber ⇒ comma in page numbers Topic is solved

Information and discussion about BiBTeX - the bibliography tool for LaTeX documents.
liuzr88
Posts: 2
Joined: Fri Apr 04, 2014 8:02 pm

### comma in page numbers

Hi, in my bibtex library, I have some references that don't have numerical pages numbers, e.g. like L03803'. When the latex file is processed, the page number in bibliography entry is formatted 'L03,803'. Obviously the comma is automatically added. I am not able to find how to turn this feature off. Any suggestions to fix this will be much appreciated!

I am using the most recent version of TexShop on Mac, and BibDesk to manage my library.

Johannes_B
Site Moderator
Posts: 3604
Joined: Thu Nov 01, 2012 4:08 pm
It is much more important for us to know how you implement the bibliography into your document. The best way to show us would be a Minimal working example (<- you can click the link). It might take a few minutes, but it is worth it.
The smart way: Calm down and take a deep breath, read posts and provided links attentively, try to understand and ask if necessary.

liuzr88
Posts: 2
Joined: Fri Apr 04, 2014 8:02 pm
Here is my Latex file:

\documentclass[11pt]{article}\usepackage[square]{natbib} \begin{document}\title {Article Title}\make title\cite{Ward2005} \bibliographystyle{agu08}  % this specify the style of references\bibliography{test}  % this specify where is the bibtex file\end{document}

It uses the test.bib file as following:

@article{Ward2005,	Author = {Ward, William E. and Fomichev, Victor I. and Beagley, Stephen},	Journal = {Geophys. Res. Lett.},	Pages = {L03803},	Title = {Nonmigrating tides in equinox temperature fields from the Extended Canadian Middle Atmosphere Model.},	Volume = {32},	Year = {2005}}

In the output, the page number part L03803 becomes L03,803

I am not sure this is related to the agu08.bst file or it's a setting the BibTex. The agu08.bst is attached. I also tried to go through this agu08.bst file to find possible clue but was not successful. Thanks for the help!
Attachments
agu08.bst
agu08.bst

beridel
Posts: 1
Joined: Mon Jul 28, 2014 10:11 am
Hi, I have the same issue. I've attached a .tar that includes everything you need to create the problem.

Attachments
bib_pb.tar

Johannes_B
Site Moderator
Posts: 3604
Joined: Thu Nov 01, 2012 4:08 pm
If biblatex/biber is an option, use it.
\begin{filecontents}{\jobname.bib}@article{Kostoglodov:2010ht,author = {Kostoglodov, Vladimir and Husker, Allen L and Shapiro, Nikola{\"\i} M and Payero, Juan S and Campillo, Michel and Cotte, Nathalie and Clayton, Robert W},title = {{The 2006 slow slip event and nonvolcanic tremor in the Mexican subduction zone}},journal = {Geophys. Res. Lett.},year = {2010},volume = {37},number = {24},pages = {{L24301}},doi = {10.1029/2010GL045424},rating = {0},date-added = {2014-01-20T07:22:06GMT},date-modified = {2014-05-23T15:30:19GMT},url = {http://www.agu.org/journals/gl/gl1024/2010GL045424/2010gl045424-fs02b.eps},local-url = {file://localhost/Users/beridel/Documents/Articles/2010/Kostoglodov/2010_Kostoglodov_Geophys._Res._Lett-1.pdf},file = {{2010_Kostoglodov_Geophys._Res._Lett-1.pdf:/Users/beridel/Documents/Articles/2010/Kostoglodov/2010_Kostoglodov_Geophys._Res._Lett-1.pdf:application/pdf}},uri = {\url{papers2://publication/doi/10.1029/2010GL045424}}}\end{filecontents}\documentclass{article}\usepackage[style=authoryear,natbib]{biblatex}\addbibresource{\jobname.bib} \begin{document}This is a citation \citep{Kostoglodov:2010ht}.\printbibliography\end{document}
The smart way: Calm down and take a deep breath, read posts and provided links attentively, try to understand and ask if necessary.

ErahsMuhs
Posts: 1
Joined: Wed Apr 27, 2016 12:04 pm
If this is still relevant for anybody: I found a solution.

Open the .bsp file and search for a function like this:

FUNCTION {format.journal.pages}
{ pages duplicate$empty$ 'pop${ swap$ duplicate$empty$
{ pop$pop$ format.pages }
{
", " *
swap$n.dashify "pages" bibinfo.check * } if$
}
if$change this to: FUNCTION {format.journal.pages} { pages duplicate$ empty$'pop$
{ swap$duplicate$ empty${ pop$ pop$format.pages } { ", " * swap$
%n.dashify
"pages" bibinfo.check
*
}
if$} if$

frankenschulz
Posts: 1
Joined: Wed Oct 18, 2017 11:05 am
It's actually the function n.separate in n.dashify!

I had the same problem with Springer styles and found that neither current RevTeX nor AASTeX styles are calling n.separate in n.dashify. So, you just need to remove this:

Code: [Select all] [Expand/Collapse] [Download] ({untitled.tex}) Open in OverleafFUNCTION {n.dashify}{% n.separate 't := "" { t empty$not } { t #1 #1 substring$ "-" = { t #1 #2 substring$"--" = not { "--" * t #2 global.max$ substring$'t := } { { t #1 #1 substring$ "-" = } { "-" * t #2 global.max$substring$ 't := } while$} if$ } { t #1 #1 substring$* t #2 global.max$ substring$'t := } if$ } while\$}