Use InsetLayout for LaTeX output.

This commit is contained in:
Richard Heck 2012-04-17 09:35:25 -04:00
parent 1c33d95adf
commit 33022ebb5a
3 changed files with 7 additions and 27 deletions

View File

@ -477,12 +477,19 @@ InsetLayout Preview
End
InsetLayout Script:superscript
LyXType standard
LatexType command
LaTeXName textsuperscript
MultiPar false
HTMLTag sup
HTMLIsBlock 0
End
InsetLayout Script:subscript
Requires subscript
LyXType standard
LatexType command
LaTeXName textsubscript
MultiPar false
HTMLTag sub
HTMLIsBlock 0

View File

@ -326,29 +326,6 @@ docstring InsetScript::toolTip(BufferView const &, int, int) const
}
void InsetScript::validate(LaTeXFeatures & features) const
{
if (params_.type == InsetScriptParams::Subscript)
features.require("subscript");
InsetText::validate(features);
}
void InsetScript::latex(otexstream & os, OutputParams const & runparams) const
{
switch (params_.type) {
case InsetScriptParams::Subscript:
os << "\\textsubscript{";
break;
case InsetScriptParams::Superscript:
os << "\\textsuperscript{";
break;
}
InsetText::latex(os, runparams);
os << "}";
}
int InsetScript::plaintext(odocstream & os, OutputParams const & runparams) const
{
odocstringstream oss;

View File

@ -86,10 +86,6 @@ public:
///
bool allowParagraphCustomization(idx_type = 0) const { return false; }
///
virtual void validate(LaTeXFeatures &) const;
///
void latex(otexstream &, OutputParams const &) const;
///
int plaintext(odocstream &, OutputParams const &) const;
///
int docbook(odocstream &, OutputParams const &) const;