Skip to content

Run pythoncode without returning a plot #32

Answered by tobiasBora
dflvunoooooo asked this question in Q&A
Discussion options

You must be logged in to vote

Ahah please don't use your dirty small figure ^^ Sure, just use do not include pdf like in:

\documentclass{article}

\usepackage{robust-externalize}

\begin{document}

\begin{CacheMeCode}{python, do not include pdf}
  import math
  myvalue = math.sqrt(37)
  write_to_out(r"\gdef\myvalue{" + str(myvalue) + r"}")
\end{CacheMeCode}

The value we computed via the above python code is \myvalue.

\end{document}

Replies: 2 comments 1 reply

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
1 reply
@dflvunoooooo
Comment options

Answer selected by dflvunoooooo
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants