Startup time is 0.123u 0.016s 0:00.18 72.2% 0+0k 0+0io 0pf+0w Time to get bbox for sample pdf generated by: http://mcelrath.org/Notes/Littlest%20Higgs%20Phenomenology time sudo -u zope gs -dSAFER -dDOINTERPOLATE -dTextAlphaBits=4 -dGraphicsAlphaBits=4 -dNOPAUSE -dBATCH -r130 -sDEVICE=bbox -sOutputFile=bob-%03d.png *.pdf 0.427u 0.031s 0:00.52 86.5% 0+0k 0+0io 0pf+0w 0.427u 0.023s 0:00.50 88.0% 0+0k 0+0io 0pf+0w 0.423u 0.029s 0:00.49 89.7% 0+0k 0+0io 0pf+0w 0.415u 0.036s 0:00.46 95.6% 0+0k 0+0io 0pf+0w 0.422u 0.027s 0:00.49 89.7% 0+0k 0+0io 0pf+0w Time to ghostscript the same thing: time sudo -u zope gs -dSAFER -dDOINTERPOLATE -dTextAlphaBits=4 -dGraphicsAlphaBits=4 -dNOPAUSE -dBATCH -r130 -sDEVICE=pnggray -sOutputFile=bob-%03d.png *.pdf 2.456u 0.042s 0:02.52 98.8% 0+0k 0+0io 0pf+0w 2.517u 0.036s 0:02.57 98.8% 0+0k 0+0io 0pf+0w 2.478u 0.040s 0:02.55 98.4% 0+0k 0+0io 0pf+0w 2.478u 0.039s 0:02.53 98.8% 0+0k 0+0io 0pf+0w 2.461u 0.037s 0:02.53 98.4% 0+0k 0+0io 0pf+0w time sudo -u zope convert -scale 1075x1520 *.pdf bobconvert-%03d.png 37.981u 0.439s 0:38.47 99.8% 0+0k 0+0io 0pf+0w eek! time sudo -u zope mogrify -crop 204x13+204+692 bob-001.png bobnew-001.png 0.296u 0.039s 0:00.38 84.2% 0+0k 0+0io 0pf+0w time sudo -u zope mogrify -crop 0x0+2+2 bob-002.png 0.731u 0.045s 0:00.82 93.9% 0+0k 0+0io 0pf+0w 0.731u 0.040s 0:00.81 95.0% 0+0k 0+0io 0pf+0w 0.756u 0.040s 0:00.84 94.0% 0+0k 0+0io 0pf+0w 0.746u 0.039s 0:00.81 95.0% 0+0k 0+0io 0pf+0w 0.734u 0.041s 0:00.81 95.0% 0+0k 0+0io 0pf+0w time gs -dSAFER -dDOINTERPOLATE -dTextAlphaBits=4 -dGraphicsAlphaBits=4 -dNOPAUSE -r125 -sDEVICE=pnggray -sOutputFile=test-%03d.png test.pdf < gsscript 5.665u 0.237s 0:06.60 89.2% 0+0k 0+0io 0pf+0w 5.698u 0.225s 0:06.76 87.4% 0+0k 0+0io 0pf+0w 5.696u 0.273s 0:06.92 86.1% 0+0k 0+0io 0pf+0w time source gsscript2 6.012u 0.317s 0:08.04 78.6% 0+0k 0+0io 0pf+0w 5.961u 0.312s 0:06.99 89.6% 0+0k 0+0io 0pf+0w 5.955u 0.311s 0:06.96 89.9% 0+0k 0+0io 0pf+0w Latex runs in (almost) constant time no matter how many pages are in the file. latex with existing LatexTemplate takes 0.2s. Removing all included packages takes 0.06-0.07s. dvips -E takes 0.04-0.05s (indep of latex template). gs -sDEVICE=bbox takes 0.145s. eqn2img gives this command to ghostscript: fprintf(gs, "%i neg %i neg translate\n", xoffset, yoffset); can I get it to print the bbox without restarting? Bounding Box printed in postscript by default is not tight. latex + dvips -E + gs bbox + gs + custom code = 0.25s + custom / eqn. pdflatex + gs (bbox) selectdevice (test.pdf) run 1 showpage (runs a particular page) Alignment: on hawk: lowercase letters are exactly 8 pixels high (a,e, not y) Helvetica (Adobe) 14pt Top of upper case letters to bottom of 'y' is 16px. on draal: lowercase letters are 9px, upper case plus 'y' is 15px. (recopy TODO* from hawk) Perhaps make all things less than 16px to 16px. Can measure latex height with a little latex: \cdot Wj Make this 16px scalable (match browser with latex) anything else gets expanded by 2. || or \left|\right| is getting second bar (first?) chopped sometimes. 1px too much is removed in 'e'. Documentation: Fix README: -imagemagick +pil Note about standard_header CSS template. Change resolutions? 1/22/2004 Rendering comments: Stx is inserting

