I have read in the PythonTeX manual about how to pass LaTeX values to PythonTeX, but I cannot find any documentation (or a way) to do the reverse. For example, in the LaTeX package datenumber, one passes <year>, <month>, and <day> to \setdatenumber{<year>}{<month>}{<day>} in order to set \thedatenumber, a counter defined by the package. I want to do something like this:
\documentclass{article}
\usepackage{pythontex}
\usepackage{datenumber}
\begin{document}
\pyc{year = 2015}
\pyc{day = 2}
\pyc{month = 3}
\setdatenumber{\py{year}}{\py{month}}{\py{day}}
\end{document}
But, datenumber gets frustrated and tells me its missing number. Is the problem the way I'm using PythonTeX or just the way datenumber works?
Thank you in advance.
{{0}}. Why does one set cause an error? – fiziks Mar 02 '15 at 19:05format()method, replacement fields are delimited by braces, and braces are doubled to be literal. So{0}is field zero, and{{is a literal left brace.{{{0}}}is field zero, surrounded by a literal brace on each side. – G. Poore Mar 02 '15 at 20:11