Dear Richard
Thanks for your answer! I unfortunately did not understand exactly where
I should put this command? When in Lyx preamble or in the custom .sty it
results into error... Did I miss something?
Furthermore, yes Lyx still adds preamble commands after user defined, see:
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% User specified LaTeX commands.
% This file was converted to LaTeX by Writer2LaTeX ver. 1.1.5
% see http://writer2latex.sourceforge.net for more info
\usepackage{../custom}
\usepackage{subfig}
\@ifundefined{showcaptionsetup}{}{%
\PassOptionsToPackage{caption=false}{subfig}}
\usepackage{subfig}
\makeatother
\usepackage{babel}
\begin{document}
Is there a way to avoid this?
Thanks!
Matthieu
Le 21. 02. 11 17:06, Richard Heck a écrit :
On 02/21/2011 09:41 AM, Matthieu Stigler wrote:
Dear Lyx List
I am using a custom package that redefines captions style. But when I
use the subfigure function, Lyx will add at end of preamble (after
user own packages preamble) a line of code, which "cancels" my
definition. This line is:
\@ifundefined{showcaptionsetup}{}{%
\PassOptionsToPackage{caption=false}{subfig}}
This has the effect to remove all our definitions of caption style.
How can I resolve this? Should I
-prevent lyx to add this line? How?
You can add to a layout file or module somewhere:
Provides subfig 1
That should prevent LyX from loading that package automatically.
-force Lyx to add my \usepackage{} command afterthis line? Is this
possible?
Anything you put in your preamble goes after anything LyX adds.
Richard