From: Richard Heck Date: Tue, 17 Apr 2012 13:35:25 +0000 (-0400) Subject: Use InsetLayout for LaTeX output. X-Git-Tag: 2.1.0beta1~1933^2~32 X-Git-Url: https://git.lyx.org/gitweb/?a=commitdiff_plain;h=33022ebb5a3b926601be5216a0cc9524e4c32cc3;p=features.git Use InsetLayout for LaTeX output. --- diff --git a/lib/layouts/stdinsets.inc b/lib/layouts/stdinsets.inc index 1062b3485d..62b5f2ffc5 100644 --- a/lib/layouts/stdinsets.inc +++ b/lib/layouts/stdinsets.inc @@ -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 diff --git a/src/insets/InsetScript.cpp b/src/insets/InsetScript.cpp index 3aa1b41ec4..648b910e27 100644 --- a/src/insets/InsetScript.cpp +++ b/src/insets/InsetScript.cpp @@ -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; diff --git a/src/insets/InsetScript.h b/src/insets/InsetScript.h index 07e5af9ab0..c4b9445b2a 100644 --- a/src/insets/InsetScript.h +++ b/src/insets/InsetScript.h @@ -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;