I tried using the solution provided here (https://tex.stackexchange.com/a/102122/69378) to fix the lstings look ahead problem with tabular to fix the same problem using longtable, but to know avail.
What do I need to change to make lstings work with longtable, and just for my own information, what is different about how longtable and tabular implement their curly brace searches? I thought this would have been common because it would have been done at base level of TeX internals as alluded to in the linked answer.
\documentclass{article}
\usepackage{longtable}
\usepackage{listings}
\begin{document}
Test \lstinline{Test}
And the table:
\begin{longtable}{l l}
Test & Test \\
% Test & \lstinline{Test} \\ % doesn't work
% Test & {\lstinline{Test}} \\ % doesn't work - solution provided https://tex.stackexchange.com/a/102122/69378
\end{longtable}
\end{document}
\lstinline
makes a multi-line display so needs to be in ap
column not a one-linel
column.longtable
andtabular
. When I change my second column top
orp{2cm}
I still get a screen full of errors about braces and\cr
\lstinline!test!
, not with braces.\verb{XYZ}
but I figured because\lstinline{}
(the function I want to use in the table) does use curly braces that relative to the verbatim environment they were being treated differently, or as a special case.