From: Juergen Spitzmueller Date: Thu, 14 Mar 2019 13:38:08 +0000 (+0100) Subject: Protect label in moving argument X-Git-Url: https://git.lyx.org/gitweb/?a=commitdiff_plain;h=fe8b0ed01e310db82e4940152a4d67ab172ac107;p=features.git Protect label in moving argument Fixes: #9404 --- diff --git a/src/insets/InsetLabel.cpp b/src/insets/InsetLabel.cpp index 9d6a031c28..6d5c0b6ddd 100644 --- a/src/insets/InsetLabel.cpp +++ b/src/insets/InsetLabel.cpp @@ -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; + } }