
라텍스 코드 내에서 Python 코드를 실행하려고 합니다. 간단한 hellow world 예제를 시도했지만 이 오류가 발생했습니다. 내 라텍스 파일 이름은 pyinlt.tex입니다.
오류:
i can't find file 'pyinlt.py.out'
<to be read again>
\def
소스 파일:
\documentclass{article}
\usepackage{python}
\begin{document}
Say hello Python:
\begin{python}
print r"Hello \LaTeX!"
\end{python}
\end{document}
답변1
python
환경에는 기본적으로 비활성화된 일부 권한이 필요합니다. 컴파일하는 방법은 -shell-escape
컴파일 타임에 다음을 사용하여 활성화하는 것입니다.
latex -shell-escape pyinlt.tex