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
This commit is contained in:
Richard Heck 2012-04-17 09:11:28 -04:00
parent 9b5da57623
commit 650ab1783a
4 changed files with 15 additions and 22 deletions

View 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

View 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");

View 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);
///

View 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