...

around every line. When the whole page is rendered it does not handle the page and comments separately. Comment headings should not be treated as Stx, and message bodies should only be treated as Stx if the PageType class calls for it. 1/31/2004 More timing tests. I've switched to pslatex so I can use axodraw (requires postscript specials so doesn't work with pdflatex) dvips can spit out an eps with a tight bbox for each page, which could speed things up significantly. Timing tests on draal (600MHz alpha 21164), 512MB RAM) pslatex/dvipdf: (looks crappy) 6.255u 0.469s 0:08.25 81.3% 0+0k 0+0io 0pf+0w pslatex/dvips: (looks best) 5.503u 0.385s 0:07.06 83.2% 0+0k 0+0io 0pf+0w pdflatex: (looks better) 5.696u 0.359s 0:07.12 84.8% 0+0k 0+0io 0pf+0w appears to be only 10pt and 12pt available in latex -dAlignToPixels=1 affects neither ps or pdf mode. 2/2/2004 code='$\mathrm{Y}$' topsize=7.866667, bottomsize=4.133333, centerline = 7.866667, ne wheight=15.733333, widentop=0.000000, widenbottom=0.000000, chopx=2.000000 code='$\mathrm{j}$' topsize=6.866667, bottomsize=7.133333, centerline = 6.866667, ne wheight=14.266667, widentop=0.266667, widenbottom=0.000000, chopx=2.000000 code='$m$' topsize=3.866667, bottomsize=4.133333, centerline = 3.866667, newheight=8 .266667, widentop=0.266667, widenbottom=0.000000, chopx=2.000000 code='$G$' topsize=7.866667, bottomsize=4.133333, centerline = 7.866667, newheight=1 5.733333, widentop=0.000000, widenbottom=0.000000, chopx=2.000000 16px centerline + 0.0666666 17px centerline + 0.1333333 18px centerline + 0 2/3/2004 gs does not produce pnggray files that are the correct resolution for an 8.5x11 page. scale factor is 1.063 (DPI larger than requested) Is it only imaging a sub-region of the page? produces the proper resolution: gs-gnu 7.05 daneel /usr/local/bin/gs 8.11 on moya gs-aladdin 7.04 on moya gs-gnu 7.07 on moya gs-esp 7.07 on moya Size/Align/Res combinations that look good: 18 0 0.97 Times New Roman 17 0 1.03 16 0.5 0.97 StructuredTextLatex changes: remove ZWikiPage.applyWikiLinkLineEscapesIn (not needed) remove ZWikiPage.protectLine remove ZWikiPage.links (not used) (note dtml-accessable but not used) remove ZWikiPage.canonicalLinks (not used) (note dtml-accessable but not used) wikilink() called from DTML should really call ZWikiPage.renderLink 6/4/2004: How to do mathml with tex4ht: 1) include: \usepackage[xhtml,mathml,no-DOCTYPE]{tex4ht} in document preamble 2) latex $1.tex tex4ht -f/$1.tex -i/usr/share/texmf/tex4ht/ht-fonts/ -cunihtf t4ht -f/$1.tex 3) import sys from xml.dom.ext.reader import Sax2 from xml.dom.ext import Print reader = Sax2.Reader() document = reader.fromStream(sys.stdin) for math in document.getElementsByTagName('math'): #... math is the MathML, in order it appeared in the document. Can use one run of latex if we only look at the last N pages of the dvi file: dvips -p 228 times on navi: dvips -e 0 may help with characters moving about... latex (w/tex4ht usepackage) 0.94s w/o tex4ht usepackage) 0.25s dvicopy -page-start 228 -max-pages=1 blah.dvi blah2.dvi 0.001s dvips -E blah2.dvi blah2.ps 0.06s gs ... (creates a full-page png :() 0.2s gs creating all images at once: (average of 229p) 0.0947s convert blah2.ps blah2.png 0.136s The altimg tag may be parsable by XSLT into an img tag. Konqueror is pickier about XML than Mozilla -- use it to check MathML rendering errors: mi { margin: -0.15em; } does not get applied to mi's in super/subscript. spacing if sin sin is inconsistent -- i-n has more space than s-i. 6/24/2004: Plone interaction: got plone quick installer working Plone uses a tag which gives the WRONG page for the one you're looking at, and makes links fail. restore ALLOWED_PAGE_TYPES_IN_PLONE? need to remove wwml for plone... Plone skin w/header is CMFPlone/skins/plone_templates/header.pt