]> git.lyx.org Git - features.git/commitdiff
Protect label in moving argument
authorJuergen Spitzmueller <spitz@lyx.org>
Thu, 14 Mar 2019 13:38:08 +0000 (14:38 +0100)
committerJuergen Spitzmueller <spitz@lyx.org>
Thu, 14 Mar 2019 13:38:08 +0000 (14:38 +0100)
Fixes: #9404
src/insets/InsetLabel.cpp

index 9d6a031c281f414fb3ef8f0590b16c9efe6955c5..6d5c0b6ddde9a1f1392772dbd52515caf5b0e4e2 100644 (file)
@@ -303,8 +303,11 @@ void InsetLabel::latex(otexstream & os, OutputParams const & runparams_in) const
        // we store the label and output it after the macro (#2154)
        if (runparams_in.postpone_fragile_stuff)
                runparams_in.post_macro += command;
-       else
+       else {
+               if (runparams.moving_arg)
+                       os << "\\protect";
                os << command;
+       }
 }