Skip to content

tabu* does not work with alltt-type usage of Verbatim #3

Open
@jfbu

Description

@jfbu

This MWE does not compile:

\documentclass{article}
\usepackage{fancyvrb}
\usepackage{tabu}
\begin{document}
\begin{tabu*}to\linewidth{|XX|}
A&
\begin{Verbatim}[commandchars=\\\{\}]
And this is a complete
Verbatim environment
\end{Verbatim}
\\
\end{tabu*}
\end{document}

That was already the case with TL2017. I read the manual but not the source code. Ah, I looked a bit now after examining a trace. I see in particular

\iftabuscantokens \endlinechar=10 \obeyspaces \fi

on line 1134 of the code in tabu.pdf, although I did not check if that line is really relevant it immediately brings to mind the well-known problem of scantokens with an active space.

I see now tabu's author is aware, as later on there is section "Compatibility with the fancyvrb package" in commented source code, and he adapts the fancyvrb end-check via \tabu@fancyvrb code. (lines 1912ff)

Thus this does not work if the \ has its native catcode. This is source of problem, which hence is deeply coded into tabu code: there is no provision for it to work with a Verbatim configured à la "alltt"".

Hence raising this issue here, to at least make it clear in the manual, or to handle it as a feature request.

Metadata

Metadata

Assignees

No one assigned

    Labels

    old bugbug that has been in the code since 2011

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions