Differences Between Theorems Modules (AMS and non AMS)
Udicoudco
udifoglle at gmail.com
Tue Sep 20 02:18:36 UTC 2022
On Thu, Sep 15, 2022 at 6:50 PM Jean-Marc Lasgouttes <lasgouttes at lyx.org> wrote:
>
> Le 15/09/2022 à 14:17, Udicoudco a écrit :
> > Hello again,
> >
> > I took a look at the Named Theorems Module today, and the LaTeX code
> > there seems to be a bit strange. In the preamble of the layout Named
> > Theorem there is the following code:
> >
> > \newcommand\thmsname{\protect\theoremname}
> > \newcommand\nm at thmtype{theorem}
> > \theoremstyle{plain}
> > \newtheorem*{namedtheorem}{\thmsname}
> > \newenvironment{namedthm}[1][Undefined Theorem Name]{
> > \ifx{#1}{Undefined Theorem Name}\renewcommand\nm at thmtype{theorem*}
> > \else\renewcommand\thmsname{#1}\renewcommand\nm at thmtype{namedtheorem}
> > \fi
> > \begin{\nm at thmtype}}
> > {\end{\nm at thmtype}}
>
> Hi again Udi,
>
> This module has been proposed in ticket 6279
> https://www.lyx.org/trac/ticket/6279
>
> Updating and fixing it would be great. I think that the LabelString
> could be empty, so that it is clear that the argument inset will be used
> as a label. And the default could be set to "theorem", for example.
>
> Feel free to propose a replacement.
>
> JMarc
>
Hi,
I've attached a new implementation of the Named Theorems module. It
should be noted that the argument inset currently has the tag PassThru
on true, other wise when writing a theorem in a different language
from the main language of the document, if the argument inset is left
"empty", lyx actually insert there a code to set the language of the
inset as the main language, so the output label looks empty.
Another solution would be to delete the inset in this case (which will
make TeX see the input as empty), but IMO the former solution is
better. Feel free to change that.
Regards,
Udi
-------------- next part --------------
A non-text attachment was scrubbed...
Name: theorems-named.module
Type: application/octet-stream
Size: 1645 bytes
Desc: not available
URL: <http://lists.lyx.org/pipermail/lyx-devel/attachments/20220920/e3dca867/attachment.obj>
More information about the lyx-devel
mailing list