Thanks to Scott for testing. If a macro is unknown (displayed in red), then
macro_ is 0. The LATTEST is now adjusted and works like in MathMacro::write()
where I stole it from.
void MathMacro::mathmlize(MathStream & os) const
{
- LATTEST(macro_);
+ // macro_ is 0 if this is an unknown macro
+ LATTEST(macro_ || displayMode_ != DISPLAY_NORMAL);
if (macro_) {
docstring const xmlname = macro_->xmlname();
if (!xmlname.empty()) {
void MathMacro::htmlize(HtmlStream & os) const
{
- LATTEST(macro_);
+ // macro_ is 0 if this is an unknown macro
+ LATTEST(macro_ || displayMode_ != DISPLAY_NORMAL);
if (macro_) {
docstring const xmlname = macro_->xmlname();
if (!xmlname.empty()) {