Andre Poenitz <[EMAIL PROTECTED]> writes: > On Thu, Jun 27, 2002 at 08:57:41AM +0100, Angus Leeming wrote: > > It sounds great. Note, however, that for asynchronous conversion you should > > use grfx::GConverter to be found in graphics/GraphicsConverter.C. > > I thought I could just do a > > > // The real work starts. > std::ofstream of(file.c_str()); > of << "\\batchmode" > << "\\documentclass{article}" > << "\\usepackage{amssymb}" > << "\\thispagestyle{empty}" > << "\\pdfoutput=0" > << "\\begin{document}" > << data > << "\\end{document}\n"; > of.close();
A few notes: it would probably be more appropriate to use the preamble from the real document, so that any ERT in formulas will have the same packages available as the main document has. This impacts speed: consider using mylatex.ltx or similar for dumping a preloaded format. Also, I would like to recommend using preview.sty (available from CTAN, also of course available as part of preview-latex): it makes it reasonable easy to access bounding box and ascending information. The material in a preview does not need the "\thispagestyle{empty}" hack which might fail for any use of fancyhdr, anyhow, and might lead to page breaks and other uglinesses. preview.sty gives you a proper baseline (starting at the (1in,1in) mark) and properly unboxes material and measures it, and can also pass dimension information to PostScript and external programs. Using the TeX bounding box in that manner will deliver proper results in the presence of scaling, rotation and pstricks graphics, all of which get goofed when using dvips -E for bounding box calculations. -- David Kastrup, Kriemhildstr. 15, 44793 Bochum Email: [EMAIL PROTECTED]