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