(Accidentally replied directly rather than to the list. Better late than never?)

I can see no reason to mess with the layout translations file. If your LyX user interface uses a language other than English, just give your custom theorem environment a layout name in that language. If your new environment makes its way into the LyX distribution some day, then it will need translations into all supported languages.

As far as implementing a custom theorem-like environment, you need to (a) figure out the LaTeX code to implement it and then (b) create a module file (or use your hacked ...-bytype.module file) containing a LyX layout for it (which will include the LaTeX code to be inserted into the preamble). Mimicking what's already in the bytype module file (or, more precisely, in one of the .inc files it uses) should get you there pretty easily.

Paul

On 7/21/21 11:46 AM, Rudi Gaelzer wrote:

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



-- 
lyx-users mailing list
lyx-users@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-users

Reply via email to