If I use fenced code block within pandoc markdown it produces reasonable LaTeX ouptut:
pagebreak
```python
foo = 1
```
pandoc input.md -o output.tex
pagebreak
begin{Shaded}
begin{Highlighting}[]
NormalTok{foo }OperatorTok{=} DecValTok{1}
end{Highlighting}
end{Shaded}
But if I replace pagebreak
LaTeX command with an environment command, fenced code block will not work anymore:
begin{minipage}{textwidth}
```python
foo = 1
```
end{minipage}
pandoc input.md -o output.tex
begin{minipage}{textwidth}
```python
foo = 1
```
end{minipage}
It seems that pandoc has some special handling for LaTeX environments which breaks things. Does anyone know where can I search for a solution? I want environment commands to be inserted into output as-is, like all other LaTeX commands, without any special handling.