]> 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 16:39:56 +0000 (17:39 +0100)
Therefore insets should be protected in these captions.

Fixes bug: #9346.

src/insets/InsetFloat.cpp
status.21x

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);
index e5c5923998b06e5a39d61a128a97d6a556fe8ac5..03ea97d8654ca0b5228d29fb531319270031712e 100644 (file)
@@ -103,6 +103,8 @@ What's new
 - Fix crash on exporting a recursive math macro (bug 9140). Recursive macros
   are invalid, so typesetting will still fail with "TeX capacity exceeded".
 
+- Protect insets when needed in subfloat captions (bug 9346).
+
 
 * LYX2LYX