From 3272c5a3f49d84cfc966fe79fbcd4d0739c26a33 Mon Sep 17 00:00:00 2001 From: Juergen Spitzmueller Date: Thu, 14 Mar 2019 14:38:08 +0100 Subject: [PATCH] Protect label in moving argument Fixes: #9404 --- src/insets/InsetLabel.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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; + } } -- 2.39.2