5

I know there are already an answers to the question How to make citations appear within square brackets [ ] instead of parentheses ( )? but there is something else I'm looking for. When I cite a number of references in a parentheses, I want the publish dates of those references to appear in square brackets. But in any other case in the document I want those citation dates to appear in parentheses. To illustrate the sentence in TeX (for bibliography style I'm using jsb.bst):

\documentclass{article}
\usepackage{natbib}
\begin{document}
\bibliographystyle{jmb}%download style from http://ftp.math.utah.edu/pub/tex/bibtex/jmb.bst
Several studies in the past have investigated the perception of emotions from body 
movement (e.g. \citet{Dittrich1996, Pollick2001}).
\bibliography{test}
\end{document}.

with simplified bibliography for test.bib

@article{Dittrich1996,
author = {Dittrich, Winand H and Troscianko, Tom and Lea, S E and Morgan, D},
year = {1996}
}
@article{Pollick2001,
author = {Pollick, Frank E. and Paterson, H M and Bruderlin, Armin and Sanford, A J},
year = {2001}
}

produces the following effect:

Several studies in the past have investigated the perception of emotions from body movement (e.g. Dittrich et al. (1996); Pollick et al. (2001)).

which has one parentheses within another - not very neat (and can rise some grammar sensitive eyebrows). Here is what I want:

Several studies in the past have investigated the perception of emotions from body movement (e.g. Dittrich et al. [1996]; Pollick et al. [2001]; Scherer [2003]).

6
  • It would be a great help for solvers if you could edit your post and add compilable (minimum working) example with bib file included.
    – Malipivo
    Apr 11, 2014 at 11:30
  • @Malipivo Ok, fair enough, replicable example provided with link to bibliography style. Apr 11, 2014 at 12:15
  • My impression is that you want square brackets everywhere. I can't see why they should change shape depending on the context. Anyway, doing it automatically might be done, but it would definitely be very fragile.
    – egreg
    Apr 11, 2014 at 12:22
  • @egreg There is a lot of discussion about parentheses within parentheses (e.g. english.stackexchange.com/questions/28195/double-parentheses) but overall you should use ([]) format. In the context of my question its also an aesthetic choice - I don't like the look of square brackets and its not something you see very often in publication (i.e. you typically see parentheses instead of square brackets). Thats why I don't want square brackets everywhere. Apr 11, 2014 at 12:32
  • @GeekOnAcid I see no case like yours in the thread you link, and also in the one linked for duplicate. With my mathematician hat on, I'd say that the parentheses around the year have a semantic function, so they shouldn't be changed.
    – egreg
    Apr 11, 2014 at 12:38

1 Answer 1

2

I recommend you use the command \citealt, not \citealp, for the job at hand. (The instruction will insert a comma between the author and year substrings; I don't think that's what you're looking for.)

enter image description here

\RequirePackage{filecontents}
\documentclass{article}
\begin{filecontents*}{test.bib}
@article{Dittrich1996,
author = {Dittrich, Winand H. and Troscianko, Tom and Lea, S. E. and Morgan, D.},
journal = "XYZ",
volume  = 1,
issue   = 1,
pages   = "1-100",
year = {1996}
}
@article{Pollick2001,
author = {Pollick, Frank E. and Paterson, H M and Bruderlin, Armin and Sanford, A J},
journal = "XYZ",
volume  = 5,
issue   = 1,
pages   = "12-15",
year = {2001}
}
\end{filecontents*}
\usepackage[square]{natbib}
\begin{document}
\bibliographystyle{jmb}
Several studies in the past have investigated the perception of emotions from body 
movement (e.g., \citealt{Dittrich1996, Pollick2001}).
\bibliography{test}
\end{document}

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .