2

I'm helping a professor write the second edition of his book, so I'm working with a lot of "old" code and bad practices. Something I've found is that he has defined macros for beginning and ending equations,

\newcommand{\be}{\begin{equation}}
\newcommand{\ee}{\end{equation}}

I don't remember where, but I think I read here somewhere that this is a bad practice. Could someone explain why?

han-tyumi
  • 1,152
  • 8
  • 17
  • It is wrong, because it hides the environment in a very bad way. Also, it won't work with amsmath's envrionments, as explained here: http://tex.stackexchange.com/questions/100138/what-is-wrong-with-defining-bal-as-beginalign/100167#100167 I actually think, that this question covers your question about best practices. – yo' Jul 31 '15 at 16:59
  • It does, indeed. Should I close this one? I'm sorry, I tried searching to avoid duplicates, but didn't stumble upon it. – han-tyumi Jul 31 '15 at 17:01
  • We can close it as a dupe, if you don't mind. I think it's not a bad idea since the other question doesn't include [tag:best-practices] tag :) – yo' Jul 31 '15 at 17:03
  • My question could be expanded further to non-mathematical cases. For example, there are commands for beginning an itemize environment. I don't know if this expansion would make the answer so different, so I still think this should be closed. – han-tyumi Jul 31 '15 at 17:09
  • That's quite a different question, but the idea is the same: You are hiding the environment, which is a bad idea from the conceptual point of view. – yo' Jul 31 '15 at 17:21
  • I understand it can be tedious to ype environments, but I think it's more a question of defining shortcuts for the editor which expand to the environments. – Bernard Jul 31 '15 at 17:26
  • @Bernard However, you didn't ask about it. That's covered in the manuals/helps to the editors. – yo' Jul 31 '15 at 17:30

0 Answers0