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")
; // ignore this
else if (name == "subscript")
; // ignore this
else if (name == "color") {
else if (name == "color" || name == "subscript" || name == "ulem") {
if (!in_lyx_preamble)
h_preamble << package_beg_sep << name
<< package_mid_sep << "\\usepackage{"
@ -687,13 +684,6 @@ void Preamble::handle_package(Parser &p, string const & name,
else if (name == "setspace")
; // 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")
; // Ignore this, the geometry settings are made by the \geometry
// command. This command is handled below.

View File

@ -19,6 +19,8 @@
\usepackage{framed}
\usepackage{calc}
\usepackage{fancybox}
\PassOptionsToPackage{normalem}{ulem}
\usepackage{ulem}
\setlength{\parskip}{3mm}
\setlength{\parindent}{0sp}
@ -223,9 +225,11 @@ Wavy underbar: \uwave{test}
Strike out: \sout{test}
Crossed out: \xout{test}
Noun: \noun{test}
Underbar, ephasized, stikreout: \emph{\uline{\sout{test}}}
Underbar, emphasized, strikeout: \emph{\uline{\sout{test}}}
\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);
context.check_layout(os);
os << "\n\\bar default\n";
preamble.registerAutomaticallyLoadedPackage("ulem");
}
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);
context.check_layout(os);
os << "\n\\strikeout default\n";
preamble.registerAutomaticallyLoadedPackage("ulem");
}
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);
context.check_layout(os);
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
@ -2918,6 +2922,8 @@ void parse_text(Parser & p, ostream & os, unsigned flags, bool outer,
os << t.cs().substr(4) << '\n';
parse_text_in_inset(p, os, FLAG_ITEM, false, context);
end_inset(os);
if (t.cs() == "textsubscript")
preamble.registerAutomaticallyLoadedPackage("subscript");
}
else if (is_known(t.cs(), known_quotes)) {