\documentclass{article}

\begin{document}

\begin{tabular}{ll}

a & b \\

[c] & d \\

\end{tabular}

\end{document}

if required, one can specify the vertical gap between lines in a table using

`\\[len]`

LaTeX removed the newline and whitespace to interpret the table as having a

`\\[c]`

entry, and there exists no length "c".So the solution is to write the initial square bracket into curly braces. This way it is not interpreted as the beginning of the optional argument of the newline command.

\documentclass{article}

\begin{document}

\begin{tabular}{ll}

a & b \\

{[}c] & d \\

\end{tabular}

\end{document}

Thanks to Werner Grundlingh for showing me the problem source.

## 7 comments:

You may simplify use \relax

a & b \\ \relax

[c] & d

Thanks, very helpful.

Very useful when using with XeLatex especially when we use below syntax for non-english based Song latex package

\begin{tabular}

\[గా గ గా మ గ]

\end{tabular}

This solution is helpful as this is required in cases for typesetting carnatic music documents

Gopalakrishna Palem

Creator of CFugue Carnatic Music Programming Library for C++

http://gpalem.web.officelive.com/CFugue.html

I found that prepending a tilde works as well.

a & b\\

~[c] & d

title results in small space in front of [string]

Thanks all - very helpful.

I find the tilde does something odd with the spacingso am going for the {[}.

Also see “[” as first character in table row.

Post a Comment