// the \cite command is valid. Eg, the user has natbib enabled, inputs some
// citations and then changes his mind, turning natbib support off. The output
// should revert to \cite[]{}
-int InsetCitation::latex(odocstream & os, OutputParams const &) const
+int InsetCitation::latex(odocstream & os, OutputParams const & op) const
{
biblio::CiteEngine cite_engine = buffer().params().citeEngine();
// FIXME UNICODE
docstring const cite_str = from_utf8(
asValidLatexCommand(getCmdName(), cite_engine));
+ if (op.moving_arg)
+ os << "\\protect";
+
os << "\\" << cite_str;
docstring const & before = getParam("before");