mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-29 13:04:58 +00:00
BufferParams.cpp: load the subfig package conditionally to make it work with the caption package
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@24746 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
57d653669a
commit
842587a1a6
@ -1296,6 +1296,19 @@ bool BufferParams::writeLaTeX(odocstream & os, LaTeXFeatures & features,
|
||||
"User specified LaTeX commands.\n"
|
||||
+ from_utf8(preamble) + '\n';
|
||||
|
||||
// subfig loads internally the LaTeX package "caption". As caption is a very
|
||||
// popular package, users will load it in the preamble. Therefore we must load
|
||||
// subfig behind the user-defined preamble and check if the caption package
|
||||
// was loaded or not.
|
||||
// For the case that caption is loaded before subfig, there is the subfig
|
||||
// option "caption=false". This option also works when a koma-script class is
|
||||
// used and koma's own caption commands are used instead of caption.
|
||||
if (features.isRequired("subfig")) {
|
||||
atlyxpreamble += "\\usepackage{subfig}\n";
|
||||
atlyxpreamble += "\\@ifundefined{showcaptionsetup}{}{%\n"
|
||||
" \\PassOptionsToPackage{caption=false}{subfig}}\n";
|
||||
}
|
||||
|
||||
// Itemize bullet settings need to be last in case the user
|
||||
// defines their own bullets that use a package included
|
||||
// in the user-defined preamble -- ARRae
|
||||
|
@ -415,7 +415,7 @@ char const * simplefeatures[] = {
|
||||
"rotating",
|
||||
"latexsym",
|
||||
"pifont",
|
||||
"subfig",
|
||||
// subfig is handled in BufferParams.cpp
|
||||
"varioref",
|
||||
"prettyref",
|
||||
/*For a successful cooperation of the `wrapfig' package with the
|
||||
|
Loading…
Reference in New Issue
Block a user