mirror of
https://git.lyx.org/repos/lyx.git
synced 2025-01-18 21:45:24 +00:00
require amsmath for some under/over arrows
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/branches/BRANCH_1_3_X@9437 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
be7b9c8296
commit
a8f5979a63
@ -1,3 +1,8 @@
|
||||
2005-01-03 Jean-Marc Lasgouttes <lasgouttes@lyx.org>
|
||||
|
||||
* math_decorationinset.C (ams, validate): new methods. Require
|
||||
amsmath when using AMS-LaTeX over and under arrows.
|
||||
|
||||
2004-12-22 Georg Baum <Georg.Baum@post.rwth-aachen.de>
|
||||
|
||||
* math_parser.C (addRow, addCol): new, try to add a row or column to
|
||||
|
@ -1,5 +1,6 @@
|
||||
#include <config.h>
|
||||
|
||||
#include "LaTeXFeatures.h"
|
||||
#include "math_decorationinset.h"
|
||||
#include "math_support.h"
|
||||
#include "math_parser.h"
|
||||
@ -71,6 +72,16 @@ bool MathDecorationInset::wide() const
|
||||
}
|
||||
|
||||
|
||||
bool MathDecorationInset::ams() const
|
||||
{
|
||||
return
|
||||
key_->name == "overleftrightarrow" ||
|
||||
key_->name == "underleftarrow" ||
|
||||
key_->name == "underrightarrow" ||
|
||||
key_->name == "underleftrightarrow";
|
||||
}
|
||||
|
||||
|
||||
void MathDecorationInset::metrics(MathMetricsInfo & mi) const
|
||||
{
|
||||
cell(0).metrics(mi);
|
||||
@ -101,6 +112,13 @@ void MathDecorationInset::draw(MathPainterInfo & pi, int x, int y) const
|
||||
}
|
||||
|
||||
|
||||
void MathDecorationInset::validate(LaTeXFeatures & features) const
|
||||
{
|
||||
if (ams())
|
||||
features.require("amsmath");
|
||||
}
|
||||
|
||||
|
||||
void MathDecorationInset::write(WriteStream & os) const
|
||||
{
|
||||
if (os.fragile() && protect())
|
||||
|
@ -26,6 +26,8 @@ public:
|
||||
///
|
||||
void metrics(MathMetricsInfo & mi) const;
|
||||
///
|
||||
void validate(LaTeXFeatures & features) const;
|
||||
///
|
||||
void normalize(NormalStream & os) const;
|
||||
///
|
||||
void infoize(std::ostream & os) const;
|
||||
@ -39,6 +41,8 @@ private:
|
||||
bool protect() const;
|
||||
/// is it a wide decoration?
|
||||
bool wide() const;
|
||||
/// does this need the amsmath package?
|
||||
bool ams() const;
|
||||
|
||||
///
|
||||
latexkeys const * key_;
|
||||
|
@ -41,6 +41,9 @@ What's new
|
||||
- Fix crash when reading equations containing more columns than allowed
|
||||
[bug 1542].
|
||||
|
||||
- Make sure that the amsmath package is used in LaTeX output when
|
||||
using some over and under arrows in equations.
|
||||
|
||||
- Fix output of mathbb and mathcal symbols via the math panel
|
||||
(xforms only) [bug 1214].
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user