i'm very new to latex and i'm trying to define a new environment that uses a existing environment and does some extra stuff at the beginning and the end. The environment i'm talking about is the "python" environment from the python package so i can highlight python code.
I defined my environment as the following:
\newenvironment{excall}
{\begin{python}}
{\end{python}}
and used it that way:
\begin{excall}
print("Hello")
print("1234")
\end{excall}
But getting this error:
! LaTeX Error: \begin{excall} on input line 54 ended by \end{document}.
if i try the same with the center
environment instead of python
, it works. What am i doing wrong?
python
environment is not for printing Python code, but for executing it.