提问于:
浏览数:
1864
代码抄录环境
```tex
\begin{lstlisting}
\end{lstlisting}
```
无法用于
```tex
\newenvironment{}{}{}
```
中, MWE 如下:
```tex
\documentclass{article}
\usepackage{listings}
\newenvironment{myen}{\begin{lstlisting}}{\end{lstlisting}}
\begin{document}
\begin{lstlisting}
aaa aaa aaa
\end{lstlisting}
% 去掉下面三行就能编译成功
\begin{myen}
bbb bbb bbb
\end{myen}
\end{document}
```