On Wed, Apr 29, 2015 at 06:26:40PM +0200, Kornel Benko wrote: > Am Mittwoch, 29. April 2015 um 17:42:23, schrieb Enrico Forestieri > <for...@lyx.org> > > On Wed, Apr 29, 2015 at 04:49:53PM +0200, Kornel Benko wrote: > > > > For me it looks like the shorter chain. > > > pdflatex -> pdftocairo -> png > > > vs > > > latex -> dvipng -> epstopdf -> pdftocairo -> png > > > > The correct chains are > > pdflatex -> pdftocairo -> png > > vs > > epstopdf -> pdftocairo -> png > > Hm, I believe to have seen calls to latex, dvips, dvipng, epstopdf, > pdftocairo. > Probably fast fading (my) memory.
It works in the following way. If you set a default pdf output format for the document, the legacy PDF route is always taken and we can stop here. Otherwise, dvipng is used to produce the snippets it can deal with, while the others are processed either through the postscript route or the pdf route. It is at this point that we have the choice of the above two chains but _only_ for the snippets that dvipng cannot process. Given that there may be problems dealing with postscript specials, the postscript route attempted by first, unless we now that it is bound to fail. If this route still fails, then the PDF route is also attempted as a last resort. In this way, if you have 500 snippets and only a handful of them cannot be processed by dvipng, the majority can be processed at full speed, instead of always directly using the slower ps or pdf routes. So, IMO, it is better not to set a default output format for the document, such that it can be processed as described above. However, you are also right that there might be cases were this strategy fails, in which case simply set a default output format for the document and you can be sure that the previews are generated (albeit more slowly), because the same tex engine used for producing an output will be used for the previews. That's all. -- Enrico