1

Is there a downside to using split inside every equation, even for single equations? One simple test I did produced identical outputs for a single line equation.

I would prefer this since it effectively means less typing and a cleaner "code".

(Less typing because I would define \be to begin both environments and \ee to end both environments.)

And I mean downsides apart from the small downside that any personal macro has, that possible collaborators will need to match conventions. I also imagine this increases the compilation time, but I think by a negligible amount.

Marten
  • 311
  • 6
  • using \be and \ee may be a bad idea. If you want to save time, look into editors with good auto-completion and/or custom macros. – samcarter_is_at_topanswers.xyz Oct 30 '17 at 16:31
  • please read https://tex.stackexchange.com/a/362458/36296 – samcarter_is_at_topanswers.xyz Oct 30 '17 at 16:34
  • 2
    apart from the inadvisability of hiding the environment syntax, you will get poorer vertical spacing as you will hide the natural width of the equation so not benefit from abovedisplayshortskip (for similar reasons you should not use align or gather for one-line equations) – David Carlisle Oct 30 '17 at 17:08
  • Thanks for the reply @samcarter. However, except for the possible very real issue with align, which should not be a problem for this case, I feel that that answer mostly addresses three subjective concerns I don't agree with. The first two points are irrelevant as using \be does not mean I will be using it exclusively, just that it will be used for this one environment that is by far the most common. All other special cases can be coded the regular way. The other point about what is most readable is definitely subjective as I find the short version by far more readable. – Marten Oct 30 '17 at 17:11
  • 1
    You wrote, "One simple test I did produced identical outputs". Since you've revealed exactly zero information about the nature of this "simple test", it's impossible to evaluate your claim. Actually, the "test" was almost certainly non-representative. Do study David Carlisle's answer for another test -- one which does show a big difference in vertical spacing and, in particular, inferior vertical spacing for the equation that contains a needless split "wrapper" inside the equation environment. – Mico Oct 30 '17 at 17:23
  • @Mico. In defense of my tests, I was testing with the equations I had in a real document. Part of the problem was of course that I thought they were representative. So I thought any equation you test yourself would show the same. I actually thought of including some of them but (as you might suspect given my apparent love of shorthand) they were full of personal macros and I thought it would be pointless to convert them since I though any equation would reproduce this. I actually did the replacement on a whole document and saw no difference. – Marten Oct 30 '17 at 17:58
  • Indeed these equations apparently weren't representative . They were both longer had more height difference (due to fractions and longer symbols) and were between full lines of text in which case the effect does go away (or it seems on zooming in the difference is still there but to small to be noticeable unless you are using a ruler.).

    That was why I was surprised that there was such a big effect in the minipage.

    – Marten Oct 30 '17 at 17:59
  • On the other hand, although I will probably not stick with this shorthand because of this effect, for this specific document the equations look great and nowhere do I have the double empty space you get in David's example. So at least the test equations were representative for the equations in the kind of document that I was typing and thus accurately showed that my shorthand would work fine for that. – Marten Oct 30 '17 at 17:59
  • 1
    @Kvothe you will get the difference whenever the last line of the paragraph before the display is short. so unless you have total control of the line breaking and can ensure there is never a short line before a display then this really is not advisable (but it's your document, do as you wish:-) – David Carlisle Oct 30 '17 at 20:38

1 Answers1

9

It is a bad idea to hide the environment syntax, environments being the main syntactic constructs in the language. While you may be able to read it more easily, any convertors or editor syntax highlighters will most likely not be able to understand the construct, so for example not give math-specific highlighting and completion.

However it also gives worse spacing as it hides the natural width of the expression, compare the two versions:

enter image description here

\documentclass{article}

\usepackage{amsmath}

\begin{document}

\begin{minipage}[t]{.4\textwidth}
aaaaa
\begin{equation}
  a=1
\end{equation}
xxxxx
\end{minipage}\qquad
\begin{minipage}[t]{.4\textwidth}
aaaaa
\begin{equation}
  \begin{split}a&=1\end{split}
\end{equation}
xxxxx
\end{minipage}

\end{document}
David Carlisle
  • 757,742
  • Thanks for the answer, the second point seems a real concern in that the split environment in this case really does give notably uglier output. However for the equations I used in my main text I did not find any difference in spacing. Does this just happen only in more complicated constructs such as inside a minipage. For those it seems beneficial to write the full thing out anyhow for clarity. However, for common equations in the main text the output (including the spacing) seems identical. – Marten Oct 30 '17 at 17:27
  • 1
    @Kvothe no the minipage is totally unrelated to the spacing, I just used that to put the two equations side by side to highlight the difference. you get the bad spacing for the equation a=1 which is hardly a complicated construct. – David Carlisle Oct 30 '17 at 17:30
  • thanks. This does seem to be a big enough problem to be the end of this shorthand. – Marten Oct 30 '17 at 17:46