13

Is there a simple way to make citations created by \cite{ref1} invisible in the final manuscript (so that you can produce one version with the citations and a separate one without them)?

  • When reading your title, I would suggest use \nocite{ref1}? This makes the entries appear in the bibliography only but not in the text. I suppose this was nevertheless not what you were aiming for. Otherwise I would have replaced \renewcommand{\cite}[1]{\nocite{#1} – strpeter Sep 12 '18 at 12:26
14

You can put

 \renewcommand\cite[2][]{}

in your preamble which will do what you ask but would make

blah blah \cite{ref1}.

make

blah blah .

So perhaps

\renewcommand\cite[2][]{\ifhmode\unskip\fi}

Which will remove that case.

But if you have

blah blah blah see page 4 of \cite{ref}.

Then the problem is harder and you need to add extra markup such as

  blah blah blah\citetext{ see page 4 of \cite{ref}}.

where you have

\newcommand\citetext[1]{#1}

or

\newcommand\citetext[1]{}

depending.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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