1

How is math mode processed in TeX? Is typing \n (in editor) in math mode equivalent to one space? I am asking, because I struggled to find a bug in source code (between a lot of matrices :-) ), and the reason was following:

\documentclass{article}                      
\begin{document}       
$1    
2$                      
\end{document}         

compiles,

\documentclass{article}  
\begin{document}       
$1                      

2$    
\end{document}         

but this does not. (missing $ error)

I know that I can add % between to maintain source code style, but the question is about why above error happens.

0 Answers0