From: André Pönitz Date: Tue, 9 Jul 2002 13:38:27 +0000 (+0000) Subject: support for wasy symbols X-Git-Tag: 1.6.10~18935 X-Git-Url: https://git.lyx.org/gitweb/?a=commitdiff_plain;h=2c3ae20fc2ed8a1e9d8e46be5b20d3fc88b48dfc;p=features.git support for wasy symbols git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@4566 a592a061-630c-0410-9148-cb99ea01b6c8 --- diff --git a/src/ChangeLog b/src/ChangeLog index 6659c48b69..0b2d7deb82 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,4 +1,8 @@ +2002-07-09 André Pönitz + + * lyxfont.[Ch]: support for wasy symbols + 2002-07-08 André Pönitz * BufferView_pimpl.C: apply John's patch for #93. diff --git a/src/LaTeXFeatures.C b/src/LaTeXFeatures.C index 2010eca80c..1648699972 100644 --- a/src/LaTeXFeatures.C +++ b/src/LaTeXFeatures.C @@ -141,7 +141,8 @@ char const * simplefeatures[] = { "floatflt", "varioref", "prettyref", - "float" + "float", + "wasy" }; const int nb_simplefeatures = sizeof(simplefeatures) / sizeof(char const *); @@ -154,21 +155,20 @@ string const LaTeXFeatures::getPackages() const LyXTextClass const & tclass = textclasslist[params.textclass]; - /** - * These are all the 'simple' includes. i.e - * packages which we just \usepackage{package} - **/ - for (int i = 0 ; i < nb_simplefeatures ; ++i) { + // + // These are all the 'simple' includes. i.e + // packages which we just \usepackage{package} + // + for (int i = 0; i < nb_simplefeatures; ++i) { if (isRequired(simplefeatures[i])) packages << "\\usepackage{" - << simplefeatures[i] - << "}\n"; + << simplefeatures[i] << "}\n"; } - /** - * The rest of these packages are somewhat more complicated - * than those above. - **/ + // + // The rest of these packages are somewhat more complicated + // than those above. + // if (isRequired("amsmath") && ! tclass.provides(LyXTextClass::amsmath)) { diff --git a/src/frontends/xforms/xfont_loader.C b/src/frontends/xforms/xfont_loader.C index 5008192fe3..44426af45a 100644 --- a/src/frontends/xforms/xfont_loader.C +++ b/src/frontends/xforms/xfont_loader.C @@ -147,6 +147,11 @@ void xfont_loader::getFontinfo(LyXFont::FONT_FAMILY family, new FontInfo("-*-eufm10-medium-*-*-*-*-*-*-*-*-*-*-*"); return; + case LyXFont::WASY_FAMILY: + fontinfo[family][series][shape] = + new FontInfo("-*-wasy10-medium-*-*-*-*-*-*-*-*-*-*-*"); + return; + default: break; } diff --git a/src/lyxfont.C b/src/lyxfont.C index c3067a8400..8cd660eed0 100644 --- a/src/lyxfont.C +++ b/src/lyxfont.C @@ -41,7 +41,7 @@ namespace { char const * GUIFamilyNames[LyXFont::NUM_FAMILIES + 2 /* default & error */] = { 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") }; char const * GUISeriesNames[4] = @@ -65,7 +65,7 @@ char const * GUIMiscNames[5] = // char const * LyXFamilyNames[LyXFont::NUM_FAMILIES + 2 /* default & error */] = { "roman", "sans", "typewriter", "symbol", - "cmr", "cmsy", "cmm", "cmex", "msa", "msb", "eufrak", + "cmr", "cmsy", "cmm", "cmex", "msa", "msb", "eufrak", "wasy", "default", "error" }; char const * LyXSeriesNames[4] = diff --git a/src/lyxfont.h b/src/lyxfont.h index 3cb1edd795..39da3b0489 100644 --- a/src/lyxfont.h +++ b/src/lyxfont.h @@ -59,6 +59,8 @@ public: /// EUFRAK_FAMILY, /// + WASY_FAMILY, + /// INHERIT_FAMILY, /// IGNORE_FAMILY, @@ -425,6 +427,7 @@ bool LyXFont::isSymbolFont() const case LyXFont::CMEX_FAMILY: case LyXFont::MSA_FAMILY: case LyXFont::MSB_FAMILY: + case LyXFont::WASY_FAMILY: return true; default: return false; diff --git a/src/mathed/math_braceinset.C b/src/mathed/math_braceinset.C index 1d27ce03cb..81d3cc4bfd 100644 --- a/src/mathed/math_braceinset.C +++ b/src/mathed/math_braceinset.C @@ -55,3 +55,9 @@ void MathBraceInset::normalize(NormalStream & os) const { os << "[block " << cell(0) << ']'; } + + +void MathBraceInset::infoize(std::ostream & os) const +{ + os << "Nested Block: "; +} diff --git a/src/mathed/math_braceinset.h b/src/mathed/math_braceinset.h index a240999731..c655c9fe1b 100644 --- a/src/mathed/math_braceinset.h +++ b/src/mathed/math_braceinset.h @@ -29,6 +29,8 @@ public: void normalize(NormalStream & ns) const; /// void metrics(MathMetricsInfo & mi) const; + /// + void MathBraceInset::infoize(std::ostream & os) const; private: /// width of brace character diff --git a/src/mathed/math_cursor.C b/src/mathed/math_cursor.C index a0b5e7578c..4fc64187ec 100644 --- a/src/mathed/math_cursor.C +++ b/src/mathed/math_cursor.C @@ -727,6 +727,7 @@ void MathCursor::getPos(int & x, int & y) if (array().empty()) x += 2; y = xarray().yo(); + lyxerr << "getPos: " << x << " " << y << "\n"; } @@ -768,7 +769,7 @@ MathCursor::pos_type & MathCursor::pos() MathUnknownInset * MathCursor::inMacroMode() const { - if (pos() == 0) + if (!hasPrevAtom()) return 0; MathUnknownInset * p = prevAtom()->asUnknownInset(); return (p && !p->final()) ? p : 0; @@ -1444,10 +1445,15 @@ bool MathCursor::interpret(char c) return true; } - // leave autocorrect mode if necessary - if (autocorrect_ && c == ' ') { - autocorrect_ = false; - return true; + // This is annoying as one has to press far too often. + // Disable it. + + if (0) { + // leave autocorrect mode if necessary + if (autocorrect_ && c == ' ') { + autocorrect_ = false; + return true; + } } // just clear selection on pressing the space bar @@ -1536,8 +1542,8 @@ bool MathCursor::interpret(char c) */ // try auto-correction - if (autocorrect_ && hasPrevAtom() && math_autocorrect(prevAtom(), c)) - return true; + //if (autocorrect_ && hasPrevAtom() && math_autocorrect(prevAtom(), c)) + // return true; // no special circumstances, so insert the character without any fuss insert(c); diff --git a/src/mathed/math_hullinset.C b/src/mathed/math_hullinset.C index 3c77873eed..739a945f5c 100644 --- a/src/mathed/math_hullinset.C +++ b/src/mathed/math_hullinset.C @@ -193,6 +193,7 @@ void MathHullInset::metrics(MathMetricsInfo & mi) const // for markers width_ += 2; 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); } diff --git a/src/mathed/math_support.C b/src/mathed/math_support.C index 9ebc37d227..a02fa2ccfd 100644 --- a/src/mathed/math_support.C +++ b/src/mathed/math_support.C @@ -554,6 +554,7 @@ fontinfo fontinfos[] = { {"eufrak", LyXFont::EUFRAK_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}, + {"wasy", LyXFont::WASY_FAMILY, inh_series, inh_shape, LColor::math}, {"text", inh_family, inh_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},