textsubscript and textsuperscript for tex2lyx

(deactivated until format is recent enough)


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@36839 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Georg Baum 2010-12-12 12:16:18 +00:00
parent e693a60c34
commit a4a7502769
3 changed files with 16 additions and 0 deletions

View File

@ -377,6 +377,9 @@ void handle_package(Parser &p, string const & name, string const & opts,
else if (name == "url")
; // ignore this
else if (LYX_FORMAT >= 408 && name == "subscript")
; // ignore this
else if (name == "color") {
// with the following command this package is only loaded when needed for
// undefined colors, since we only support the predefined colors

View File

@ -16,6 +16,7 @@
\providecommand{\makenomenclature}{\makeglossary}
\usepackage{varioref}
\usepackage{prettyref}
\usepackage{subscript}
\usepackage{graphicx}
@ -153,6 +154,9 @@ And what about special characters like hyphe\-nation mark,
ellipsis\ldots, and end-of-sentence\@. LyX also supports a menu
separator\lyxarrow{}and a spif\textcompwordmark{}fy ligature break.
A sub\textsubscript{sc\emph{ript}} and super\textsuperscript{script
with $a^2+b^2=c^2$ math}.
\printindex{}
\printnomenclature{}

View File

@ -2162,6 +2162,15 @@ void parse_text(Parser & p, ostream & os, unsigned flags, bool outer,
end_inset(os);
}
else if (LYX_FORMAT >= 408 &&
(t.cs() == "textsuperscript" || t.cs() == "textsubscript")) {
context.check_layout(os);
begin_inset(os, "script ");
os << t.cs().substr(4) << '\n';
parse_text_in_inset(p, os, FLAG_ITEM, false, context);
end_inset(os);
}
else if (is_known(t.cs(), known_quotes)) {
char const * const * where = is_known(t.cs(), known_quotes);
context.check_layout(os);