Skip to content

protect p{} cell templates with an inner group#2694

Draft
dginev wants to merge 1 commit intobrucemiller:masterfrom
dginev:group-p-cells
Draft

protect p{} cell templates with an inner group#2694
dginev wants to merge 1 commit intobrucemiller:masterfrom
dginev:group-p-cells

Conversation

@dginev
Copy link
Copy Markdown
Collaborator

@dginev dginev commented Nov 20, 2025

This came from a discovered regression on arXiv:2310.06770v3 after raw interpretation was enabled.

I reduced it to a minimal example of a listing showing up inside a cell with a p{} template:

\documentclass{article}
\usepackage{listings}
\begin{document}
\begin{tabular}{p{\linewidth}}
A\begin{lstlisting}
  B
\end{lstlisting}
\end{tabular}
\end{document}

The errors produced have to do with TeX mode-matching, in particular the \hbox associated with p{} terminating the wrong mode at the end.

While fishing for more information I found that making a couple of groups more explicit avoids the error - was it simply a matter of not enough explicit groups? Probably not, as the article continues to encounter a few errors related to mode balancing. Flagging this with a draft PR for now, feedback welcome.

To download the arXiv source for testing:
https://arxiv.org/src/2310.06770v3

@dginev dginev added the arXiv label Nov 20, 2025
dewlove1030-hash

This comment was marked as spam.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants