# Re: Contents of Preamble...EndPreamble in Layout not being output to tex file

```Geevarghese Philip wrote:
```
`Hi,`
```
```
I am trying to use the following layout file, which rgheck kindly provided me, to typeset my document.
```
--------------------

#% Do not delete the line below; configure depends on this
#  \DeclareLaTeXClass[report]{amsreport}

Format 4

Input stdclass.inc
Input amsdefs.inc
Input numreport.inc

Style Bibliography
TopSep                4
LabelString           "Bibliography"
LabelFont
Series              Bold
Size                Huge
EndFont
End

--------------------

```
The problem with this layout is that it prepends the number of the relevant subsection to the number of each theorem, definition, etc. I want to get sequential numbering for theorem etc., without the subsection numbers.
```
```
For this I changed "Input amsdefs.inc" to "Input amsmaths-seq.inc" (as suggested by rgheck), after which I got an error saying \theoremstyle is not defined. When I checked the tex file exported by LyX, I saw that indeed \theoremstyle is being used without any package that defines it being imported.
```
```
So I added the following lines after the Format line and before the Input lines:
```
---------------

Preamble
\usepackage{amsthm}
\theoremstyle{plain}
\newtheorem{buha}{Buha}
EndPreamble

---------------

```
(I added the invocations to \theoremstyle and \newtheorem just for testing).
```
```
When I reconfigure, restart LyX and generate a tex file from my document, the tex file does not contain the contents of this preamble anywhere -- the Preamble...EndPreamble block is completely being ignored by LyX.
```
```
Please help me fix this : I want to have "\usepackage{amsthm}" included somewhere near the very beginning of the output tex file, so that it is present before the first invocation of \theoremstyle --- puting "\usepackage{amsthm}" in the document preamble doesn't help, so I guess it must be somewhere withing the layout file.
```
```
This is a bug of sorts in the 1.5 layout system, I expect. The problem is that the preamble later gets redefined and your bit gets over-written. Try adding this at the end:
```Style Theorem
Preamble
\usepackage{amsthm}
\theoremstyle{plain}
\newtheorem{thm}{Theorem}
EndPreamble
End
I think that'll work.

rh

```