Skip to main content

Export individual data from a Python script to a LaTeX document

Project description

LaTeXDatax.py

Import calculated values from a python script into a LaTeX document. This is a python interface for the datax LaTeX package [ctan].

Installation

One method that works, though it may not be the way in python, is downloading the repo, and running pip install . in the root directory of it.

Usage

In a python script:

from LaTeXDatax import datax
datax(
		filename = "data.tex",
		a = "Literal string",
		b = 3.141592,
		c = (3.141592,"\\meter"),
		d = (3.141592,"\\meter","%.2g"),
		e = (3.141592,"%.2g"),
     )

In the LaTeX document:

\documentclass{article}
\usepackage{siunitx}
\usepackage{datax}
\begin{document}
	The length was measured as \(d=\datax{d}\).
\end{document}

Looking for contributors

I don't know python very well. This should be a working package, but it would probably be better in more comfortable hands. Specifically, I'm not sure how to distribute packages in the python ecosystem.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

LaTeXDatax-1.0.tar.gz (3.2 kB view hashes)

Uploaded Source

Built Distribution

LaTeXDatax-1.0-py3-none-any.whl (4.6 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page