How do I format new lines in Latex?

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

Discussion Overview

The discussion revolves around formatting new lines in LaTeX, exploring various methods and experiences with line breaks. Participants share their approaches and challenges related to this formatting issue.

Discussion Character

  • Technical explanation
  • Debate/contested

Main Points Raised

  • One participant states that two backslashes "\\" should create a new line in LaTeX, as noted in their materials.
  • Another participant mentions that this method has not worked for them, suggesting the use of \mbox for line breaks instead.
  • A different participant claims that using an array environment allows the double backslash to function correctly for new lines.
  • One participant reiterates the initial claim about using double backslashes, noting it only works when writing to a TeX file intended for PDF or PS output.
  • A later reply indicates that they found a solution on the LaTeX examples page, using the align environment to achieve line breaks.

Areas of Agreement / Disagreement

Participants express differing experiences with the effectiveness of the double backslash for new lines, indicating that there is no consensus on a single method that works universally.

Contextual Notes

Some participants' claims depend on specific environments or contexts, such as using arrays or writing to TeX files, which may limit the applicability of their statements.

andrevdh
Messages
2,126
Reaction score
116
What is the formatters for beginning a new line in Latex? According to the notes two backshlashes "\\" should do the trick.
 
Physics news on Phys.org
Yes, but it's never worked for me either.
[tex]\mbox{I just}[/tex]
[tex]\mbox{do this.}[/tex]
 
It works if you put it in an array. Then a double back-slash gives a new line.

[tex] \begin{array}{l}<br /> x = y \\ <br /> a^2 = b^2 \\ <br /> \mathop {\lim }\limits_{\delta x \to 0} \frac{{\delta y}}{{\delta x}} \\ <br /> \end{array}[/tex]

Code:
\begin{array}{l}
 x = y \\ 
 a^2  = b^2  \\ 
 \mathop {\lim }\limits_{\delta x \to 0} \frac{{\delta y}}{{\delta x}} \\ 
 \end{array}
 
andrevdh said:
What is the formatters for beginning a new line in Latex? According to the notes two backshlashes "\\" should do the trick.
The only time that has worked for me is when I am actually writing to a TeX file (that will be made into a PS or PDF document).

Alex
 
Thank you,
I found the answer on the Latex examples page:
[tex]\begin{align*}Line\ one\\Line\ two\end{align*}[/tex]
 
Last edited:

Similar threads

  • · Replies 7 ·
Replies
7
Views
4K
  • · Replies 4 ·
Replies
4
Views
3K
  • · Replies 1 ·
Replies
1
Views
3K
  • · Replies 3 ·
Replies
3
Views
4K
  • · Replies 13 ·
Replies
13
Views
4K
Replies
5
Views
2K
  • · Replies 5 ·
Replies
5
Views
5K
  • · Replies 12 ·
Replies
12
Views
3K
  • · Replies 4 ·
Replies
4
Views
4K
  • · Replies 8 ·
Replies
8
Views
3K