- #1

blaisem

- 28

- 2

https://www.physicsforums.com/help/latexhelp/

the 2nd section, "Delimiting your LaTex code," formats the LaTex equations into a blue box. An advantage of this box is that line spacing before, between, and after $$ delimiters is single-spaced. Otherwise, you end up with massive spacing like this:

$$ F=ma $$

$$ P=mv $$

$$ \hat H \Psi = - \frac{\hbar ^2}{2 \mu } \nabla^2 \Psi (r) + V(r) \Psi (r) = E \Psi (r) $$

For this reason, I would like to use this blue box, but I could not find anywhere how.

I initially attempted the {linespacing} LaTex formatting from its help site, but that doesn't seem to work on PF. I did however eventually find the spacing

*inbetween*delimiters can be forced into single spacing via \begin{align}, although it requires the inconvenience of trial and error to arrange the proper alignment with "&"—not to mention the admittedly very mild annoyance of typing out the extra text. Nevertheless, the spacing before and after the equations remains dramatically pronounced. Example:

$$ \begin{align} F=ma \nonumber \\ p=mv \nonumber \\ \hat H \Psi = - \frac{\hbar ^2}{2 \mu } \nabla^2 \Psi (r) + V(r) \Psi (r) = E \Psi (r) \nonumber \end{align}$$

Also notice the necessity to trial and error the alignment with longer equations, making this work-around suboptimally tedious.

Personally, I prefer the aesthetic provided by the blue box in the help tutorial, where the spacing is more compact, and potentially more convenient to implement. Would it be possible to add how to do this somewhere in the FAQ? Or did I manage to miss it explained somewhere?