mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-12-25 05:55:34 +00:00
Fix bug #8889 by always issuing \protect in fragile environments.
(cherry picked from commit 3c1969574f
)
This commit is contained in:
parent
e09faf7ce6
commit
64be8c6553
@ -120,6 +120,8 @@ void InsetMathPhantom::draw(PainterInfo & pi, int x, int y) const
|
||||
void InsetMathPhantom::write(WriteStream & os) const
|
||||
{
|
||||
MathEnsurer ensurer(os);
|
||||
if (os.fragile())
|
||||
os << "\\protect";
|
||||
switch (kind_) {
|
||||
case phantom:
|
||||
os << "\\phantom{";
|
||||
|
@ -704,8 +704,8 @@ void MathMacro::write(WriteStream & os) const
|
||||
// normal mode
|
||||
LASSERT(macro_, /**/);
|
||||
|
||||
// optional arguments make macros fragile
|
||||
if (optionals_ > 0 && os.fragile())
|
||||
// Always protect macros in a fragile environment
|
||||
if (os.fragile())
|
||||
os << "\\protect";
|
||||
|
||||
os << "\\" << name();
|
||||
|
@ -65,6 +65,8 @@ What's new
|
||||
|
||||
- Fix bug where depth of pasted text was incorrectly set (bug 8891).
|
||||
|
||||
- Fix clash between \protect and \ensuremath (bug 8889).
|
||||
|
||||
|
||||
* USER INTERFACE
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user