Hi all,

There's a (minor?) bug in the Case environment as coded in four include files (theorems.inc, theorems-ams.inc, theorems-bytype.inc and theorems-ams-bytype.inc). The problem occurs when a case environment is nested inside another case environment: since only one counter for cases is declared, the nested environment screw up the counter. More precisely, the inner environment resets the counter to zero; when LaTeX exits back out to the enclosing case environment, the next case item inherits the count from the inner environment.

I tried to attach a zip file containing a small example and separate diffs to patch the four files in file format 11 (for LyX 1.6) and 34 (for LyX 2.0). Unfortunately, the mailing list bounced my message for "prohibited content" (honestly, there were no dirty pictures in the zip file!), and GMANE won't let me do attachments period. So I've posted the zip to http://dl.dropbox.com/u/9417226/case_patch.zip.

If you run the sample file without the patches, you'll see that in the output the very last case item is numbered incorrectly. The gist of the patches is to convert Case to an enumerate environment with a customized label (using the enumerate.sty package). The patches for version 34 (only) also improve the labels in the LyX GUI so that cases are labeled with the correct numbers, rather than a static "Case #".

I've tested the patches against this file, but only in English. I see that in the newer include files there's additional commands that I assume have to do with translating the labels. It would be a good idea if somebody tested the patch in a language other than English to make sure I didn't screw that up.

I'll post a version on the wiki as a temporary (?) fix when I get a chance.

Cheers,
Paul


Reply via email to