diff --git a/lib/symbols b/lib/symbols index d8812d2ff9..a0b47d8763 100644 --- a/lib/symbols +++ b/lib/symbols @@ -679,6 +679,20 @@ RIGHTCIRCLE wasy 72 0 x x #LEFTcircle {\hbox to 0pt{\wasyfamily\char71\hss}\hbox{\wasyfamily\char35}} #RIGHTcircle{\hbox to 0pt{\wasyfamily\char72\hss}\hbox{\wasyfamily\char35}} +# Defined by amsmath.sty + +varGamma cmm 161 0 mathord x amsmath +varDelta cmm 162 0 mathord x amsmath +varTheta cmm 163 0 mathord x amsmath +varLambda cmm 164 0 mathord x amsmath +varXi cmm 165 0 mathord x amsmath +varPi cmm 166 0 mathord x amsmath +varSigma cmm 167 0 mathord x amsmath +varUpsilon cmm 168 0 mathord x amsmath +varPhi cmm 169 0 mathord x amsmath +varPsi cmm 170 0 mathord x amsmath +varOmega cmm 173 0 mathord x amsmath + # # wasy astronomy # diff --git a/src/mathed/InsetMathSymbol.cpp b/src/mathed/InsetMathSymbol.cpp index b152388ee0..5d8b27f778 100644 --- a/src/mathed/InsetMathSymbol.cpp +++ b/src/mathed/InsetMathSymbol.cpp @@ -60,8 +60,12 @@ void InsetMathSymbol::metrics(MetricsInfo & mi, Dimension & dim) const // << "' drawn as: '" << sym_->draw // << "'" << endl; + bool const italic_upcase_greek = sym_->inset == "cmr" && + sym_->extra == "mathalpha" && + mi.base.fontname == "mathit"; + docstring const font = italic_upcase_greek ? from_ascii("cmm") : sym_->inset; int const em = mathed_char_width(mi.base.font, 'M'); - FontSetChanger dummy(mi.base, sym_->inset); + FontSetChanger dummy(mi.base, font); mathed_string_dim(mi.base.font, sym_->draw, dim); docstring::const_reverse_iterator rit = sym_->draw.rbegin(); kerning_ = mathed_char_kerning(mi.base.font, *rit); @@ -91,13 +95,18 @@ void InsetMathSymbol::draw(PainterInfo & pi, int x, int y) const // << "' in font: '" << sym_->inset // << "' drawn as: '" << sym_->draw // << "'" << endl; + + bool const italic_upcase_greek = sym_->inset == "cmr" && + sym_->extra == "mathalpha" && + pi.base.fontname == "mathit"; + docstring const font = italic_upcase_greek ? from_ascii("cmm") : sym_->inset; int const em = mathed_char_width(pi.base.font, 'M'); if (isRelOp()) x += static_cast(0.25*em+0.5); else x += static_cast(0.0833*em+0.5); - FontSetChanger dummy(pi.base, sym_->inset.c_str()); + FontSetChanger dummy(pi.base, font); pi.draw(x, y - h_, sym_->draw); } diff --git a/status.16x b/status.16x index fa0eb20d26..590d21e256 100644 --- a/status.16x +++ b/status.16x @@ -37,6 +37,9 @@ What's new - Allow Ctrl+Arrow to move between table cells (bug 1839). +- Add support for showing on screen italic uppercase Greek letters, + either inserted in a \mathit inset or through AMS macros (bug 4606). + * DOCUMENTATION AND LOCALIZATION