# Can I make vertical separation of $$expressions smaller? • LaTeX • George Keeling In summary: BTW, this sub forum is a mix of genuine LateX and MathJax (I don't know how to filter that). Someone knowledgeable should add a thread on the diffferences and possible workarounds :rolleyes: George Keeling Gold Member I wrote my first LaTeX like this: ... it was easy to calculate that$$ ê^1=\hat x - \frac { \hat y } {\tan \alpha} $$and$$ ê^2=\frac { \hat y } {\sin \alpha} $$where ... Is it possible to make the vertical separation smaller? The first example in the latex primer does not seem to suffer from this problem. I tried ## instead of$$ and other problems arose.

George Keeling said:
I wrote my first LaTeX like this:
... it was easy to calculate that$$ê^1=\hat x - \frac { \hat y } {\tan \alpha}$$and$$ê^2=\frac { \hat y } {\sin \alpha}$$where ...
Is it possible to make the vertical separation smaller? The first example in the latex primer does not seem to suffer from this problem. I tried ## instead of $$and other problems arose. Yes, a little (1 line). You don't put a line feed after the$$:
calculate that
$$ê^1=\hat x - \frac { \hat y } {\tan \alpha}$$and$$ê^2=\frac { \hat y } {\sin \alpha}$$where ...
It seems leaving out the line in front of the $$doesn't matter, though... George Keeling and Orodruin BvU said: Yes, a little (1 line). You don't put a line feed after the$$:
calculate that
$$ê^1=\hat x - \frac { \hat y } {\tan \alpha}$$and$$ê^2=\frac { \hat y } {\sin \alpha}$$where ...
It seems leaving out the line in front of the $$doesn't matter, though... As kind of a LaTeX nerd, this is a very common mistake students make when writing LaTeX. The worst part is when they do it mid sentence and a new indented paragraph is started with ”where x is ...”. That really hurts my eyes. I sometimes go for multiline expressions when I want tighter packing. Everything is inside one set of \\...\\ but with two backslashes and a new line marking a line break (I'm not sure if the new line is necessary, I just do it for readability). That is, if I write \\ your first line \\ \rm{and} \\ your second line \\ I get this:$$\hat e^1 = \hat x - \frac {\hat y}{\tan \alpha} \\
\rm{and} \\
\hat e^2 = \frac {\hat y}{\sin \alpha} $$Normally I do that when I have several lines of equations but no text lines in between. You can see that it centered the word "and" along with the equations. I'm still a relative novice with this LaTeX interface myself and not sure if I can left-justify that one text line within the multiline. By the way, multilines are covered in the primer. George Keeling RPinPA said:$$ your first line \\
\rm{and} \\
your second line $$If the and was left justified it would be great! I can't find anything that might do that except \hfill or \hspace{\fill}, but they don't seem to do much.$$ your first line \\
\rm{and} \phantom {10000000000000000000000000000000000000000000000000000000000} \\
your second line  your first line \\
\rm{and} \phantom {10000000000000000000000000000000000000000000000000000000000} \\
your second line $$George Keeling BvU said: \phantom {10000000000000000000000000000000000000000000000000000000000} Brilliant! I guess I will have to experiment to find out how many 0's are necessary in this great bodge. The phantom is not mentioned in the PF guide. I have found http://www.icl.utk.edu/~mgates3/docs/latex.pdf which mentions it. \qquad is similar but not as effective. Here it is with half the number of 0's, then x's, which give more bang for your buck:$$ your first line \\
\rm{and} \phantom {100000000000000000000000000} \\
\rm{and} \phantom {xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx} \\
your second line $$BvU said:$$ your first line \\
\rm{and} \phantom {10000000000000000000000000000000000000000000000000000000000} \\
your second line  your first line \\
\rm{and} \phantom {10000000000000000000000000000000000000000000000000000000000} \\

## 5. Are there any limitations to how small I can make the vertical separation of  expressions?

There may be some limitations depending on the software or tool you are using to display the expressions. Some may have minimum spacing requirements for readability. It is also important to ensure that the expressions are still legible and not too crowded together.

• MATLAB, Maple, Mathematica, LaTeX
Replies
5
Views
1K
• MATLAB, Maple, Mathematica, LaTeX
Replies
7
Views
2K
• Classical Physics
Replies
1
Views
115
• Quantum Physics
Replies
16
Views
1K
• Calculus and Beyond Homework Help
Replies
16
Views
1K
• MATLAB, Maple, Mathematica, LaTeX
Replies
3
Views
323
• Set Theory, Logic, Probability, Statistics
Replies
1
Views
985
• Quantum Physics
Replies
14
Views
1K
• Calculus and Beyond Homework Help
Replies
1
Views
1K
• Introductory Physics Homework Help
Replies
97
Views
3K