Putting $$s in the middle of an `equation` environment: why doesn't Latex complain?

空扰寡人 提交于 2019-12-05 16:43:20
Crowley

Maybe it is because of environments math and displaymath.

I just tried those codes

\[\alpha$$ - works properly

\begin{displaymath}\alpha$$ - error (\begin{displaymath} ended by \end{document}) *

\displaymath\alpha$$ - works properly

\displaymath\alpha\displaymath - error (Bad math environment delimiter)

\displaymath\alpha\enddisplaymath - works properly.

Symetric options produce same results, so I think there's in LaTeX command definition

\newcommand{\[}{\displaymath}
\newcommand{\]}{\enddisplaymath }
\newenvironment{displaymath}{\displaymath}{enddisplaymath}

and in TeX something like

"if(displaymath)
 {$$ := \displaymath}
 else
 {$$ := \displaymath}"

Maybe I'm wrong, but this seems logical to me.


  • Note: That proves that I was wrong. Better words are It says: "Begin equation, switch to text mode, switch back to displaymath, typeset tangens definition and finally end the equation".
标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!