Thanks Paul for suggesting the makecmds package. Actually it's solved my 
problem. Just all \renewenvironment commands should be replaced by 
\makeenvironment ones.

But from the viewpoint of LyX your suggestions make sense, and maybe should be 
considered by the authors.

Cheers, Máté
  ----- Original Message ----- 
  From: Paul A. Rubin 
  To: lyx-users@lists.lyx.org 
  Sent: Sunday, July 13, 2008 5:05 PM
  Subject: Re: Theorem environments in LyX 1.6


  Máté Salát wrote:
  > There is an issue with the translation of the labels of the AMS theorem 
module described at http://wiki.lyx.org/LyX/I18nLabels.
  > 
  > The problem is that you can not place the items
  >            \newtheorem{NewName_e}{NewLabel_e}
  >            \renewenvironment{OrigName_e}{\begin{NewName_e}}{\end{NewName_e}}
  > for all the environments (e = cor, lem, prop, ...), but you can only place 
them for those environments that are actually used in the lyx document. For 
example the attached LyX file can not be compiled for this reason.
  > 
  > This issue makes complicated the creation and development of documents 
because you have to adjust the preamble to the present set of the used 
environments all the time.
  > Even when a new environment appears you have to remember to translate the 
new environment, or when an environment disappears totally you need remove the 
related part to be able to compile the document. It also prevent you from using 
the same preamble file for different documents.
  > 
  > Maybe the renewenvironment command should be put behind a condition "if the 
environment OrigName_e exists than..." but I don't know how to implement this.
  > 
  > Cheers, Máté

  I think you can load the makecmds package and then use 
  \provideenvironment to conditionally define each environment you are 
  going to rename.

  That said, I suspect there is a better approach.  I'm a English(US)-only 
  user, so I'm speculating, but my guess is that most people who want to 
  translate the AMS environment names either want to use the translated 
  names in all their documents, or in a good portion of their documents 
  (the rest likely remaining in English?).  So making them put the 
  translations in the preamble each time they are using their native 
  language is inefficient.  The efficient solution is to do the 
  translations once, in the AMS layout files, and if necessary create two 
  sets of AMS layouts (one for language A, one for language B).  The user 
  then picks either "article (AMS)" or "article (AMS-Klingon)" from the 
  document class list.

  There are a set of AMS layout files on the wiki in German (I think 
  provided by Georg Baum), but they're from LyX 1.3, and we've since made 
  some changes to the layouts.  The layouts will undergo another major 
  change in LyX 1.6, when they will become modules.  So my suggestion is 
  that either (a) we start a page on the wiki where people can 
  post/download translations or (b) we provide a script that the user can 
  run locally that will prompt the user for translations of the names and 
  generate a new set of layouts.  (Actually, a third approach would be a 
  script that let you upload a list of translated terms and then generated 
  the AMS files and put them on the wiki for general distribution. 
  Assuming we could trust the users to provide non-scatological 
  translations ...)

  You might want to post this either on the wiki feature poll or in 
  bugzilla as an enhancement request.  I'd do it myself, but since I'm 
  deeply monolingual, it's not something I need.  Neither solution would 
  be particularly difficult, though.

  /Paul

Reply via email to