CTAN Comprehensive TeX Archive Network

CTAN update: pythontex

Date: February 17, 2026 4:16:11 PM CET
Geoffrey Poore submitted an update to the pythontex package. Version: 0.19 2026-02-15 License: lppl1.3 bsd3 Summary description: Run Python from within a document, typesetting the results Announcement text:
Fixed compatibility with recent Python versions. Fixed several bugs and improved documentation.
The package’s Catalogue entry can be viewed at https://ctan.org/pkg/pythontex The package’s files themselves can be inspected at https://mirrors.ctan.org/macros/latex/contrib/pythontex/
Thanks for the upload. For the CTAN Team Petra Rübe-Pugliese
CTAN is run entirely by volunteers and supported by TeX user groups. Please join a user group or donate to one, see https://ctan.org/lugs

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

The package allows you to enter Python code within a document, execute the code, and access its output in the original document. There is also support for Bash, JavaScript, Julia, Octave, Perl, R, Raku (Perl 6), Ruby, Rust, and SageMath.

Code is only executed when it has been modified, or when it meets user-specified criteria. Code may be divided into user-defined sessions, which automatically run in parallel.

Errors and warnings are synchronized with the document, so that they refer to the document's line numbers. External dependencies can be tracked, so that code is re-executed when the data it depends on is modified. Python also provides syntax highlighting for code in documents via the Pygments syntax highlighter.

The package provides a depythontex utility. This creates a copy of the document in which all Python code has been replaced by its output. This is useful for journal submissions, sharing documents, and conversion to other formats.

Packagepythontex
Version0.19 2026-02-15
Copyright2012–2026 Geoffrey M. Poore
MaintainerGeoffrey Poore

Announcements

more

Guest Book Sitemap Contact Contact Author