On Wed, Jun 26, 2024 at 6:22 PM matan guedj <matanel1...@gmail.com> wrote:
> your solution now works, I've read the log and noticed the warning 
> 'cprotect.sty' wasn't installed so I installed it and your solution works now,
> but (sorry for being so persistent) it's way less intuitive and easy to do, 
> it's a very specific solution where my problem with the preview environment 
> is global.

It is possible that you are missing other packages that other
documents depend on.
You cam install the full scheme to avoid such problems.

> I also don't understand, why your solution works?

As I said, it is impossible to insert floats (or any movable thing)
inside boxes.
LaTeX simply does not support that. see https://texfaq.org/FAQ-parmoderr.
My solution was to simply put the preview box inside the float, instead
of the other way around.

>and why did in 2.3.7 it all worked perfectly well with no intervention on my 
>part?

The example you attached does not work in 2.3.7, so for this case
I'm not sure what you mean.

As for the problem with missing packages, LyX 2.4 might depend on
different LaTeX packages than LyX 2.3, so if you did not install these
packages you might suffer from such unexpected changes.

> but when I read my log file, I can't see such an error

What do you mean by "such an error"? The error message
below is a consequence to the float inside the box.

> and on line 597-607 I get:
> "
> ! LaTeX Error: Not in outer par mode.
>
> See the LaTeX manual or LaTeX Companion for explanation.
> Type  H <return>  for immediate help.
>  ...
>
> l.62 \caption
>              {Merge Sort $(A,p,r)$} \Comment{$A$ is the array, $p$ is the 
> le...
>
> You've lost some text.  Try typing  <return>  to proceed.
> If that doesn't work, type  X <return>  to quit.
> "

All other messages are warnings not errors. The one with the aux you can ignore,
but you should probably change your margins if you want to use marginal notes,
otherwise ignore the other warning as well.

> important to mention that the lyx file compiles to PDF with no errors at all.

When LyX export to pdf it ignores anything related to preview boxes,
so the float is not inside a box in the actual LaTeX export, just in the
temporary files for the preview.

Udi

On Wed, Jun 26, 2024 at 6:22 PM matan guedj <matanel1...@gmail.com> wrote:
>>
>> The file that I attached works for me. The images do not provide much
>> information. Please attach the
>> log file from the preview that does not work in my file.
>>
>> Udi
>
>
> your solution now works, I've read the log and noticed the warning 
> 'cprotect.sty' wasn't installed so I installed it and your solution works now,
> but (sorry for being so persistent) it's way less intuitive and easy to do, 
> it's a very specific solution where my problem with the preview environment 
> is global. (I hope I don't sound ungrateful because I'm really grateful for 
> your help)
> I also don't understand, why your solution works? and why did in 2.3.7 it all 
> worked perfectly well with no intervention on my part?
> but when I read my log file, I can't see such an error, all I see that could 
> be of significance (take it with a grain of salt as I'm new to this kind of 
> debugging) if you open the log file I send you now with notepad++ on lines 
> 446-447 I get the message:
> "
> No file lyxpreviewiPHdvi.aux.
> \openout1 = `lyxpreviewiPHdvi.aux'.
> "
>
> on lines 530-531 I get the message:
> "
> Package geometry Warning: The marginal notes overrun the paper.
>      Add 47.54726pt and more to the right margin.
> "
>
> and on line 597-607 I get:
> "
> ! LaTeX Error: Not in outer par mode.
>
> See the LaTeX manual or LaTeX Companion for explanation.
> Type  H <return>  for immediate help.
>  ...
>
> l.62 \caption
>              {Merge Sort $(A,p,r)$} \Comment{$A$ is the array, $p$ is the 
> le...
>
> You've lost some text.  Try typing  <return>  to proceed.
> If that doesn't work, type  X <return>  to quit.
> "
>
> important to mention that the lyx file compiles to PDF with no errors at all.
>
-- 
lyx-users mailing list
lyx-users@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-users

Reply via email to