Only the packages subscript and ulem if they are automatically loaded

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@40097 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Georg Baum 2011-10-30 18:51:41 +00:00
parent f8cc30a1f2
commit b436f71b33
3 changed files with 12 additions and 12 deletions

View File

@ -671,10 +671,7 @@ void Preamble::handle_package(Parser &p, string const & name,
else if (name == "url") else if (name == "url")
; // ignore this ; // ignore this
else if (name == "subscript") else if (name == "color" || name == "subscript" || name == "ulem") {
; // ignore this
else if (name == "color") {
if (!in_lyx_preamble) if (!in_lyx_preamble)
h_preamble << package_beg_sep << name h_preamble << package_beg_sep << name
<< package_mid_sep << "\\usepackage{" << package_mid_sep << "\\usepackage{"
@ -687,13 +684,6 @@ void Preamble::handle_package(Parser &p, string const & name,
else if (name == "setspace") else if (name == "setspace")
; // ignore this ; // ignore this
#if 0
// do not ignore as long as we don't support all commands (e.g. \xout is missing)
// and as long as we don't support change tracking
else if (name == "ulem")
; // ignore this
#endif
else if (name == "geometry") else if (name == "geometry")
; // Ignore this, the geometry settings are made by the \geometry ; // Ignore this, the geometry settings are made by the \geometry
// command. This command is handled below. // command. This command is handled below.

View File

@ -19,6 +19,8 @@
\usepackage{framed} \usepackage{framed}
\usepackage{calc} \usepackage{calc}
\usepackage{fancybox} \usepackage{fancybox}
\PassOptionsToPackage{normalem}{ulem}
\usepackage{ulem}
\setlength{\parskip}{3mm} \setlength{\parskip}{3mm}
\setlength{\parindent}{0sp} \setlength{\parindent}{0sp}
@ -223,9 +225,11 @@ Wavy underbar: \uwave{test}
Strike out: \sout{test} Strike out: \sout{test}
Crossed out: \xout{test}
Noun: \noun{test} Noun: \noun{test}
Underbar, ephasized, stikreout: \emph{\uline{\sout{test}}} Underbar, emphasized, strikeout: \emph{\uline{\sout{test}}}
\section{Paragraph spacing} \section{Paragraph spacing}

View File

@ -2591,6 +2591,7 @@ void parse_text(Parser & p, ostream & os, unsigned flags, bool outer,
parse_text_snippet(p, os, FLAG_ITEM, outer, context); parse_text_snippet(p, os, FLAG_ITEM, outer, context);
context.check_layout(os); context.check_layout(os);
os << "\n\\bar default\n"; os << "\n\\bar default\n";
preamble.registerAutomaticallyLoadedPackage("ulem");
} }
else if (t.cs() == "sout") { else if (t.cs() == "sout") {
@ -2599,6 +2600,7 @@ void parse_text(Parser & p, ostream & os, unsigned flags, bool outer,
parse_text_snippet(p, os, FLAG_ITEM, outer, context); parse_text_snippet(p, os, FLAG_ITEM, outer, context);
context.check_layout(os); context.check_layout(os);
os << "\n\\strikeout default\n"; os << "\n\\strikeout default\n";
preamble.registerAutomaticallyLoadedPackage("ulem");
} }
else if (t.cs() == "uuline" || t.cs() == "uwave" || else if (t.cs() == "uuline" || t.cs() == "uwave" ||
@ -2608,6 +2610,8 @@ void parse_text(Parser & p, ostream & os, unsigned flags, bool outer,
parse_text_snippet(p, os, FLAG_ITEM, outer, context); parse_text_snippet(p, os, FLAG_ITEM, outer, context);
context.check_layout(os); context.check_layout(os);
os << "\n\\" << t.cs() << " default\n"; os << "\n\\" << t.cs() << " default\n";
if (t.cs() == "uuline" || t.cs() == "uwave")
preamble.registerAutomaticallyLoadedPackage("ulem");
} }
// FIXME, the inset layout should be plain, not standard, see bug #7846 // FIXME, the inset layout should be plain, not standard, see bug #7846
@ -2918,6 +2922,8 @@ void parse_text(Parser & p, ostream & os, unsigned flags, bool outer,
os << t.cs().substr(4) << '\n'; os << t.cs().substr(4) << '\n';
parse_text_in_inset(p, os, FLAG_ITEM, false, context); parse_text_in_inset(p, os, FLAG_ITEM, false, context);
end_inset(os); end_inset(os);
if (t.cs() == "textsubscript")
preamble.registerAutomaticallyLoadedPackage("subscript");
} }
else if (is_known(t.cs(), known_quotes)) { else if (is_known(t.cs(), known_quotes)) {