Importing theorem environments
> Try doing the import manually using the -m switch to tex2lyx, > which will load the given modules. E.g., > > tex2lyx -m mymod1,mymod2 infile.tex > > I don't think you need the .module extension there, but I could be wrong. > > If that works, you can define a new import format in LyX itself that > will use these flags. > > Riki Command line import with the -m switch indeed worked. Setting up the format and converter from within LyX was a bit quirky, so it took me a while, but now I’ve got that working too. Thanks for your help. Fatihcan -- lyx-users mailing list [email protected] https://lists.lyx.org/mailman/listinfo/lyx-users
Re: Importing theorem environments
On 2/28/26 5:10 AM, fcanatay--- via lyx-users wrote:
Greetings,
As far as I can see, all theorem modules in LyX use shortened theorem names,
such as thm, lem, prop, for theorem, lemma, proposition, etc. Apparently, LyX
also expects everyone else to do the same, so when an imported latex document
uses full theorem names, LyX translates all such environments to body text
sandwiched between \begin and \end ERT insets.
My question is, what is the best practice for recognizing user-defined theorem
environments when importing latex? How can LyX be made to correctly recognize a
theorem declared in the preamble?
I have defined separate modules using full theorem names, but apparently LyX
uses modules only for existing lyx documents and not when importing latex. The
only workaround at the moment seems to be to first set up a lyx document,
include the modified modules, open latex separately in a text editor, copy the
part between \begin{document} and \end{document} and paste into lyx. Is there
an easier method?
I am not absolutely sure about this, since I do not import and export
very much. Try doing the import manually using the -m switch to tex2lyx,
which will load the given modules. E.g.,
tex2lyx -m mymod1,mymod2 infile.tex
I don't think you need the .module extension there, but I could be wrong.
If that works, you can define a new import format in LyX itself that
will use these flags.
Riki
--
lyx-users mailing list
[email protected]
https://lists.lyx.org/mailman/listinfo/lyx-users
Importing theorem environments
Greetings,
As far as I can see, all theorem modules in LyX use shortened theorem names,
such as thm, lem, prop, for theorem, lemma, proposition, etc. Apparently, LyX
also expects everyone else to do the same, so when an imported latex document
uses full theorem names, LyX translates all such environments to body text
sandwiched between \begin and \end ERT insets.
My question is, what is the best practice for recognizing user-defined theorem
environments when importing latex? How can LyX be made to correctly recognize a
theorem declared in the preamble?
I have defined separate modules using full theorem names, but apparently LyX
uses modules only for existing lyx documents and not when importing latex. The
only workaround at the moment seems to be to first set up a lyx document,
include the modified modules, open latex separately in a text editor, copy the
part between \begin{document} and \end{document} and paste into lyx. Is there
an easier method?
Actually I do not need to address every conceivable theorem statement. Everyone
I know and collaborate with just uses full names like theorem, proposition,
etc. (which is closer to the true Latex spirit of being verbose and
human-readable). So, I’m hoping there is an easy solution for
importing/exporting full theorem names.
Cheers,
Fatihcan
--
lyx-users mailing list
[email protected]
https://lists.lyx.org/mailman/listinfo/lyx-users
