CTAN Comprehensive TeX Archive Network

Directory macros/latex/contrib/hybrid-latex

README.md

Hybrid - adding active Python code to

Overview

This is a collection of Python and Bash shell scripts that allows documents to contain active Python code. The active code blocks are processed ahead of and their results are accessible within the same document. Thus a calculation that might otherwise be done using in two documents, one using Python to do the maths, and a separate document to record the results can be consolidated into a single source.

There are other collections that achieve the same result, see Pyhton and Sage .

The main differences between this package and Pyhton and Sage are:

  • The tools are written in Python and Bash rather than , thus allowing easy extension to other languages,
    • The results of the active code blocks are saved to a single file that can be easily shared with colleagues, journals or included in other documents.

This version of the package is specific to embedded Python code. Extensions for Mathematica, Maple, Matlab and Cadabra can be found on the github repository.

Installation

There are a handful of files to install (by hand) for each language. These include Bash shell scripts, Python scripts and style files. Each file can be copied to wherever their respective program expects to find them. For example, the Bash and Python scripts could be sudo copied to /usr/local/bin (for access by all users) or to ~/bin (for your personal access). The style files can be copied to wherever they will be visible to (see this discussion on tex.stackexchange for useful suggestions). If you place the files in non-standard locations you may need to adjust your PATH and TEXINPUT environment variables accordingly. If all else fails, you can copy all of the Bash, Python and files into the same directory as your document (though this is a very bad solution).

More details on the installation can be found in the main documentation, doc/hybrid.pdf.

Documentation

The main documentation can be found in doc/hybrid.pdf. See also the examples in examples/.

Version

v0.1 (2018/08/22)

  • Initial relase.

Author

>Leo Brewin, >School of Mathematics, >Monash University, >Leo.Brewin@monash.edu

License

All files in this collection are distributed under the MIT license. See the file LICENSE.txt for the full details.

Download the contents of this package in one zip archive (1.8M).

hybrid-latex – Allow active Python code in documents

This is a collection of Python and Bash shell scripts that allows documents to contain active Python code. The active code blocks are processed ahead of and their results are accessible within the same document. Thus a calculation that might otherwise be done in two documents, one using Python to do the maths, and a separate document to record the results, can be consolidated into a single source.

Packagehybrid-latex
Repositoryhttps://github.com/leo-brewin/hybrid-latex
Version0.1 2018-08-22
LicensesMIT License
Copyright2018 Leo Brewin
MaintainerLeo Christopher Brewin
Contained inMiKTeX as hybrid-latex
TopicsCallback
...
Guest Book Sitemap Contact Contact Author