Re: [toolbox] LaTeXiT 1.2 beta
Status: Planning
Brought to you by:
jlaurens
From: Pierre C. <pie...@cl...> - 2005-07-03 20:43:36
|
> By the way, what is the difference in the way you generate the > equation and LaTeX Equation Editor generates the equation? Ok, it is rather long, but let's explain it : LEE uses latex | dvips | epstopdf, because dvips has the ability to crop and magnify. Very handy. I found it a pity not to be able to simply use pdflatex. But Maarten introduced me about the problem of the baseline, and here will be the point. To compute the baseline, there is a magical snippet that uses boxes that automatically know their size and baseline. The problem is that it fails with multi-line equation (does not even compile). So I had to get a compromise to make everything work. Below is a copy/paste of the comment I put into LaTeXiT about that. //The principle used is the following one : // -first, we compute a very simple latex file, without cropping or magnification. If there are no syntax errors // from the user, it will be ok. Otherwise, it will be useful to report errors to the user. // -second, we must crop and magnify. There is a very fast an efficient method, using boxes that will automagically // know their size, and even compute the *baseline* (what is the baseline ? it is the line on which your equation should be // aligned to fit well inside some text. For instance, a fraction would be shifted down, thanks to a negative baseline) // The problem is that, this fast and efficient method may fail with certain kinds of equations (especially multi-lines) // So it is just a try; if it works, that's great, we keep the result. Otherwise, we will use a heavy but more robust method // -third; in case that the second step failed, there is as a last resort a heavy and robust method to compute a bounding box // (to crop), and magnify the document. We compute the bounding box by calling gs (GhostScript) on the result of the first step. // Then, we use the latex template of the second step, with the magical boxes, but its body will just be the pdf image generated // during the first step ! So it can be cropped and magnify. > 1)The processing by LaTeX Equation Editor is much faster. This > could, of course, be because of the baseline information you've got > to extract. So to be quick : there are two pdflatex calls, and there may be a third call to pdflatex and a call to gs. That's why you may experience slower speed than with LEE. You may argue that the first and the second step could be fusioned, to save one pdflatex call. But it is not possible, since in this case, there would be problems to report syntax errors to the user if he has typed multi-line equations. > 2)The processing done by LaTeX Equation Editor doesn't produce the > console error messages I see with LaTeXiT. I wonder if Gary Gray's > is also llnked to those error messages in some way. it seems to me that LEE and LaTeXiT produces the same error messages, since LEE gives the full log. In latexit, it is just filtered in some way. > Also, are the error messages produced while processing the equation > through pdflatex or when attempting to display the equation? the errors are get back from pdflatex output Regards, Pierre |