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

  • Thread starter Thread starter zyrolasting
  • Start date Start date
  • Tags Tags
    Latex
AI Thread Summary
The discussion focuses on issues with using LaTeX syntax for multiple lines and spacing in forum posts. The user experiences problems with tex tags causing database errors and finds that common commands like \\ and \newline do not produce the desired line breaks in post previews. It is noted that the LaTeX rendering is consistent across browsers, indicating a server-side issue rather than a browser compatibility problem. A solution is suggested using multiline AMS environments, such as align* and gather, for proper formatting. The conversation highlights the need for specific LaTeX commands to achieve the desired layout in forum posts.
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
Views
3K
Replies
3
Views
2K
Replies
4
Views
4K
Replies
5
Views
2K
Replies
5
Views
3K
Replies
20
Views
3K
Replies
7
Views
3K
Replies
10
Views
4K
Replies
4
Views
1K
Replies
3
Views
2K
Back
Top