How do I properly use LaTeX syntax for multiple lines and spacing in my post?

  • Context: LaTeX 
  • Thread starter Thread starter zyrolasting
  • Start date Start date
  • Tags Tags
    Latex
Click For Summary

Discussion Overview

The discussion centers around the proper use of LaTeX syntax for formatting multiple lines and spacing in posts on the Physics Forums. Participants explore issues related to LaTeX rendering, particularly in the context of the forum's specific configurations and limitations.

Discussion Character

  • Technical explanation
  • Debate/contested

Main Points Raised

  • One participant expresses difficulty with LaTeX syntax, noting that attempts to use commands like \\ and \\[10] for new lines and spacing do not work in post previews, despite functioning in external LaTeX editors.
  • Another participant mentions a bug affecting image previews, suggesting a workaround of refreshing and resending after each preview.
  • A participant questions whether commands like \newline, \linebreak, and \\ are supposed to work, indicating that they do not appear to function as expected in the forum.
  • One participant asserts that the issue is a server problem rather than a browser issue, explaining that LaTeX is rendered as an image and should appear consistently across browsers.
  • A suggestion is made to use multiline AMS environments, such as align* or gather, for proper formatting of equations.

Areas of Agreement / Disagreement

Participants express differing views on the functionality of LaTeX commands within the forum, with some suggesting that certain commands should work while others indicate they do not. The discussion remains unresolved regarding the effectiveness of specific LaTeX syntax in the forum context.

Contextual Notes

Limitations include potential server-side issues affecting LaTeX rendering and the possibility of browser compatibility problems. Specific commands and environments for LaTeX formatting are discussed, but their effectiveness remains uncertain.

zyrolasting
Hello. I'm new to both PF and LaTeX. I searched the board on this, but could not see a thread that solves my problem.

I have several tex tags to use, but it looks like there can only be so many before the board gives off a database error. After combining the content of tex tags, the text got mushed together.

After some searching, I used both \\ and \\[10] to try and add some new lines and spacing. Neither had any effect on my post previews. (Although they DID work on an online LaTeX editor)

What am I doing wrong?

Many thanks.

EDIT: Found that \newline and \linebreak also do NOT work.
 
Last edited by a moderator:
Physics news on Phys.org
There's a bug that makes the wrong image show up in previews. (There are lots of threads about it). The workaround is to refresh and resend after each preview.
 
Oh, I actually knew about that from looking through the board, and have successfully updated my previews before. However, newlines are still not included.

Are \newline, \linebreak and \\ supposed to work, or is there something configured so that I need to use something else?

The below code uses all three. At the time of this writing, I am obviously looking at a preview. Even after refreshing, none of them work.

EDIT: Even the forum view doesn't help. Incompatibility with Chrome? Do you guys see the line break?

V = n<br /> \\[10]<br /> \newline<br /> \linebreak<br /> V = 23
 
Nope. And this is definitely a server issue, not a browser problem. Since the LaTeX is rendered as an image, it has to appear the same in all browsers.

You can use the multiline AMS environments, like so:
Code:
\begin{align*}V&=n \\ V&=23\end{align*}
\begin{align*}V&amp;=n \\ V&amp;=23\end{align*}
There's also the gather environment, if you don't require specific alignment between the equations, and some others.
 
Thank you very much, diazona. I appreciate your help!
 

Similar threads

  • · Replies 12 ·
Replies
12
Views
4K
  • · Replies 3 ·
Replies
3
Views
3K
  • · Replies 4 ·
Replies
4
Views
4K
  • · Replies 5 ·
Replies
5
Views
2K
  • · Replies 5 ·
Replies
5
Views
3K
  • · Replies 20 ·
Replies
20
Views
3K
  • · Replies 7 ·
Replies
7
Views
4K
  • · Replies 10 ·
Replies
10
Views
4K
  • · Replies 4 ·
Replies
4
Views
1K
  • · Replies 3 ·
Replies
3
Views
2K