]> git.lyx.org Git - features.git/commitdiff
Use InsetLayout to style the XHTML output.
authorRichard Heck <rgheck@lyx.org>
Tue, 17 Apr 2012 13:11:28 +0000 (09:11 -0400)
committerRichard Heck <rgheck@lyx.org>
Tue, 17 Apr 2012 13:28:28 +0000 (09:28 -0400)
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

lib/layouts/stdinsets.inc
src/insets/InsetScript.cpp
src/insets/InsetScript.h
status.20x

index c5826029b949a0dfc1dd272ca13db66a0112ada6..87a1577950b9b46de10e788465a08ffdcd3e9367 100644 (file)
@@ -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
index 32c83ff161eb2a106ae89eb5760a63ab1eb7531f..3de5c04fd6d710dc6a0ef96b76a8eaca7c82e32f 100644 (file)
@@ -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");
index e558a76294a2d69eb8f887a42a1f3e1042b106af..5931165886f82b6e68fd8256b707991415d9b7db 100644 (file)
@@ -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);
        ///
index 761e32f2e60fc3430d48cc6bf9c2571dd80afb63..4137e60d3b7becae79f19b66501ee5bc0df29682 100644 (file)
@@ -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