From: Richard Heck Date: Tue, 17 Apr 2012 13:11:28 +0000 (-0400) Subject: Use InsetLayout to style the XHTML output. X-Git-Tag: 2.0.4~135 X-Git-Url: https://git.lyx.org/gitweb/?a=commitdiff_plain;h=650ab1783a8426920ecf15e93a43837adccda4c3;p=features.git Use InsetLayout to style the XHTML output. Note that we have also changed the layout name to uppercase, but this should be fine, since it was so far unused. Conflicts: src/insets/InsetScript.cpp --- diff --git a/lib/layouts/stdinsets.inc b/lib/layouts/stdinsets.inc index c5826029b9..87a1577950 100644 --- a/lib/layouts/stdinsets.inc +++ b/lib/layouts/stdinsets.inc @@ -445,3 +445,15 @@ InsetLayout Preview Decoration minimalistic MultiPar true End + +InsetLayout Script:superscript + MultiPar false + HTMLTag sup + HTMLIsBlock 0 +End + +InsetLayout Script:subscript + MultiPar false + HTMLTag sub + HTMLIsBlock 0 +End diff --git a/src/insets/InsetScript.cpp b/src/insets/InsetScript.cpp index 32c83ff161..3de5c04fd6 100644 --- a/src/insets/InsetScript.cpp +++ b/src/insets/InsetScript.cpp @@ -145,7 +145,7 @@ InsetScript::~InsetScript() docstring InsetScript::layoutName() const { - return from_ascii("script:" + scripttranslator().find(params_.type)); + return from_ascii("Script:" + scripttranslator().find(params_.type)); } @@ -402,25 +402,6 @@ int InsetScript::docbook(odocstream & os, OutputParams const & runparams) const } -docstring InsetScript::xhtml(XHTMLStream & xs, OutputParams const & runparams) const -{ - string cmdname; - switch (params_.type) { - case InsetScriptParams::Subscript: - cmdname = "sub"; - break; - case InsetScriptParams::Superscript: - cmdname = "sup"; - break; - } - - xs << html::StartTag(cmdname); - docstring const ret = InsetText::xhtml(xs, runparams); - xs << html::EndTag(cmdname); - return ret; -} - - docstring InsetScript::contextMenuName() const { return from_ascii("context-script"); diff --git a/src/insets/InsetScript.h b/src/insets/InsetScript.h index e558a76294..5931165886 100644 --- a/src/insets/InsetScript.h +++ b/src/insets/InsetScript.h @@ -94,8 +94,6 @@ public: /// int docbook(odocstream &, OutputParams const &) const; /// - docstring xhtml(XHTMLStream &, OutputParams const &) const; - /// void edit(Cursor & cur, bool front, EntryDirection entry_from = ENTRY_DIRECTION_IGNORE); /// diff --git a/status.20x b/status.20x index 761e32f2e6..4137e60d3b 100644 --- a/status.20x +++ b/status.20x @@ -94,6 +94,8 @@ What's new flag by using the same latex backend used for previewing the document instead of always using the plain latex backend. +- Fixed XHTML export of sub- and superscripts. + * USER INTERFACE