Customizing counters of theorem environments.

Rudi Gaelzer rgaelzer at gmail.com
Wed Jul 21 15:46:08 UTC 2021


I would like to run by you my solution and ask another question.

I copied the files theorems-ams-bytype.module and theorems-ams-bytype.inc into my 
local layouts directory (with new names), then edited them accordingly.  For instance, in 
the .inc file, for the Lemma style, inside the Preamble EndPreamble field I included the line 
	  \renewcommand{\thelem}{\thearea-\arabic{lem}}
\thearea being the prefix to the lemma counter.

Did similar things for the other styles, then reconfigured LyX and voila! My customized 
module is accessible (and works as intended).
I just don't know if this solution is sanctioned by you LyX developers...

Now the question I want to ask.
I want to create a new theorem-like environment.  Reading through the Customization.lyx 
manual, I understand that the different translations for the names of the environs reside 
in the layouttranslations file.  Looking into it, it says that

# This file has been automatically generated by po/lyx_pot.py.
# PLEASE MODIFY ONLY THE LAGUAGES HAVING NO .po FILE! If you want to regenerate
# this file from the translations, run `make ../lib/layouttranslations' in po.
# Python polib library is needed for building the output file.

I confess I did not quite grasp the process. Do I have to create a local layouttranslations 
file containing the translations for the new environment name?  Is there a more detailed 
guide for this procedure?

On terça-feira, 20 de julho de 2021 20:20:41 -03 Rudi Gaelzer wrote:
> Well, it seems that the solution is indeed via \renewtheorem.  However, I
> had to dig deep into the installation of AMS theorem to find the proper
> names of the counters. So far, I've found \thethm, \thelem, \thedefn, etc.
> I did not find a full list of counters, so if someone could point me out
> where I can find such a list, I'd be grateful.
> 

-- 
Rudi Gaelzer
Institute of Physics
Federal University of Rio Grande do Sul
BRAZIL
Registered linux user # 153741
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lyx.org/pipermail/lyx-users/attachments/20210721/5a81ad93/attachment.html>


More information about the lyx-users mailing list