Thank you for your reply.
I have tried your suggestion verbatim (after correcting a couple of
misprints): modifying "Local Layout".
I don't really understand the details, but I noticed one problem:
- Inside a given section (say section 2), the theorem and lemma numbers
are all displayed as "2.0".
- The subsection numbers are displayed correctley
- Printing gives correct results.
Any ideas? Thanks,
Ramez Labib Sami
=================================
On 03/10/2017 17:15, Richard Heck wrote:
The LyX display is controlled by 'layout' information, which is defined
in a number of places:
(i) The layout file for the document class (e.g., amsart.layout)
(ii) Modules, which are to LyX as packages are to LaTeX (e.g.,
theorems-ams.module)
(iii) Document-specific "local" layout, found at Document> Settings>
Local Layout
It seems to me as if you will probably be best off creating a new module
of your own, perhaps starting with and modifying theorems-ams.module.
Documentation concerning this is in Ch 5 of the Customization manual. As
far as the counters are concerned, you will want to modify the
LabelCounter defined for the various styles so that it uses the one for
subsections.
Note that you can just make modifications in Local Layout, e.g.:
Style Theorem
LabelCounter subsection
Preamble
\theoremstyle{plain}
\newtheorem{thm}[subsection]{\protect\theoremname}
EndPreamable
End
Style Lemma
LabelCounter subsection
Preamble
\theoremstyle{plain}
\newtheorem{lem}[subsection]{\protect\theoremname}
EndPreamable
End
Then you could just use the usual Theorems (AMS) module, and these
modifications might be enough to get you what you want. But if you are
going to want to re-use them, then putting them in a module of their own
will make that easier.
Richard