Only \protect labels in \thanks notes

See https://marc.info/?l=lyx-users&m=136394387505489

(cherry picked from commit 897fa08919)
This commit is contained in:
Juergen Spitzmueller 2024-09-21 11:30:08 +02:00 committed by Richard Kimberly Heck
parent c17789e018
commit affd867547
3 changed files with 8 additions and 4 deletions

View File

@ -3084,7 +3084,7 @@ void Paragraph::latex(BufferParams const & bparams,
OutputParams rp = runparams; OutputParams rp = runparams;
rp.free_spacing = style.free_spacing; rp.free_spacing = style.free_spacing;
rp.local_font = &current_font; rp.local_font = &current_font;
rp.intitle = style.intitle; rp.intitle |= style.intitle;
// Two major modes: LaTeX or plain // Two major modes: LaTeX or plain
// Handle here those cases common to both modes // Handle here those cases common to both modes

View File

@ -346,10 +346,10 @@ void InsetLabel::latex(otexstream & os, OutputParams const & runparams_in) const
if (runparams_in.postpone_fragile_stuff) if (runparams_in.postpone_fragile_stuff)
runparams_in.post_macro += command; runparams_in.post_macro += command;
else { else {
// protect label in moving argument (#9404), // protect label in \thanks notes (#9404)
// but not in subfloat caption (#11950)
if (runparams.moving_arg if (runparams.moving_arg
&& runparams.inFloat != OutputParams::SUBFLOAT) && runparams.intitle
&& runparams.inFootnote)
os << "\\protect"; os << "\\protect";
os << command; os << command;
} }

View File

@ -86,6 +86,10 @@ What's new
- Improve the way spaces are handled in labels when refstyle is used. - Improve the way spaces are handled in labels when refstyle is used.
- Re-allow relative paths for local bib files (bug 13097).
- Only \protect labels in \thanks notes (see bug 9404).
* USER INTERFACE * USER INTERFACE