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'd like to add a citation which looks like this:

[_Text_ Citation_01, pages]

For example:

[See: 155, pp.89--99]

How can I do this using standard \cite{} command (without natbib or anything else)?

P.S. The text might be in Cyrillic!

share|improve this question
    
Please, can you add some more information about what you're using for citations? Just the default LaTeX commands or natbib or whatever? –  egreg Jan 3 '13 at 18:25
    
@egreg, just standard \cite{} command, nothing special –  Physicsworks Jan 3 '13 at 18:34

2 Answers 2

up vote 10 down vote accepted

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.

enter image description here

share|improve this answer
    
Great! Thanks, it works neatly. –  Physicsworks Jan 3 '13 at 19:11
    
@egreg, +1. Professional solution. –  Sigur Jan 3 '13 at 19:22
    
Just one more thing... How to modify this code (the part which doesn't use extra packages) in order to make a citation [See: 1], that is, WITHOUT page number(s)? –  Physicsworks Jan 3 '13 at 19:39
    
@Physicsworks I'd prefer the natbib solution; however I've added also the "package free" version. –  egreg Jan 3 '13 at 20:23
    
@egreg, I've already tried this, unfortunately, it adds a comma after citation number, so it looks like this: [See: 1,]. P.S. Sorry, I need this to be done without extra packages... –  Physicsworks Jan 3 '13 at 20:44

What do you think about a new command \Cite

\newcommand{\Cite}[2]{[See~\cite{#1},~#2]}
share|improve this answer
    
This adds the text AFTER Citation_01, not before, as I'd like to have –  Physicsworks Jan 3 '13 at 18:24
    
I believe that "155" in the OP's question refers to the number automatically generated by \cite. –  egreg Jan 3 '13 at 18:24
    
@egreg, you're right –  Physicsworks Jan 3 '13 at 18:25
    
Oh, I see. My fault. Edited. –  Sigur Jan 3 '13 at 18:25
    
@Sigur, Thanks, it works, although it adds extra [] –  Physicsworks Jan 3 '13 at 19:12

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.