1

I tried to use the TAB environment in a .dtx file with l3doc class, but It seems to make latex compilation fail.

MWE:

\documentclass{l3doc}
\usepackage{xcolor}
\usepackage{easytable}
\begin{document}
    \begin{TAB}(e,1cm,1cm){|c|c:c:c|}{|c|c:c|}
        a & b & c & d \\
        1 & 2 & 3 & 4 \\
        5 & 6 & 7 & 8
    \end{TAB}
\end{document}

the error also occurs using ltxdoc, but not with article class for instance:

Package `easy' Warning: unrecognized command macro:->\relax \ifmmode \hbox \els
e \leavevmode \null \fi \bgroup \let \do \do@noligs \verbatim@nolig@list \ttfam
ily \verb@eol@error \let \do \@makeother \dospecials \@ifstar {\@sverb }{\@vobe
yspaces \frenchspacing \@sverb } on line 6.

! Use of \@easy@xdef doesn't match its definition.
<argument> g__hook_env/\@easy@xdef /
                         end_code_prop
l.6     \begin{TAB}(e,1cm,1cm){|c|c:c:c|}{|c|c:c|}

Is there a way to fix this? Or maybe I should abandon easytable.

1 Answer 1

3

The issue is that | is used by l3doc as a shortcut for verbatim, and easytable doesn't like that. You'll have to disable the shortcut here:

\documentclass{l3doc}
\usepackage{xcolor}
\usepackage{easytable}
\begin{document}
\catcode`\|=12 %
    \begin{TAB}(e,1cm,1cm){|c|c:c:c|}{|c|c:c|}
        a & b & c & d \\
        1 & 2 & 3 & 4 \\
        5 & 6 & 7 & 8
    \end{TAB}
\end{document}
3
  • Would this obey groups? i.e., if I want this to have a local effect and for that I use \begingroup, \endgroup; will it work?
    – Niranjan
    Sep 26 at 14:49
  • 1
    @niranjan yes standard gripping rules apply
    – Joseph Wright
    Sep 26 at 15:20
  • thanks, it solves this error, now I discovered another one hidden behind, have to investigate :-) Sep 27 at 6:29

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .