Bug LaTeX: newline after closing $$

  • Thread starter kiuhnm
  • Start date
  • Tags
    latex
64
1
The support for ##\LaTeX## is great, but there's just one thing I don't like: if I put a newline after the closing \$$ I get too much vertical space after the rendered part. For instance:
$$(x_1+\ldots+x_p)^n = \sum_{c_1+\ldots+c_p=n} \frac{n!}{c_1!\cdots c_p!}x_1^{c_1}\cdots x_p^{c_p}$$
As you can see, there's a space right above this line.
I think the correct thing to do would be to remove all the superfluous newlines before the opening and after the closing \$$.
Things are even worse if I want to separate ##\LaTeX## formulas from the rest of the text in the source code:

$$(x_1+\ldots+x_p)^n = \sum_{c_1+\ldots+c_p=n} \frac{n!}{c_1!\cdots c_p!}x_1^{c_1}\cdots x_p^{c_p}$$

Now I also have a space before the rendered formula.
 

fresh_42

Mentor
Insights Author
2018 Award
11,438
7,868
This is possibly because we do not use LaTeX but MathJax. Just don't insert extra empty lines! In any case the library we use is ready made, so that we have no influence on the source code.
 
64
1
This is possibly because we do not use LaTeX but MathJax. Just don't insert extra empty lines! In any case the library we use is ready made, so that we have no influence on the source code.
I insert empty lines because it makes it easier for me to write and especially edit parts of my posts before posting them. Well, I'll live with that. I just wanted to make sure you were aware of this issue. Could you tell me the name of the library?
 

fresh_42

Mentor
Insights Author
2018 Award
11,438
7,868
I insert empty lines because it makes it easier for me to write and especially edit parts of my posts before posting them. Well, I'll live with that. I just wanted to make sure you were aware of this issue. Could you tell me the name of the library?
I do it this way:

<text>
$$
<formula>
$$ <text>

which doesn't produce extra lines and is equally easy to edit and read.

One line test for comparison:
<text>$$<formula>$$<text>
 

Want to reply to this thread?

"LaTeX: newline after closing $$" You must log in or register to reply here.

Related Threads for: LaTeX: newline after closing $$

  • Posted
Replies
1
Views
975
  • Posted
Replies
4
Views
2K
  • Posted
Replies
4
Views
12K
  • Posted
Replies
6
Views
2K
  • Posted
Replies
2
Views
3K
  • Posted
Replies
2
Views
8K
  • Posted
Replies
10
Views
3K
  • Posted
Replies
17
Views
9K

Physics Forums Values

We Value Quality
• Topics based on mainstream science
• Proper English grammar and spelling
We Value Civility
• Positive and compassionate attitudes
• Patience while debating
We Value Productivity
• Disciplined to remain on-topic
• Recognition of own weaknesses
• Solo and co-op problem solving

Hot Threads

Top