Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

I'm using natbib and would like to modify the punctuation style for one particular type of source (classical texts), while punctuation for remaining sources should remain at their default settings.

In particular, I would like to cite ancient texts without author names and without commas: e.g. Aristotle's Politics, section 123, would be referred to in-text like this:

blablabla (Politics 123)

whereas other sources should be referred to in-text in the default manner, i.e. as author-year, with a comma between year and page:

yadayayaya (Smith 1992, 33).

So far I'm using \defcitealias and \citepalias, which works fine except for the punctuation:

\defcitealias{Aristotle1992}{\textit{Politics}}  
\citepalias[123]{Aristotle1992}

results in

(Politics, 123)

=> I would like to get rid of the comma here, while still keeping the comma for the other references.

Is there any way of achieving this from within the natbib package (if at all possible, I'd rather not switch to e.g. biblatex)...? I'd be immensely grateful for any help.


Here's some example code (hope this classifies as a workable example):

\documentclass{article}
\begin{filecontents}{\jobname.bib}
@BOOK{Aristotle1992,
  title = {The Politics},
  publisher = {London: Penguin},
  year = {1992},
  author = {Aristotle}
    }

@BOOK{Smith2003,
  title = {Blalala},
  publisher = {London: Penguin},
  year = {2003},
  author = {Smith, John}
    }
\end{filecontents}  
\usepackage{natbib}  
\begin{document}  

\defcitealias{Aristotle1992}{\textit{Politics}}    

This is as close as I get to what I want, but I would like to get rid of the comma:  

\citepalias[123a]{Aristotle1992}  

Other sources should be referred to in the usual way though (author date, page):  

\citep[p.~222]{Smith2003}  

\bibliographystyle{chicago}    
\bibliography{\jobname}  
\end{document}
share|improve this question
    
Welcome to TeX.sx! It would be handy to have a minimal working example (MWE) here: while the question is pretty clear, it's almost always best to have something others can compile in the question as it makes it more likely you'll get a good answer. –  Joseph Wright Jan 29 '13 at 8:25
    
Try to put in your preamble: \usepackage{etoolbox} \makeatletter \preto\citepalias{\renewcommand\NAT@cmt{\space}}{}{} \makeatother –  deimi Jan 29 '13 at 8:26
    
@user25177 I've formatted your MWE so it's marked up as code, and have also slightly modified it so the .bib file is auto-generated from the .tex file. –  Joseph Wright Jan 29 '13 at 8:41
    
@deimi Looks good: could you make that an answer? –  Joseph Wright Jan 29 '13 at 8:42
    
@joseph: thanks a lot and sorry for my clumsy formatting/bib-file usage.. –  Irene Jan 29 '13 at 8:46
show 1 more comment

2 Answers

up vote 3 down vote accepted

Put the code just after usepackage{natbib}

\usepackage{etoolbox}
\makeatletter
\let\save@NAT@cmt\NAT@cmt % saving comma 
\def\restore@NAT@cmt{\global\let\NAT@cmt\save@NAT@cmt} % restoring comma
\def\fix@NAT@cmt{\def\NAT@cmt{\space\restore@NAT@cmt}} % fix for citepalias
\preto\citepalias{\fix@NAT@cmt}{}{}  % patching citepalias
\makeatother

The output: enter image description here

share|improve this answer
    
Excellent, many many thanks! Precisely what I was looking for. –  Irene Jan 29 '13 at 10:23
add comment

You may use the classics package too:

enter image description here

\documentclass{article}
\usepackage{classics}
\newclassic{Aristotle}{#1|\textit{#1}|#1}

\begin{document}

\Aristotle [Politics]{1260}[a]

\Aristotle [Politics]{1260}[a][2]

\Aristotle*[Politics]{1260}[a][2]{1261}[b][3]

\end{document}

And this is how to use classics in conjunction with biblatex, biblatex-chicago, or natbib (and deimi's answer): you need to enclose \Aristotle in braces.

\cite[{\Aristotle{1260}[a][2]}]{Aristotle1992} 
share|improve this answer
1  
Thanks, that looks useful! Due to some other issues, I have actually now migrated from natbib to biblatex-chicago (even though I was not so keen on that in my earlier post), so now I've ended up using entrysubtype={classical} in my bibfile, which works quite well too. –  Irene Feb 5 '13 at 8:06
    
\Aristotle{1260}[a][2] just prints 1260a2 in a user-defined format (column a or b in italics). You may use classics with biblatex-chicago as well: \parencite[{\Aristotle{1260}[a][2]}]{Aristotle1992} –  eduardo.tex Feb 5 '13 at 12:35
    
Good to know, thanks! –  Irene Feb 5 '13 at 13:46
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.