diff --git a/src/insets/InsetPhantom.cpp b/src/insets/InsetPhantom.cpp index f7a9b45d9a..a21a2c2d0f 100644 --- a/src/insets/InsetPhantom.cpp +++ b/src/insets/InsetPhantom.cpp @@ -309,6 +309,8 @@ docstring InsetPhantom::toolTip(BufferView const &, int, int) const void InsetPhantom::latex(otexstream & os, OutputParams const & runparams) const { + if (runparams.moving_arg) + os << "\\protect"; if (params_.type == InsetPhantomParams::Phantom) os << "\\phantom{"; else if (params_.type == InsetPhantomParams::HPhantom) diff --git a/status.21x b/status.21x index bf36dc4e94..2ee6a30cb8 100644 --- a/status.21x +++ b/status.21x @@ -69,6 +69,9 @@ What's new - Do not output \protect unnecessarily in subfigure contents (bug 9421). +- Do \protect phantoms in fragile environments (such as captions) + (bug 9456). + - Fix LaTeX error with font sizes in caption. - Fix wrong listings preamble encoding (bug 9382).