BibTeX, biblatex and biber ⇒ comma in page numbers
comma in page numbers
I am using the most recent version of TexShop on Mac, and BibDesk to manage my library.
NEW: TikZ book now 40% off at Amazon.com for a short time.
And: Currently, Packt sells ebooks for $4.99 each if you buy 5 of their over 1000 ebooks. If you choose only a single one, $9.99. How about combining 3 LaTeX books with Python, gnuplot, mathplotlib, Matlab, ChatGPT or other AI books? Epub and PDF. Bundle (3 books, add more for higher discount): https://packt.link/MDH5p
- Johannes_B
- Site Moderator
- Posts: 4182
- Joined: Thu Nov 01, 2012 4:08 pm
comma in page numbers
comma in page numbers
Code: Select all
\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}
Code: Select all
@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}}
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
- (42.09 KiB) Downloaded 428 times
Re: comma in page numbers
Thanks in advance for any help you can provide.
- Attachments
-
- bib_pb.tar
- (47.5 KiB) Downloaded 302 times
- Johannes_B
- Site Moderator
- Posts: 4182
- Joined: Thu Nov 01, 2012 4:08 pm
comma in page numbers
Code: Select all
\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}
comma in page numbers
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$
-
- Posts: 1
- Joined: Wed Oct 18, 2017 11:05 am
comma in page numbers
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]FUNCTION {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$
}[/code]