0

Sometimes I want to use LaTeX for typesetting but leave complex calculations to another language, where LaTeX receives strings and numbers to print. Is it possible to insert code for other languages and their output to LaTeX like the concept below?

\documentclass{article}
\usepackage{tikz}

\begin{document}

\foreach \i in {1,2,...,10} { \python3{\i as i} % passes \i to python3 which will be used as i {print(i100)} \ % returns i100 to latex } \end{document}

Expected output:

1
1267650600228229401496703205376
515377520732011331036461129765621272702107522001
1606938044258990275541962092341162602522202993782792835301376
7888609052210118054117285652827862296732064351090230047702789306640625
653318623500070906096690267158057820537143710472954871543071966369497141477376
3234476509624757991344647769100216810857203198904625400933895331391691459636928060001
2037035976334486086268445688409378161051468393665936250636140449354381299763336706183397376
265613988875874769338781322035779626829233452653394495974574961739092490901302182994384699044001
10000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
user202729
  • 7,143

0 Answers0