mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-22 18:08:10 +00:00
tex2lyx: register required packages for boxes
This commit is contained in:
parent
bcc423c7ea
commit
0471fe366a
@ -183,7 +183,7 @@ const char * const known_lyx_packages[] = {"amsbsy", "amsmath", "amssymb",
|
||||
"float", "fontspec", "graphicx", "hhline", "ifthen", "longtable", "makeidx",
|
||||
"multirow", "nomencl", "pdfpages", "prettyref", "refstyle", "rotating",
|
||||
"rotfloat", "splitidx", "setspace", "subscript", "textcomp", "tipa", "tipx",
|
||||
"tone", "ulem", "url", "varioref", "verbatim", "wrapfig", "xunicode", 0};
|
||||
"tone", "ulem", "url", "varioref", "verbatim", "wrapfig", "xcolor", "xunicode", 0};
|
||||
|
||||
// used for the handling of \newindex
|
||||
int index_number = 0;
|
||||
|
@ -1229,6 +1229,13 @@ void parse_box(Parser & p, ostream & os, unsigned outer_flags,
|
||||
if (shadow_size != "")
|
||||
shadow_size = "";
|
||||
}
|
||||
|
||||
// all boxes except of Frameless and Shaded require calc
|
||||
if (!(outer_type.empty() || outer_type == "mbox") &&
|
||||
!((outer_type == "shaded" && inner_type.empty()) ||
|
||||
(outer_type == "minipage" && inner_type == "shaded") ||
|
||||
(outer_type == "parbox" && inner_type == "shaded")))
|
||||
preamble.registerAutomaticallyLoadedPackage("calc");
|
||||
}
|
||||
|
||||
|
||||
@ -1684,6 +1691,7 @@ void parse_environment(Parser & p, ostream & os, bool outer,
|
||||
eat_whitespace(p, os, parent_context, false);
|
||||
parse_outer_box(p, os, FLAG_END, outer, parent_context, name, "");
|
||||
p.skip_spaces();
|
||||
preamble.registerAutomaticallyLoadedPackage("framed");
|
||||
}
|
||||
|
||||
else if (name == "lstlisting") {
|
||||
|
Loading…
Reference in New Issue
Block a user