CTAN Comprehensive TeX Archive Network

Direc­tory macros/latex/contrib/pstool


The pstool pack­age

A pack­age like pst-pdf for pro­cess­ing PostScript graph­ics with ps­frag la­bels within pdf doc­u­ments. The dif­fer­ence with this pack­age is that ev­ery graphic is com­piled in­di­vid­u­ally, dras­ti­cally speed­ing up com­pi­la­tion time when only a sin­gle fig­ure needs re-pro­cess­ing.

An ex­am­ple and a test­suite is avail­able in the source repos­i­tory for the pack­age: https://github.com/wspr/pstool

Please see the PDF doc­u­men­ta­tion for fur­ther in­for­ma­tion.

  • Copy­right 2008–2014 Zebb Prime
  • Copy­right 2008–2018 Will Robert­son


This work may be dis­tributed and/or mod­i­fied un­der the con­di­tions of the Project Public Li­cense, ei­ther ver­sion 1.3c or (at your op­tion) any later ver­sion. The lat­est ver­sion of this li­cense is in: http://www.la­tex-project.org/lppl.txt

This work has the LPPL main­te­nance sta­tus maintained'. The Cur­rent Main­tainer of this work is Will Robert­son.

Change his­tory

  • v1.5e, Jan 2018:
    • New pack­age op­tion crossref=false to dis­able cross-ref­er­enc­ing sup­port.
  • v1.5d, Oct 2017:
    • Use shellesc pack­age for write18 in Lua.
  • v1.5c:
    • Doc­u­men­ta­tion up­date; some mi­nor cos­metic code changes.
  • v1.5b:
    • Fix con­flict with beamer, which re­sets the cat­code of @ with be­gin{doc­u­ment}.
  • v1.5a, March 2013:
    • Fix bug in­tro­duced in last ver­sion in which plain com­pi­la­tion (pro­duc­ing DVI) pro­duced er­ro­neous out­put above each fig­ure.
  • v1.5, Fe­bru­ary 2013:
    • Fix =/# mixup in Win­dows ps2pdf op­tions.
    • Check the .tex file for new­ness when re­gen­er­at­ing fig­ures.
    • Add macro-file=... for a global file to re­trieve ps­frag macros (de­fault is "job­name-pstool.tex"). Thanks to Hein­rich Kruger for sug­ges­tions for the above.
    • Cross-ref­er­ences and ci­ta­tions within ex­ter­nal graph­ics are now sup­ported.
  • v1.4, Novem­ber 2010:
    • More ro­bust pars­ing of the main in­put file to read in the pream­ble. There­fore, EndPream­ble is now re­quired much less of­ten.
    • Ap­par­ently un­re­leased to CTAN, oops :)
  • v1.3, July 2009:
    • bitmap op­tion to con­trol com­pres­sion of bitmap graph­ics,
    • Pack­age op­tions may now be set any­where with pstoolsetup{},
    • lo­calised pstool op­tions can be set per-graphic.

Down­load the con­tents of this pack­age in one zip archive (370.2k).

pstool – Sup­port for ps­frag within pdf

The pack­age works in the same sort of way as pst-pdf, but it also pro­cesses the PostScript graph­ics with ps­frag to add la­bels within the graphic, be­fore con­ver­sion. Thus the bun­dle re­places two steps of an or­di­nary work­flow. (Nat­u­rally, the pack­age re­quires that \write 18 is en­abled.)

Ps­tool en­sures that each ver­sion of each graphic is com­piled once only (the graphic is (re-)com­piled only if it has changed since the pre­vi­ous com­pi­la­tion of the doc­u­ment). This dras­ti­cally speeds up the run­ning of the pack­age in the typ­i­cal case (though the first run of any doc­u­ment is in­evitably just as slow as with any sim­i­lar pack­age).

Ver­sion1.5e 2018-01-20
Li­censesThe Project Public Li­cense 1.3c
Copy­right2008–2014 Zebb Prime
2008–2018 Will Robert­son
Main­tainerZebb Prime
Will Robert­son
Con­tained inTeX Live as pstool
MiKTeX as pstool
TopicsGraph­ics EPS/PDF
Graph­ics text
Guest Book Sitemap Contact Contact Author