for (int row = 0; row < nrows(); ++row) {
for (int col = 0; col < ncols(); ++col) {
- os << eocString(col);
cell(index(row, col)).write(os, fragile);
+ os << eocString(col);
}
if (n) {
if (!label_[row].empty())
#endif
#include "math_sizeinset.h"
+#include "math_parser.h"
#include "support/LOstream.h"
-MathSizeInset::MathSizeInset(MathStyles st)
- : MathNestInset(1), style_(st)
+MathSizeInset::MathSizeInset(latexkeys const * l)
+ : MathNestInset(1), key_(l)
{}
-char const * MathSizeInset::name() const
-{
- switch (style_) {
- case LM_ST_DISPLAY:
- return "displaystyle";
- case LM_ST_TEXT:
- return "textstyle";
- case LM_ST_SCRIPT:
- return "scriptstyle";
- case LM_ST_SCRIPTSCRIPT:
- return "scriptscriptstyle";
- }
- return "unknownstyle";
-}
-
-
MathInset * MathSizeInset::clone() const
{
return new MathSizeInset(*this);
void MathSizeInset::metrics(MathStyles /* st */) const
{
- xcell(0).metrics(style_);
+ xcell(0).metrics(MathStyles(key_->id));
ascent_ = xcell(0).ascent_;
descent_ = xcell(0).descent_;
width_ = xcell(0).width_;
void MathSizeInset::write(std::ostream & os, bool fragile) const
{
- os << "{\\" << name() << " ";
+ os << "{\\" << key_->name << " ";
cell(0).write(os, fragile);
os << "}";
}
void MathSizeInset::writeNormal(std::ostream & os) const
{
- os << "[" << name() << " ";
+ os << "[" << key_->name << " ";
cell(0).writeNormal(os);
os << "]";
}
#endif
/** An inset for \scriptsize etc
- \author André Poenitz
+ \author André Pönitz
*/
+class latexkeys;
+
class MathSizeInset : public MathNestInset {
public:
///
- explicit MathSizeInset(MathStyles st);
+ explicit MathSizeInset(latexkeys const * l);
///
MathInset * clone() const;
///
void writeNormal(std::ostream &) const;
private:
- ///
- char const * name() const;
///
- MathStyles style_;
+ latexkeys const * key_;
};
#endif