Hi Uwe,

Thanks for writing in. Responses below.

On Fri, Aug 31, 2018 at 02:57:04PM +0200, Uwe Thuemmel wrote:
> I often go back and force between LyX and LaTeX. Unfortunately, exporting
> from LyX to LaTeX (pdflatex) and importing again into LyX messes up the
> layout of (sub)figures.

We can discuss the specifics of this below, but I just want to say that
even if this is fixed, you will without doubt run into problems with
doing this back and forth workflow. LyX can export and import LaTeX, but
the import is never going to be perfect. It's such a difficult problem
to convert between all possible permutations of LaTeX (which allows a
lot of different ways of writing things) into LyX, even for a LaTeX file
that LyX exported! I thus recommend that you use mainly LyX or mainly
LaTeX for any given project. Otherwise you might get headaches.

> More particularly, I'd like subfigures to appear side by side. In the
> original LyX file, this looks as follows, and in the PDF figures appear side
> by side
> 
> (figure_layout_original.lyx)
> 
> If I now export to LaTeX (pdflatex), and compile the .tex file
> (figure_layout.tex), the figures still appear side by side.

If you got different output, this would be a LyX bug. Whenever you view
a PDF from LyX, what happens under the hood is that LyX first exports to
LaTeX. So the LaTeX exported from LyX should give the same PDF result
(assuming run with the same engine).

> However, if I import back into LyX (import from LaTeX, plain), the figures
> appear below one another.
> 
> (figure_layout_imported.lyx)
> 
> I then have to readjust the layout for all subfigures. Do you have any
> suggestions how to avoid this behavior. To replicate the issue, find a
> minimum working example with the files mentioned above at:
> https://www.dropbox.com/sh/3c6ea1mztonqrgs/AADidw2HLdqv74d6MO2iUmVea?dl=0

If you don't get a reply here, please make a LyX ticket on

  http://www.lyx.org/trac

When you create the ticket, please select the component "tex2lyx".

Although I discouraged the workflow you have set up above, the good side
to it is you will likely find a lot of potential improvements to the
import, tex2lyx, so if you create trac tickets with minimal examples for
each of them, it's possible they could be fixed. tex2lyx usually
receives fixes for each new LyX release.

Best,

Scott

Attachment: signature.asc
Description: PGP signature

Reply via email to