BibTeX, biblatex and bibernatbib | Replace Comma after Year with Colon

Information and discussion about BiBTeX - the bibliography tool for LaTeX documents.
Post Reply
larschrjensen
Posts: 10
Joined: Thu Dec 29, 2011 3:30 pm

natbib | Replace Comma after Year with Colon

Post by larschrjensen »

Hi,

I use the natbib package and use following citation command \citep[202]{author} which prints as:
(Author, 1997, 202)

What I'd like to do is replace the last comma after 1997 with a colon. I've had a look at \bibpunct but I haven't been able to figure out how to change the comma in question. Is at all possible?

Any help is appreciated.


Regards,
Lars

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

User avatar
localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

natbib | Replace Comma after Year with Colon

Post by localghost »

Kindly prepare a proper minimal example to avoid guesswork.


Thorsten
larschrjensen
Posts: 10
Joined: Thu Dec 29, 2011 3:30 pm

natbib | Replace Comma after Year with Colon

Post by larschrjensen »

Certainly.

Code: Select all

\documentclass{article}
\usepackage[round]{natbib}

\begin{document}
\bibliographystyle{apalike}

bla bla bla \citep[202]{schriver}

\bibliography{Bib}

\end{document}
Last edited by Stefan Kottwitz on Thu Aug 30, 2012 1:14 pm, edited 1 time in total.
User avatar
Stefan Kottwitz
Site Admin
Posts: 10321
Joined: Mon Mar 10, 2008 9:44 pm

Re: natbib | Replace Comma after Year with Colon

Post by Stefan Kottwitz »

Hi Lars,

the example cannot be testet yet, without the .bib file entry.

Stefan
LaTeX.org admin
larschrjensen
Posts: 10
Joined: Thu Dec 29, 2011 3:30 pm

natbib | Replace Comma after Year with Colon

Post by larschrjensen »

Of course. How silly of me.

Code: Select all

@Book{schriver,
author = {Karen Schriver},
title = {Dynamics in Document Design},
publisher = {Wiley Computer Publishing},
year = {1997},
}
Last edited by Stefan Kottwitz on Thu Aug 30, 2012 2:05 pm, edited 1 time in total.
User avatar
localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

natbib | Replace Comma after Year with Colon

Post by localghost »

Briefly browsing Section 2.9 of the natbib manual gives me this.

Code: Select all

\begin{filecontents*}{\jobname.bib}
@Book{schriver:1997,
  author = {Karen Schriver},
  title = {Dynamics in Document Design},
  publisher = {Wiley Computer Publishing},
  year = {1997},
}
\end{filecontents*}
\documentclass{article}
\usepackage[round]{natbib}

\setcitestyle{notesep={: }}
\bibliographystyle{apalike}

\begin{document}
  Citation \citep[202]{schriver:1997}

  \bibliography{\jobname}
\end{document}
larschrjensen
Posts: 10
Joined: Thu Dec 29, 2011 3:30 pm

Re: natbib | Replace Comma after Year with Colon

Post by larschrjensen »

Thank you very much. Your help is most appreciated.

Best regards,
Lars
Post Reply