Python is a general-purpose, interpreted high-level programming language.

learn more… | top users | synonyms

9
votes
1answer
2k views

MiKTeX and Perl scripts (and one Python script)

Again and again here on TeX.SX users of MiKTeX ask a question having a problem with a package or included program, where it turns out, that a Perl script is involved, in particular glossaries (because ...
9
votes
2answers
1k views

Set fonts in matplotlib graphs equal to tex document

I am writing my PhD in LaTeX and I am generating all my graphical content in Python with the matplotlib package. For my TeX document, I am using a math-supported font -- e.g. Kurier Light Condensed -- ...
11
votes
6answers
3k views

Generate LaTeX Truth Table with Python Cheetah

While looking for code which can automatically generate truth table in LaTeX I stumbled on this Python generator. It appears that the code can be used from Cheetah's framework. Can anybody point me to ...
14
votes
3answers
862 views

Automatic document update

As many of you I do quite a bit of teaching to make living. The worst part of the semester is usually beginning when I create and upload course Syllabi as well as the end of the semester when I ...
16
votes
4answers
659 views

Calculate prices

I want to calculate prices in a LaTex file. This means I want to add two numbers with exactly 2 decimal places and I want to multiply these values by an integer. An other thing is the output format. ...
29
votes
7answers
2k views

What are the advantages of Lua over other scripting languages for a TeX implementation?

The question is inspired by Martin Schröder's answer to I am new to TeX. Should I use LaTeX, XeLaTeX, …? as well as my two previous questions on this forum: Automatic document update Generate LaTeX ...
4
votes
2answers
1k views

Unable to use python.sty package

When compiling a .tex file that uses python.sty package and contains: \begin{python} ... \end{python} I keep getting an error: ./main.tex:33:I can't find file 'bin/main.py.out' \end{python} ...
16
votes
2answers
7k views

How to highlight Python syntax in LaTeX Listings \lstinputlistings command

I am using package listings to import my Python source code into my LaTeX document. I use the command \lstinputlistings. I have a Python source like class MyClass(Yourclass): def __init__(self, ...
21
votes
3answers
535 views

Best way to illustrate Keplers 2nd law with tikz

I am trying to visualize Keplers second law of planetary motion with tikz. I managed to do the following: \documentclass{article} \usepackage{tikz} \begin{document} \begin{tikzpicture} ...
13
votes
5answers
2k views

Using Python within LaTeX and accessing its variables

I have used the python package to include Python in my LaTeX document which works fine. I am trying to access the Python variables/calculations outside of \begin{python} ... \end{python}, without ...
13
votes
1answer
1k views

Embedding python in tikz

I just discovered the python package, and I'm trying to use it in Tikz code. Unfortunately, this doesn't work: \documentclass[oneside]{memoir} \usepackage{pgfplots} \usepackage{python} ...
8
votes
2answers
750 views

Pythontex workflow with LyX

I've recently learned about PythonTeX (Conference presentation). It's a tool that lets you execute python code in your LaTeX documents. This is useful for, e.g., creating matplotlib figures inside ...
8
votes
0answers
129 views

LaTeX Visual Novel Engine: Does it exist?

Did anyone in the past use LaTeX to create a "visual novel" engine? I've been using http://www.renpy.org/ for rare presentations when I need functionality the beamer class in LaTeX doesn't easily ...
3
votes
1answer
474 views

Page a day calendar problems

I am really new to the whole LaTeX thing, but it really interests me, so I'd like to learn more about it. I am also looking mostly to do just words, maybe a picture here and there but i just want ...
1
vote
1answer
724 views

Minted working from terminal but not Texpad [duplicate]

Possible Duplicate: minted not working on mac I'm using the minted package in latex on my mac (running lion). Now when I use the terminal to type pdflatex -shell-escape MintedProblem.tex ...
0
votes
1answer
231 views

DB dump into LaTeX with Python and R?

I have quite a large index. I am planning to create a full-blown DB for it and later export the information to LaTeX. I am comfortable with R and Python so I would like to work with them but I feel ...
5
votes
1answer
351 views

How to match cmyk colors between matplotlib and LaTeX

I'm plotting something using matplotlib and I'm using the matplotlib.cm.rainbow colormap. I need to match the same colors in my LaTeX document, but I'm having a difficult time making the colors match ...
3
votes
1answer
251 views

Is there a PythonTex equivalent to \Sexpr{} in R?

I started to use the excellent PythonTex package to write reproducible reports but can't seem to get it to evaluate Python code inside a LaTeX command. R has Sweave & knitr which provide the ...