erro de ambiente tabularx: “O argumento de \@argarraycr tem um} extra” ao iniciar com colchete

erro de ambiente tabularx: “O argumento de \@argarraycr tem um} extra” ao iniciar com colchete

Aqui está um MWE de criação de uma tabela usando tabularx:

\documentclass[border=5mm]{standalone}
\usepackage{tabularx}
\begin{document}

\begin{tabularx}{1.0\linewidth}{X}
  header 1 \\
  [unit 1) \\ % Does not work.
  % (unit 1) \\ % Works.
\end{tabularx}
\end{document}

o que me dá o seguinte erro:

ERRO: O argumento de \@argarraycr possui um } extra.

Aqui está o registro completo:

Running `LaTeX' on `table_line_start' with ``pdflatex  -file-line-error   -interaction=nonstopmode "\input" table_line_start.tex''
This is pdfTeX, Version 3.14159265-2.6-1.40.18 (TeX Live 2017) (preloaded format=pdflatex)
restricted \write18 enabled.
entering extended mode
LaTeX2e <2017-04-15>
Babel <3.16> and hyphenation patterns for 84 language(s) loaded.
(./table_line_start.tex
(/usr/local/texlive/2017/texmf-dist/tex/latex/standalone/standalone.cls
Document Class: standalone 2015/07/15 v1.2 Class to compile TeX sub-files standalone
(/usr/local/texlive/2017/texmf-dist/tex/generic/oberdiek/ifluatex.sty)
(/usr/local/texlive/2017/texmf-dist/tex/generic/oberdiek/ifpdf.sty)
(/usr/local/texlive/2017/texmf-dist/tex/generic/ifxetex/ifxetex.sty)
(/usr/local/texlive/2017/texmf-dist/tex/latex/xkeyval/xkeyval.sty
(/usr/local/texlive/2017/texmf-dist/tex/generic/xkeyval/xkeyval.tex
(/usr/local/texlive/2017/texmf-dist/tex/generic/xkeyval/xkvutils.tex
(/usr/local/texlive/2017/texmf-dist/tex/generic/xkeyval/keyval.tex))))
(/usr/local/texlive/2017/texmf-dist/tex/latex/standalone/standalone.cfg)
(/usr/local/texlive/2017/texmf-dist/tex/latex/base/article.cls
Document Class: article 2014/09/29 v1.4h Standard LaTeX document class
(/usr/local/texlive/2017/texmf-dist/tex/latex/base/size10.clo)))
(/usr/local/texlive/2017/texmf-dist/tex/latex/tools/tabularx.sty
(/usr/local/texlive/2017/texmf-dist/tex/latex/tools/array.sty))
(./table_line_start.aux)
./table_line_start.tex:10: Argument of \@argarraycr has an extra }.
<inserted text> 
               \par 
l.10 \end{tabularx}

Runaway argument?
unit 1) \\ \endtabular 
./table_line_start.tex:10: Paragraph ended before \@argarraycr was complete.
<to be read again> 
               \par 
l.10 \end{tabularx}

...

(That makes 100 errors; please try again.)
./table_line_start.tex:10:  ==> Fatal error occurred, no output PDF file produced!
Transcript written on table_line_start.log.

TeX Output exited abnormally with code 1 at Tue Feb 20 13:50:51

O erro desaparece quando substituo o colchete [na frente unit 1por um parêntese (. Escrever [header 1não causa problemas. Alguém pode confirmar que isso é um bug?

Responder1

problema causa colchete na célula. ele tinha que ser incorporado entre chaves (sozinho ou conteúdo completo):

\documentclass[border=5mm]{standalone}
\usepackage{tabularx}
\begin{document}

\begin{tabularx}{1.0\linewidth}{X}
  header 1 \\
  {[unit 1)}
\end{tabularx}
\end{document}

insira a descrição da imagem aqui

informação relacionada