Citation with some text inside square brackets
A recommendable choice would be to use natbib
or better yet biblatex
. Let's see with natbib
:
\begin{filecontents*}{\jobname.bib}
@book{01,
author={Caesar, Gaius Iulius},
title={Commentarii de bello {Gallico}},
year={703},
}
\end{filecontents*}
\documentclass{article}
\usepackage[numbers,square]{natbib}
\begin{document}
Here's a citation \cite[See:][p.~2]{01}
Another: \cite[p.~3]{01}.
Another: \cite{01}.
\bibliographystyle{plainnat}
\bibliography{\jobname}
\end{document}
The \cite
command has now two optional argument. When only one is present, it's the "post-citation"; if two are present, the first is the "pre-citation" and the second one the post-citation.
Without extra packages you can still emulate this behavior:
\begin{filecontents*}{\jobname.bib}
@book{01,
author={Caesar, Gaius Iulius},
title={Commentarii de bello {Gallico}},
year={703},
}
\end{filecontents*}
\documentclass{article}
\makeatletter
\let\cite\relax
\DeclareRobustCommand{\cite}{%
\let\new@cite@pre\@gobble
\@ifnextchar[\new@cite{\@citex[]}}
\def\new@cite[#1]{\@ifnextchar[{\new@citea{#1}}{\@citex[#1]}}
\def\new@citea#1{\def\new@cite@pre{#1}\@citex}
\def\@cite#1#2{[{\new@cite@pre\space#1\if\relax\detokenize{#2}\relax\else, #2\fi}]}
\makeatother
\begin{document}
Here's a citation \cite[See:][p.~2]{01}
Another: \cite[p.~3]{01}.
Another: \cite{01}.
Again: \cite[See:][]{01}
\bibliographystyle{plain}
\bibliography{\jobname}
\end{document}
In case you want only the "pre-citation", use
\cite[See:][]{01}
with an empty second optional argument.