```
% pandoc -r latex -w plain
\newcommand{\foo}{123}\renewcommand\foo{456}\foo
^D
456
```

```
% pandoc -r latex -w plain
\newcommand\foo{123}\renewcommand\foo{456}\foo
^D
456
```

```
% pandoc -r latex -w plain
\newcommand{\foo}{123}\renewcommand{\foo}{456}\foo
^D
456
```

```
% pandoc -r latex -w plain
\newcommand\foo{123}\renewcommand{\foo}{456}\foo
^D
456
```
