rgheck <[EMAIL PROTECTED]> writes:

> Should that work? It doesn't, unless you manually protect the
> citation. See the attached.

Something like this should work.

JMarc

svndiff src/insets/

Index: src/insets/InsetCitation.cpp
===================================================================
--- src/insets/InsetCitation.cpp	(revision 23967)
+++ src/insets/InsetCitation.cpp	(working copy)
@@ -508,13 +508,16 @@ void InsetCitation::textString(odocstrea
 // 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");

Reply via email to