Menu
CTAN
Comprehensive TeX Archive Network
Cover Upload Browse

pythontex – Run Python from within a document, typesetting the results

The pack­age al­lows you to en­ter Python code within a LaTeX doc­u­ment, ex­e­cute the code, and ac­cess its out­put in the orig­i­nal doc­u­ment.

Python code is only ex­e­cuted when it has been mod­i­fied, or when it meets user-spec­i­fied cri­te­ria. Code may be di­vided into user-de­fined ses­sions, which au­to­mat­i­cally run in par­al­lel.

Er­rors and warn­ings are syn­chro­nized with the LaTeX doc­u­ment, so that they re­fer to the doc­u­ment's line num­bers. Ex­ter­nal de­pen­den­cies can be tracked, so that code is re-ex­e­cuted when the data it de­pends on is mod­i­fied. PythonTeX also pro­vides syn­tax high­light­ing for code in LaTeX doc­u­ments via the Pyg­ments syn­tax high­lighter.

The pack­age pro­vides a de­python­tex util­ity, that cre­ates a copy of the doc­u­ment in which all Python code has been re­placed by its out­put. This is use­ful for jour­nal sub­mis­sions, shar­ing doc­u­ments, and con­ver­sion to other for­mats.

Sources/macros/latex/contrib/pythontex
Doc­u­men­ta­tion
Ver­sion0.13 2014-07-14
Li­censeThe LaTeX Project Public Li­cense 1.3
Copy­right2012-2014 Ge­of­frey M. Poore
Main­tainerGe­of­frey Poore
Con­tained inTeXlive as python­tex
Topics call ex­ter­nal code and pro­cess the re­sult
See also perltex

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

Guest Book Sitemap Contact