]> git.lyx.org Git - features.git/commitdiff
* insets/insetgraphics.C
authorJean-Marc Lasgouttes <lasgouttes@lyx.org>
Fri, 24 Mar 2006 13:45:33 +0000 (13:45 +0000)
committerJean-Marc Lasgouttes <lasgouttes@lyx.org>
Fri, 24 Mar 2006 13:45:33 +0000 (13:45 +0000)
(InsetGraphics::latex): add \protect as needed (bug 675)

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@13478 a592a061-630c-0410-9148-cb99ea01b6c8

src/insets/insetgraphics.C

index e0ce2256ecd7aa08dbe2bbed92ac88818106692b..b75d79a316f789e92ecd318eb180aba87646c687 100644 (file)
@@ -748,9 +748,15 @@ int InsetGraphics::latex(Buffer const & buf, ostream & os,
        string after;
        // Do we want subcaptions?
        if (params().subcaption) {
+               if (runparams.moving_arg)
+                       before += "\\protect";
                before += "\\subfigure[" + params().subcaptionText + "]{";
                after = '}';
        }
+
+       if (runparams.moving_arg)
+               before += "\\protect";
+       
        // We never use the starred form, we use the "clip" option instead.
        before += "\\includegraphics";