When adding something to the LyX preamble and converting to TeX, it adds the lines after LyX package imports (\usepackage{amsmath} and the like), after LyX specific LaTeX commands (\pdfpageheight\paperheight), and after Textclass specific LaTeX commands:
\theoremstyle{definition}
\newtheorem{defn}{\protect\definitionname}
I would like to import a package at the same time the "normal" packages are imported (amsmath, etc.). I saw this question and the accepted answer seemed relevant, but I can't make it work. When I add:
PackageOptions mypackage foo
Requires mypackage
to the Local Layout, it adds the line \PassOptionsToPackage{foo}{mypackage} before the \usepackage lines, but nothing else.