Giter VIP home page Giter VIP logo

pythontex's Introduction

flattr

PythonTeX

Fast Access to Python from within LaTeX

Author:Geoffrey Poore
Version:0.14
License:LPPL (LaTeX code) and BSD 3-Clause (Python code)

Overview

PythonTeX provides fast, user-friendly access to Python from within LaTeX. It allows Python code entered within a LaTeX document to be executed, and the results to be included within the original document. It also provides syntax highlighting for code within LaTeX documents via the Pygments syntax highlighter.

PythonTeX also provides support for Ruby, Julia, and Octave. Support for additional languages is coming soon.

See pythontex.pdf for detailed installation instructions, or use the installation script for TeX Live and MiKTeX. See pythontex_quickstart.pdf to get started, and pythontex_gallery.pdf for examples of what is possible with PythonTeX.

The depythontex utility creates a copy of a PythonTeX document in which all Python code has been replaced by its output. This plain LaTeX document is more suitable for journal submission, sharing, or conversion to other document formats. See pythontex_gallery.html and the accompanying conversion script for an example of a PythonTeX document that was converted to HTML via depythontex and Pandoc.

Citing PythonTeX

If you use PythonTeX in your writing and research, please consider citing it in any resulting publications. Currently, the best paper to cite is the one published in the 2013 SciPy proceedings.

Latest release

(Full release history is available here.)

v0.14 (2014/07/17)
New features
  • All commands for working with code inline are now robust, via etoolbox's \newrobustcmd. Among other things, this allows commands like \py to work in standard captions that have not been redefined to avoid protection issues.
  • Upgraded syncpdb to v0.2, which provides better list formatting.
Backward-incompatible changes
  • The default working directory is now the main document directory instead of the output directory. Using the output directory was a common source of confusion for new users and was incompatible with plans for future development. Old documents in which the working directory was not specified will continue to use the output directory, but PythonTeX will print an upgrade message; new documents will use the new setting. The output directory may be selected as the working directory manually, or with the shorthand "\setpythontexworkingdir{<outputdir>}".
  • Standardized version numbering by removing the "v" prefix from the stored version numbers in Python variables and LaTeX macros. Standardized the PythonTeX scripts by renaming version to __version__.

Objectives for future releases

  • Improve support for macro programming with PythonTeX. Add depythontex support for user macros.
  • Improve system for adding other languages.
  • Improve stderr synchronization. Simplify support for multiple languages.
  • Add finer-grained control. Work toward rerun control of execution at the session level, and control of whether stdout and strerr are displayed at the command/environment level.
  • Refactor to separate the code-management core from LaTeX-related features, so that the core can be used with other document formats (for example, markdown) in a manner similar to Sweave.

pythontex's People

Contributors

gpoore avatar

Watchers

James Cloos avatar Stuart Mumford avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.