mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-12-22 13:18:28 +00:00
support for wasy symbols
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@4566 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
b23d2ad302
commit
2c3ae20fc2
@ -1,4 +1,8 @@
|
|||||||
|
|
||||||
|
2002-07-09 André Pönitz <poenitz@gmx.net>
|
||||||
|
|
||||||
|
* lyxfont.[Ch]: support for wasy symbols
|
||||||
|
|
||||||
2002-07-08 André Pönitz <poenitz@gmx.net>
|
2002-07-08 André Pönitz <poenitz@gmx.net>
|
||||||
|
|
||||||
* BufferView_pimpl.C: apply John's patch for #93.
|
* BufferView_pimpl.C: apply John's patch for #93.
|
||||||
|
@ -141,7 +141,8 @@ char const * simplefeatures[] = {
|
|||||||
"floatflt",
|
"floatflt",
|
||||||
"varioref",
|
"varioref",
|
||||||
"prettyref",
|
"prettyref",
|
||||||
"float"
|
"float",
|
||||||
|
"wasy"
|
||||||
};
|
};
|
||||||
|
|
||||||
const int nb_simplefeatures = sizeof(simplefeatures) / sizeof(char const *);
|
const int nb_simplefeatures = sizeof(simplefeatures) / sizeof(char const *);
|
||||||
@ -154,21 +155,20 @@ string const LaTeXFeatures::getPackages() const
|
|||||||
LyXTextClass const & tclass = textclasslist[params.textclass];
|
LyXTextClass const & tclass = textclasslist[params.textclass];
|
||||||
|
|
||||||
|
|
||||||
/**
|
//
|
||||||
* These are all the 'simple' includes. i.e
|
// These are all the 'simple' includes. i.e
|
||||||
* packages which we just \usepackage{package}
|
// packages which we just \usepackage{package}
|
||||||
**/
|
//
|
||||||
for (int i = 0 ; i < nb_simplefeatures ; ++i) {
|
for (int i = 0; i < nb_simplefeatures; ++i) {
|
||||||
if (isRequired(simplefeatures[i]))
|
if (isRequired(simplefeatures[i]))
|
||||||
packages << "\\usepackage{"
|
packages << "\\usepackage{"
|
||||||
<< simplefeatures[i]
|
<< simplefeatures[i] << "}\n";
|
||||||
<< "}\n";
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
//
|
||||||
* The rest of these packages are somewhat more complicated
|
// The rest of these packages are somewhat more complicated
|
||||||
* than those above.
|
// than those above.
|
||||||
**/
|
//
|
||||||
|
|
||||||
if (isRequired("amsmath")
|
if (isRequired("amsmath")
|
||||||
&& ! tclass.provides(LyXTextClass::amsmath)) {
|
&& ! tclass.provides(LyXTextClass::amsmath)) {
|
||||||
|
@ -147,6 +147,11 @@ void xfont_loader::getFontinfo(LyXFont::FONT_FAMILY family,
|
|||||||
new FontInfo("-*-eufm10-medium-*-*-*-*-*-*-*-*-*-*-*");
|
new FontInfo("-*-eufm10-medium-*-*-*-*-*-*-*-*-*-*-*");
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
case LyXFont::WASY_FAMILY:
|
||||||
|
fontinfo[family][series][shape] =
|
||||||
|
new FontInfo("-*-wasy10-medium-*-*-*-*-*-*-*-*-*-*-*");
|
||||||
|
return;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -41,7 +41,7 @@ namespace {
|
|||||||
|
|
||||||
char const * GUIFamilyNames[LyXFont::NUM_FAMILIES + 2 /* default & error */] =
|
char const * GUIFamilyNames[LyXFont::NUM_FAMILIES + 2 /* default & error */] =
|
||||||
{ N_("Roman"), N_("Sans serif"), N_("Typewriter"), N_("Symbol"),
|
{ N_("Roman"), N_("Sans serif"), N_("Typewriter"), N_("Symbol"),
|
||||||
"cmr", "cmsy", "cmm", "cmex", "msa", "msb", "eufrak",
|
"cmr", "cmsy", "cmm", "cmex", "msa", "msb", "eufrak", "wasy",
|
||||||
N_("Inherit"), N_("Ignore") };
|
N_("Inherit"), N_("Ignore") };
|
||||||
|
|
||||||
char const * GUISeriesNames[4] =
|
char const * GUISeriesNames[4] =
|
||||||
@ -65,7 +65,7 @@ char const * GUIMiscNames[5] =
|
|||||||
//
|
//
|
||||||
char const * LyXFamilyNames[LyXFont::NUM_FAMILIES + 2 /* default & error */] =
|
char const * LyXFamilyNames[LyXFont::NUM_FAMILIES + 2 /* default & error */] =
|
||||||
{ "roman", "sans", "typewriter", "symbol",
|
{ "roman", "sans", "typewriter", "symbol",
|
||||||
"cmr", "cmsy", "cmm", "cmex", "msa", "msb", "eufrak",
|
"cmr", "cmsy", "cmm", "cmex", "msa", "msb", "eufrak", "wasy",
|
||||||
"default", "error" };
|
"default", "error" };
|
||||||
|
|
||||||
char const * LyXSeriesNames[4] =
|
char const * LyXSeriesNames[4] =
|
||||||
|
@ -59,6 +59,8 @@ public:
|
|||||||
///
|
///
|
||||||
EUFRAK_FAMILY,
|
EUFRAK_FAMILY,
|
||||||
///
|
///
|
||||||
|
WASY_FAMILY,
|
||||||
|
///
|
||||||
INHERIT_FAMILY,
|
INHERIT_FAMILY,
|
||||||
///
|
///
|
||||||
IGNORE_FAMILY,
|
IGNORE_FAMILY,
|
||||||
@ -425,6 +427,7 @@ bool LyXFont::isSymbolFont() const
|
|||||||
case LyXFont::CMEX_FAMILY:
|
case LyXFont::CMEX_FAMILY:
|
||||||
case LyXFont::MSA_FAMILY:
|
case LyXFont::MSA_FAMILY:
|
||||||
case LyXFont::MSB_FAMILY:
|
case LyXFont::MSB_FAMILY:
|
||||||
|
case LyXFont::WASY_FAMILY:
|
||||||
return true;
|
return true;
|
||||||
default:
|
default:
|
||||||
return false;
|
return false;
|
||||||
|
@ -55,3 +55,9 @@ void MathBraceInset::normalize(NormalStream & os) const
|
|||||||
{
|
{
|
||||||
os << "[block " << cell(0) << ']';
|
os << "[block " << cell(0) << ']';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void MathBraceInset::infoize(std::ostream & os) const
|
||||||
|
{
|
||||||
|
os << "Nested Block: ";
|
||||||
|
}
|
||||||
|
@ -29,6 +29,8 @@ public:
|
|||||||
void normalize(NormalStream & ns) const;
|
void normalize(NormalStream & ns) const;
|
||||||
///
|
///
|
||||||
void metrics(MathMetricsInfo & mi) const;
|
void metrics(MathMetricsInfo & mi) const;
|
||||||
|
///
|
||||||
|
void MathBraceInset::infoize(std::ostream & os) const;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
/// width of brace character
|
/// width of brace character
|
||||||
|
@ -727,6 +727,7 @@ void MathCursor::getPos(int & x, int & y)
|
|||||||
if (array().empty())
|
if (array().empty())
|
||||||
x += 2;
|
x += 2;
|
||||||
y = xarray().yo();
|
y = xarray().yo();
|
||||||
|
lyxerr << "getPos: " << x << " " << y << "\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -768,7 +769,7 @@ MathCursor::pos_type & MathCursor::pos()
|
|||||||
|
|
||||||
MathUnknownInset * MathCursor::inMacroMode() const
|
MathUnknownInset * MathCursor::inMacroMode() const
|
||||||
{
|
{
|
||||||
if (pos() == 0)
|
if (!hasPrevAtom())
|
||||||
return 0;
|
return 0;
|
||||||
MathUnknownInset * p = prevAtom()->asUnknownInset();
|
MathUnknownInset * p = prevAtom()->asUnknownInset();
|
||||||
return (p && !p->final()) ? p : 0;
|
return (p && !p->final()) ? p : 0;
|
||||||
@ -1444,10 +1445,15 @@ bool MathCursor::interpret(char c)
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
// leave autocorrect mode if necessary
|
// This is annoying as one has to press <space> far too often.
|
||||||
if (autocorrect_ && c == ' ') {
|
// Disable it.
|
||||||
autocorrect_ = false;
|
|
||||||
return true;
|
if (0) {
|
||||||
|
// leave autocorrect mode if necessary
|
||||||
|
if (autocorrect_ && c == ' ') {
|
||||||
|
autocorrect_ = false;
|
||||||
|
return true;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// just clear selection on pressing the space bar
|
// just clear selection on pressing the space bar
|
||||||
@ -1536,8 +1542,8 @@ bool MathCursor::interpret(char c)
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
// try auto-correction
|
// try auto-correction
|
||||||
if (autocorrect_ && hasPrevAtom() && math_autocorrect(prevAtom(), c))
|
//if (autocorrect_ && hasPrevAtom() && math_autocorrect(prevAtom(), c))
|
||||||
return true;
|
// return true;
|
||||||
|
|
||||||
// no special circumstances, so insert the character without any fuss
|
// no special circumstances, so insert the character without any fuss
|
||||||
insert(c);
|
insert(c);
|
||||||
|
@ -193,6 +193,7 @@ void MathHullInset::metrics(MathMetricsInfo & mi) const
|
|||||||
// for markers
|
// for markers
|
||||||
width_ += 2;
|
width_ += 2;
|
||||||
descent_ += 1;
|
descent_ += 1;
|
||||||
|
ascent_ += 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -210,7 +211,7 @@ void MathHullInset::draw(MathPainterInfo & pi, int x, int y) const
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
drawMarkers(pi, x, y);
|
drawMarkers2(pi, x, y);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -554,6 +554,7 @@ fontinfo fontinfos[] = {
|
|||||||
{"eufrak", LyXFont::EUFRAK_FAMILY, inh_series, inh_shape, LColor::math},
|
{"eufrak", LyXFont::EUFRAK_FAMILY, inh_series, inh_shape, LColor::math},
|
||||||
{"msa", LyXFont::MSA_FAMILY, inh_series, inh_shape, LColor::math},
|
{"msa", LyXFont::MSA_FAMILY, inh_series, inh_shape, LColor::math},
|
||||||
{"msb", LyXFont::MSB_FAMILY, inh_series, inh_shape, LColor::math},
|
{"msb", LyXFont::MSB_FAMILY, inh_series, inh_shape, LColor::math},
|
||||||
|
{"wasy", LyXFont::WASY_FAMILY, inh_series, inh_shape, LColor::math},
|
||||||
{"text", inh_family, inh_series, inh_shape, LColor::black},
|
{"text", inh_family, inh_series, inh_shape, LColor::black},
|
||||||
{"textbf", inh_family, LyXFont::BOLD_SERIES, inh_shape, LColor::black},
|
{"textbf", inh_family, LyXFont::BOLD_SERIES, inh_shape, LColor::black},
|
||||||
{"textit", inh_family, inh_series, LyXFont::ITALIC_SHAPE, LColor::black},
|
{"textit", inh_family, inh_series, LyXFont::ITALIC_SHAPE, LColor::black},
|
||||||
|
Loading…
Reference in New Issue
Block a user