Number Exercises Separately in LyX

Say you’ve got a document with a bunch of exercises and few lemmas. You may want the exercises numbered separately from the numbering of the lemmas and theorem, unlike LyX’s default behavior. This can be achieved by redefining xca, the environment LyX uses for exercises. Add the following to your LaTeX preamble:


LyX will still display the incorrect numbering, but the output will be correct nonetheless. The first line, undefines the LyX’s definition of xca, then we set the style to match the old one and we redefine xca, this time without a reference to the theorems’ counter.

One thought on “Number Exercises Separately in LyX

  1. MathHelp

    Hello, I wanted to solve this problem myself, and the first thing I found in Google was your post. Unfortunately it was not the nice solution that i was looking for. Actually, Lyx 2.0 has inbuilt module, if you know how to activate it. So, here it is:

    Lyx: Document Settings > Modules > Theorems (AMS, Numbered by type) – possibly before adding this module you should remove the default module for Theorems.

    I hope this helps someone else. LyX will NOT display incorrect numbering, as the originally proposed solution.

    Kind regards to all!

Leave a Reply

Your email address will not be published. Required fields are marked *