diamondsuit cmsy 125 168 mathord x
heartsuit cmsy 126 169 mathord x
spadesuit cmsy 127 170 mathord x
-not cmsy 54 0 mathord x
+# We define \not as mathrel in order to align it properly
+not cmsy 54 0 mathrel x
coprod cmex 96 0 mathop x
bigvee cmex 87 0 mathop x
bigwedge cmex 86 0 mathop x
# pre-defined macros
#
-\def\longleftrightarrow{\leftarrow\kern-2mm\rightarrow}
-\def\Longleftrightarrow{\Leftarrow\kern-2mm\Rightarrow}
+\def\notin{\not\in}
+\def\slash{/}
+
+\def\longleftrightarrow{\leftarrow\kern-15mu\rightarrow}
+\def\Longleftrightarrow{\Leftarrow\kern-15mu\Rightarrow}
\def\doteq{\stackrel{\cdot}{\=}}
-\def\longrightarrow{\lyxbar\kern-2mm\rightarrow}
-\def\longleftarrow{\leftarrow\kern-2mm\lyxbar}
-\def\mapsto{\mapstochar\kern-2mm\rightarrow}
-\def\longmapsto{\mapstochar\kern-2mm\lyxbar\kern-6mu\rightarrow}
-\def\Longrightarrow{\lyxeq\kern-2mm\Rightarrow}
-\def\Longleftarrow{\Leftarrow\kern-2mm\lyxeq}
-\def\models{\vert\kern-2mm\lyxeq}
-\def\hookrightarrow{\lhook\kern-2mm\rightarrow}
-\def\hookleftarrow{\leftarrow\kern-2mm\rhook}
-\def\bowtie{\triangleright\kern-2mm\triangleleft}
+
+iffont cmsy
+\def\longrightarrow{\lyxbar\kern-11mu\rightarrow}
+\def\longleftarrow{\leftarrow\kern-11mu\lyxbar}
+\def\Longrightarrow{\lyxeq\kern-9mu\Rightarrow}
+\def\Longleftarrow{\Leftarrow\kern-9mu\lyxeq}
+\def\mapsto{\mapstochar\kern-12mu\rightarrow}
+\def\longmapsto{\mapstochar\kern-9mu\lyxbar\kern-11mu\rightarrow}
+\def\models{\vert\kern-7.5mu\lyxeq}
+end
+iffont cmm
+\def\hookrightarrow{\lhook\kern-13mu\rightarrow}
+\def\hookleftarrow{\leftarrow\kern-13mu\rhook}
+\def\bowtie{\triangleright\kern-6mu\triangleleft}
+end
+iffont msa
\def\dashrightarrow{\lyxdabar\lyxdabar\lyxright}
\def\dashleftarrow{\lyxleft\lyxdabar\lyxdabar}
\def\dasharrow{\dashrightarrow}
-\def\Join{\ltimes\kern-2mm\rtimes}
+end
+iffont msb
+\def\Join{\ltimes\kern-12mu\rtimes}
+end
\def\mathcircumflex{\mbox{\^{}}}
neq lyxsymbol 185 0 mathrel x
+2002-10-17 Dekel Tsur <dekelts@tau.ac.il>
+
+ * lyxlength.C (inPixels): Fix hanfling of negative length.
+ Fix LyXLength::MU case.
+
2002-10-16 John Levon <levon@movementarian.org>
* buffer.C: remove \\protected_separator parsing done by lyx2lyx now
#endif
double result = 0.0;
- int val_sign = val_ < 0.0 ? -1 : 1;
switch (unit_) {
case LyXLength::SP:
break;
case LyXLength::EX:
// Ex: The height of an "x"
- result = zoom * val_ * default_height / 2; // what to / width?
+ // 0.4305 is the ration between 1ex and 1em in cmr10
+ result = zoom * val_ * default_height * 0.4305;
break;
- case LyXLength::EM: // what to / width?
+ case LyXLength::EM:
// Em: The width of an "m"
- result = zoom * val_ * default_height / 2; // Why 2?
- break;
- case LyXLength::MU: // This is probably only allowed in
- // math mode
+ // 1em is approx 10points in cmr10
result = zoom * val_ * default_height;
break;
+ case LyXLength::MU:
+ // math unit = 1/18em
+ result = val_ * default_height / 18;
+ break;
case LyXLength::PCW: // Always % of workarea
case LyXLength::PTW:
case LyXLength::PPW:
result = 0; // this cannot happen
break;
}
- return static_cast<int>(result * val_sign + 0.5);
+ return static_cast<int>(result + ((result >= 0) ? 0.5 : -0.5));
}
+2002-10-17 Dekel Tsur <dekelts@tau.ac.il>
+
+ * math_kerninset.C (metrics): Use LyXLength::inPixels.
+
2002-10-14 Dekel Tsur <dekelts@tau.ac.il>
* math_factory.C (initSymbols): iffont.
#include "math_mathmlstream.h"
#include "math_streamstr.h"
#include "math_support.h"
-#include "lyxrc.h"
MathKernInset::MathKernInset()
}
-void MathKernInset::metrics(MathMetricsInfo & /*mi*/) const
+void MathKernInset::metrics(MathMetricsInfo & mi) const
{
- dim_.w = wid_.inBP();
+ dim_.w = wid_.inPixels(0, mathed_char_width(mi.base.font, 'M'));
dim_.a = 0;
dim_.d = 0;
}
#include "LaTeXFeatures.h"
#include "debug.h"
-
MathSymbolInset::MathSymbolInset(const latexkeys * l)
: sym_(l), h_(0)
{}
// << "' in font: '" << sym_->inset
// << "' drawn as: '" << sym_->draw
// << "'\n";
+
MathFontSetChanger dummy(mi.base, sym_->inset.c_str());
mathed_string_dim(mi.base.font, sym_->draw, dim_);
// correct height for broken cmex and wasy font
dim_.a += h_;
dim_.d -= h_;
}
- if (isRelOp())
- dim_.w += 6;
// seperate things a bit
- dim_.w += 2;
+ int em = mathed_char_width(mi.base.font, 'M');
+ if (name() == "not")
+ // \not is a special case.
+ // It must have 0 width to align properly with the next symbol.
+ dim_.w = 0;
+ else if (isRelOp())
+ dim_.w += static_cast<int>(0.5*em+0.5);
+ else
+ dim_.w += static_cast<int>(0.15*em+0.5);
scriptable_ = false;
if (mi.base.style == LM_ST_DISPLAY)
// << "' in font: '" << sym_->inset
// << "' drawn as: '" << sym_->draw
// << "'\n";
+ int em = mathed_char_width(pi.base.font, 'M');
+ // Here we don't need a special case for \not, as it needs the same
+ // increase in x as the next symbol.
if (isRelOp())
- x += 3;
- x += 1;
+ x += static_cast<int>(0.25*em+0.5);
+ else
+ x += static_cast<int>(0.075*em+0.5);
+
MathFontSetChanger dummy(pi.base, sym_->inset.c_str());
drawStr(pi, pi.base.font, x, y - h_, sym_->draw);
}