]> git.lyx.org Git - features.git/commitdiff
\\subfloat captions are moving arguments
authorJean-Marc Lasgouttes <lasgouttes@lyx.org>
Thu, 4 Dec 2014 16:27:56 +0000 (17:27 +0100)
committerJean-Marc Lasgouttes <lasgouttes@lyx.org>
Mon, 8 Dec 2014 08:43:49 +0000 (09:43 +0100)
Therefore insets should be protected in these captions.

Fixes bug: #9346.

src/insets/InsetFloat.cpp

index beb5e0b5571e1b2d63508eafef0d52f2fcb0a9b8..9bd5bccaf9695a15762d2149cdc2fc338c460456 100644 (file)
@@ -337,8 +337,9 @@ void InsetFloat::latex(otexstream & os, OutputParams const & runparams_in) const
                if (runparams_in.moving_arg)
                        os << "\\protect";
                os << "\\subfloat";
-       
+
                OutputParams rp = runparams_in;
+               rp.moving_arg = true;
                docstring const caption = getCaption(rp);
                if (!caption.empty()) {
                        os << caption;
@@ -347,7 +348,7 @@ void InsetFloat::latex(otexstream & os, OutputParams const & runparams_in) const
                rp.inFloat = OutputParams::SUBFLOAT;
                InsetText::latex(os, rp);
                os << "}";
-       
+
                return;
        }
        OutputParams runparams(runparams_in);