mirror of
https://github.com/jgm/pandoc.git
synced 2026-07-11 20:07:22 +00:00
0f71b9e8c4
In LaTeX's tabular environment, the tabular newline takes an optional argument that we skip. But it only takes a single optional argument, and any further square-bracketed text that follows shouldn't be skipped. Fixes #7512, and also adds a test for the original problem raised in that issue which was already fixed at some point.
1.5 KiB
1.5 KiB
% pandoc -t native -f latex
\begin{equation*}
[d,\delta]=0.
\end{equation*}
^D
[ Para [ Math DisplayMath "[d,\\delta]=0." ] ]
% pandoc -t native -f latex
\begin{table}[htb]
\begin{tabular}{|c|c|}
$W$ & rel. err. \\[0mm]
[$\mu$m] & [\%]\\
\end{tabular}
\end{table}
^D
[ Table
( "" , [] , [] )
(Caption Nothing [])
[ ( AlignCenter , ColWidthDefault )
, ( AlignCenter , ColWidthDefault )
]
(TableHead ( "" , [] , [] ) [])
[ TableBody
( "" , [] , [] )
(RowHeadColumns 0)
[]
[ Row
( "" , [] , [] )
[ Cell
( "" , [] , [] )
AlignDefault
(RowSpan 1)
(ColSpan 1)
[ Plain [ Math InlineMath "W" ] ]
, Cell
( "" , [] , [] )
AlignDefault
(RowSpan 1)
(ColSpan 1)
[ Plain [ Str "rel." , Space , Str "err." ] ]
]
, Row
( "" , [] , [] )
[ Cell
( "" , [] , [] )
AlignDefault
(RowSpan 1)
(ColSpan 1)
[ Plain [ Str "[" , Math InlineMath "\\mu" , Str "m]" ]
]
, Cell
( "" , [] , [] )
AlignDefault
(RowSpan 1)
(ColSpan 1)
[ Plain [ Str "[%]" ] ]
]
]
]
(TableFoot ( "" , [] , [] ) [])
]