mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-09 18:31:04 +00:00
Improve CAS output of math macros
Previously, things like [ name ] where exported for computer algebra systems. Now, the expanded macros are exported, which may still be wrong, but now the CAS has at least a chance to understand what was meant.
This commit is contained in:
parent
34d0e997c4
commit
d48855cdfe
@ -73,12 +73,21 @@ public:
|
|||||||
|
|
||||||
mathMacro_.macro()->lock();
|
mathMacro_.macro()->lock();
|
||||||
}
|
}
|
||||||
// FIXME Other external things need similar treatment.
|
// write(), normalize(), infoize() and infoize2() are not needed since
|
||||||
|
// MathMacro uses the definition and not the expanded cells.
|
||||||
|
///
|
||||||
|
void maple(MapleStream & ms) const { ms << mathMacro_.cell(idx_); }
|
||||||
|
///
|
||||||
|
void maxima(MaximaStream & ms) const { ms << mathMacro_.cell(idx_); }
|
||||||
|
///
|
||||||
|
void mathematica(MathematicaStream & ms) const { ms << mathMacro_.cell(idx_); }
|
||||||
///
|
///
|
||||||
void mathmlize(MathStream & ms) const { ms << mathMacro_.cell(idx_); }
|
void mathmlize(MathStream & ms) const { ms << mathMacro_.cell(idx_); }
|
||||||
///
|
///
|
||||||
void htmlize(HtmlStream & ms) const { ms << mathMacro_.cell(idx_); }
|
void htmlize(HtmlStream & ms) const { ms << mathMacro_.cell(idx_); }
|
||||||
///
|
///
|
||||||
|
void octave(OctaveStream & os) const { os << mathMacro_.cell(idx_); }
|
||||||
|
///
|
||||||
void draw(PainterInfo & pi, int x, int y) const {
|
void draw(PainterInfo & pi, int x, int y) const {
|
||||||
if (mathMacro_.editMetrics(pi.base.bv)) {
|
if (mathMacro_.editMetrics(pi.base.bv)) {
|
||||||
// The only way a ArgumentProxy can appear is in a cell of the
|
// The only way a ArgumentProxy can appear is in a cell of the
|
||||||
@ -791,6 +800,18 @@ void MathMacro::maple(MapleStream & os) const
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void MathMacro::maxima(MaximaStream & os) const
|
||||||
|
{
|
||||||
|
lyx::maxima(expanded_.cell(0), os);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void MathMacro::mathematica(MathematicaStream & os) const
|
||||||
|
{
|
||||||
|
lyx::mathematica(expanded_.cell(0), os);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
void MathMacro::mathmlize(MathStream & os) const
|
void MathMacro::mathmlize(MathStream & os) const
|
||||||
{
|
{
|
||||||
// macro_ is 0 if this is an unknown macro
|
// macro_ is 0 if this is an unknown macro
|
||||||
|
@ -73,6 +73,10 @@ public:
|
|||||||
///
|
///
|
||||||
void maple(MapleStream &) const;
|
void maple(MapleStream &) const;
|
||||||
///
|
///
|
||||||
|
void maxima(MaximaStream &) const;
|
||||||
|
///
|
||||||
|
void mathematica(MathematicaStream &) const;
|
||||||
|
///
|
||||||
void mathmlize(MathStream &) const;
|
void mathmlize(MathStream &) const;
|
||||||
///
|
///
|
||||||
void htmlize(HtmlStream &) const;
|
void htmlize(HtmlStream &) const;
|
||||||
|
Loading…
Reference in New Issue
Block a user