निरंजन
I was getting one error (i.e. ! Missing number, treated as zero.) which I found irrelevant. I checked the brackets many a times and I think I am right at them. My question is why is \\ good for the first line, but not good for the second line? Also replacing \par with a blank line gives the exact result that I want, but why \\ doesn't work? The code is as follows -


\documentclass{article}
\setlength{\parindent}{0pt}

\begin{document}
[abc]\\
def\par%\\
[ghi]\\
\end{document}

Skillmon
Your issue has nothing to do with LaTeX's math typesetting or the material you put in math mode. A minimal non-working example to this looks like the following:

tex
\documentclass{article}

\begin{document}
[abc]\\
[def]\\
[ghi]
\end{document}


The issue is that \\ takes an optional argument, and while parsing for that argument spaces are ignored, so the above is equivalent (for LaTeX) to:

tex
\documentclass{article}

\begin{document}
[abc]\\[def]\\[ghi]
\end{document}


What happens now is that \\ takes the optional argument (def in the first and ghi in the second case) and tries to use that optional argument, which should specify an additional vertical space inserted after the linebreak, as a correct dimension. So TeX begins to parse def as a dimension, finds that this is not a valid skip or dimen register and parses for a valid float followed by a valid unit, hence throwing the missing number error.

To solve this you have to "hide" the [ as the opening delimiter of the optional argument. You can do so by putting a \relax after \\:

tex
\documentclass{article}

\begin{document}
[abc]\\\relax
[def]\\\relax
[ghi]
\end{document}


Enter question or answer id or url (and optionally further answer ids/urls from the same question) from

Separate each id/url with a space. No need to list your own answers; they will be imported automatically.