```
% pandoc -f latex -t plain
\providecommand{\test}{foo}
\providecommand{\test}{bar}

The value is: \test
^D
The value is: foo
```

```
% pandoc -f latex -t plain
\provideenvironment{test}{startfoo}{stopfoo}
\provideenvironment{test}{startbar}{stopbar}

\begin{test}
Hi
\end{test}
^D
startfoo Hi stopfoo
```


