Jens Noeckel wrote:

On Oct 31, 2006, at 4:06 AM, Enrico Forestieri wrote:

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


I'm posting this vicariously, as it were (not being a Mac user myself),
so please bear with me.  Someone else is having a problem with LyX
1.4.3/Mac OSX/teTeX (installed via fink).  At least part of the problem
seems to be caused by instant preview.  With IP on and math insets in
the document, misadventures occur, and in particular the temp directory
shows 0lyxpreview.tex, 0lyxpreview.aux, 0lyxpreview.pdf but not
0lyxpreview.dvi.

The user seems to think that /sw/bin/latex is symlinked (or hard linked,
I'm not sure) to pdflatex.  I'm guessing from the symptoms above that
when the Python script that compiles the previews runs what it thinks is
latex, it's actually running pdflatex (or pdfetex with the format set to
pdflatex, or something like that).  Hence no DVI output, and the DVI to
PNG conversion unsurprisingly breaks.

Does this resonate with any Mac users?  Is there something
installation-wise that could get 'latex' to actually run latex (as in
producing DVI output without additional tweaking)?

Hi Paul,

I don't think that the sym- or hardlink to pdftex is the culprit here.
In most modern TeX implementations the engine is pdftex, anyway. If you
have MikTeX 2.5 try "latex --version" and see that you are really using
pdfetex. The engine looks at the name it was invoked and produces
output accordingly. So, symlinking latex to pdftex but invoking it as
"latex" gives you dvi output.

Instead, make sure that the command used by LyX to invoke latex is really
"latex" and not "pdflatex".


Yes - in fact, you can invoke "latex -> dvi" conversion of a file file.tex by typing, e.g.,
pdflatex -progname=latex file
pdfetex -progname=latex file

If it's not the preamble that's causing the problem, one might want to add that option -progname=latex to the script (this will only work if there's nothing in the preamble that overrides this progname choice). I think this once worked for someone when I suggested it on the MacTex mailing list... although it really should be handled automatically, as Enrico said.

So before doing that, maybe one other suggestion: see (with ls -al) if there are any texmf configuration files in your home directory (.texmf-config etc) and move them out of the way.

Finally, you could also specify
pdflatex -output-format=dvi

to get dvi output. This is not quite equivalent (because it may load different font files) to the -progname option, but it works for me, too.

Jens



Thanks to both Enrico and Jens for the replies.

Jens, I noticed in a bugzilla posting that you have LyX running under OS/X with teTeX installed via fink (same setup as Andrea, the original poster here). Does instant preview work for you and, if so, did you have to tweak anything?

AFAIK when LyX exports a math inset to 0lyxpreview.tex for conversion, it does not pass along preamble entries from the original 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.

If preview works for you, then I need to focus on how your configuration differs from Andrea's. If IP doesn't work for you, then we should probably enter a bug report.

Thanks,
Paul

Reply via email to