Charpentier Philippe wrote:
Hi,
if you define a new module whose name contains non ASCII
characters, like

#\DeclareLyXModule{Théoremes (AMS) Francais}

then lyx-1.6 crashes with the following output:

lassert.cpp(21): ASSERTION static_cast<unsigned char>(ascii[i]) < 0x80 VIOLATED IN docstring.cpp:50 Assertion triggered in void lyx::doAssert(const char*, const char*, long int) by failing check "false" in file lassert.cpp:23

Moreover, exactly the same error occur if the description of the
module contains non ASCII character

Yes, this is the same problem, more or less, that you reported with layouts, I think. Anyway, I'm not sure what to do, as i18n is not my forte. The thing I tried to do gave me an iconv error (whatever that is). Jurgen will know what to do, I hope: The change is needed in GuiDocument::loadModuleInfo().

There is also something I don't understand with modules:
to be able to use the class "article (AMS)" in french, I create a class
"article (AMS) en Français" with all the corresponding modules (and *.inc) for
theorems (with labels in french) excluding all the theorems modules
of the program (I have to say that I absolutely don't like the methods
described in the wiki to get traduced theorems).

Then I create a document in the class "article (AMS)"
and type a theorem. As it is traduced with a label in english, I
change the class to "article (AMS) en Français" without doing
nothing in the modules section. But even if the DefaultModule of
the class is "theorems-ams-fr", the module "theorems-ams" is still
loaded (and used) and "theorems-ams-fr" not, and I have to change
it manually in the modules section.

This is the expected behavior: Default modules requested by the previous class are retained in the new class. This is for the obvious reason that the user doesn't care about the difference between default and chosen modules. She may not even know about it. She definitely doesn't expect all her environments to get messed up when she changes classes, just because theorems-ams was a default module.

That said, you could try a line like:
   ExcludesModule theorems-ams
in your document class. That should do it. You could also try this line in the module. I think that also works, but I'm not absolutely sure.

Similarly, if I create a document in the class "article (AMS) en Français"
the module "theorems-ams-fr" is automatically loaded but the
modules "theorems-ams", "theorems-starred" and "theorems-std"
can still be loaded (although they are excluded in "theorems-ams-fr"
and this can be seen in the information at the end of the module
section) but "theorems-ams-extended", "theorems-sec" and "theorems-chap"
cannot. It seems to me that the tag #Requires works but the tag #Excludes
not in this situation.

It sounds like there's some kind of bug here.

rh

Reply via email to