Am Donnerstag, dem 22.02.2024 um 14:02 +1100 schrieb JonT:
> I created original document in Lyx :)
> 
> I had to export it to LaTeX for a collaborator to use in Overleaf :(
> 
> Reimport to LyX for next chunk of work, and it had a number of
> problems.
> 
> I've attached a cut down example of three problems of import:
> 
> 1)  some options to document class are not imported
> 
>      - manually adding these in setting window works, so its an
> import issue

the onecolumn option not being output was a problem in the IEEEtran
layout. Fixed for the next version. 

The other option, 12pt, is actually imported and output. It is just not
in the custom options field of the settings, but in the font settings
directly.

> 2) definition of \thm environment seems to create a duplicate
> 
>      - in pdflatex it complains if the tex does *not* include
> definition
>      - after import LyX complains of duplicate

I am not too familiar with this, but from tex2lyx code it seems
\newtheorem is only removed from the user preamble if it is from the
texclass preamble section.

Furthermore, IEEEtran.layout provides the standard theorems module, so
AMS theorems module cannot be loaded (they are mutually exclusive).

I think the re-import will work if you remove from your preamble the
two \newtheorem definitions and the loading of amsthm, and keep the lyx
metacomments, i.e.

%% LyX 2.4.0~devel created this file. [...]

and

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% Textclass specific LaTeX commands.

If you want to keep your specific setting with amsthm instead, a
workaround is to put to the preamble just before the two \newtheorem's:

\let\thm\@undefined
\let\lem\@undefined
\let\c@thm\@undefined

> 3) in a figure it appears not to wrap Tikz code with a TeX Code 
> environment during import, so it wont build pdf from LyX
> 
>      - manually replacing Tikz code with an TeX Code environment 
> containing the Tikz works in LyX

Fixed for the next version.

> There are "PROBLEM HERE" comments in TeX file for these issues.

Thanks for the report and example file.

Jürgen

> 
> The problems occur in both 2.3.7 and 2.4.0-rc3 on x86 Mac.
> 
> 
> thanks for great tool,
> 
> - JonT
> 

-- 
Jürgen
-- 
lyx-devel mailing list
lyx-devel@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-devel

Reply via email to