]> git.lyx.org Git - features.git/commitdiff
Use InsetLayout for LaTeX output.
authorRichard Heck <rgheck@lyx.org>
Tue, 17 Apr 2012 13:35:25 +0000 (09:35 -0400)
committerRichard Heck <rgheck@lyx.org>
Tue, 17 Apr 2012 13:35:25 +0000 (09:35 -0400)
lib/layouts/stdinsets.inc
src/insets/InsetScript.cpp
src/insets/InsetScript.h

index 1062b3485d2ef23a75da53add07cfde609c52816..62b5f2ffc546fc935b9d11d9d0186070d9bd24f1 100644 (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
index 3aa1b41ec4bb59aadfdb54427e562be6323ab68b..648b910e271381bfeba8e002c5d63012a4629d81 100644 (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;
index 07e5af9ab0685d855f617687f2ea050a77f00c87..c4b9445b2a0c04f0d6dac6ff27b276aa8b4eb480 100644 (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;