4

This question already has an answer here:

The following codes return errors

\documentclass{article}
\begin{document}
cd\\
[asd]
\end{document}

But this one will work

\documentclass{article}
\begin{document}
cd

[asd]
\end{document}

marked as duplicate by Heiko Oberdiek, Werner, percusse, Adam Liter, cmhughes Apr 30 '14 at 15:41

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

  • What is the error message? – Romain Picot Apr 30 '14 at 14:32
  • 2
    This is caused by [ I think. \\ can take an optional argument, which is a length. LaTeX picks up [asd] as an optional argument to \\ , but asd is not a valid length, so you get an error. There have been similar questions before I think. – Torbjørn T. Apr 30 '14 at 14:33
  • 2
    Instead use cd\\\relax [asd]. The \relax will prevent the following bracket from being taken as an argument. – Steven B. Segletes Apr 30 '14 at 14:37