Enrico Forestieri wrote:
Paul A. Rubin <[EMAIL PROTECTED]> writes:

AFAIK when LyX exports a math inset to 0lyxpreview.tex for conversion, it does not pass along preamble entries from the original document.

LyX uses the exact same preamble of the original document in 0lyxpreview.tex
and this may cause problems. For example, if you have dvipng and change the
size of the latex fonts (say from 10pt to 12pt) you suddenly see that all
preview snippets change size accordingly (after reloading the document).
This can cause an occasional problem (for instance, when you are loading a funky character set in the doc's preamble), but it does not cause problems with routine math insets under Windows (and I'm guessing the same holds for Linux). So modifying the document preamble is unlikely to resolve the preview problem.

I am not so sure. See above.


Yes, this apparently has changed. I think I recall entering a bugzilla request a while back, because I tripped over a case of IP failing due to a missing class/style loaded in the preamble of the original document. You are correct, the class and preamble of the original document are now used by IP, and it's a case of "be careful what you wish for". If the class file overrides DVI output (in this case, it contained \usepackage[pdftex]{graphicx}) and that gets copied to the formula preview file(s), then the formulas are not generated as DVIs, conversion to PNG fails and no good comes of it.

I'm wondering if this is something that should go into bugzilla, or whether it's one of those "we'll have to live with it" sorts of things?

On a related note, I noticed that when I stick a bunch of math insets in a document (with IP turned on), LyX usually generates a bunch of separate .tex files, one per inset; but with the test document that used the custom class containing \usepackage[pdftex]{graphicx}, LyX generated just one 0lyxpreview.tex file containing all the math insets. Is there any particular logic to when they are all in one file and when they are not? Does it have to do with the choice of class, or the preamble contents?

Confused as usual,
Paul

Reply via email to