Simple LaTeX question, line-spacing equations

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

Discussion Overview

The discussion revolves around formatting equations in LaTeX, specifically focusing on line-spacing and alignment without labeling equations. Participants explore various methods to achieve desired formatting outcomes.

Discussion Character

  • Technical explanation
  • Conceptual clarification
  • Debate/contested

Main Points Raised

  • One participant suggests using the align environment for equations but notes the issue of unwanted labeling.
  • Another participant proposes using the align* environment or equation* to avoid labeling.
  • A different participant asks about aligning equations to the left or right instead of centering them.
  • One suggestion involves using the flalign environment with & to align equations to the left.
  • Another approach mentioned is using minipage to place equations side by side on the left and right.
  • A participant discusses the possibility of numbering only the last line of equations by using \nonumber and suggests creating a new command to simplify this process.

Areas of Agreement / Disagreement

Participants present multiple methods for formatting equations, indicating that there is no single agreed-upon solution. Different preferences for alignment and labeling exist, and the discussion remains unresolved regarding the best approach.

Contextual Notes

Some methods depend on specific LaTeX environments and may have limitations based on the desired formatting outcomes. The discussion does not clarify the implications of using certain commands or environments in different contexts.

binbagsss
Messages
1,291
Reaction score
12
So the only way I know is

\ begin{align}
f &= ma\\
E &= mc^2\\
\ pi &\ text{ is exactly three!}
\ end{align},

But this labels them, and I don't want them labelled...Any assistance really appreciated, thank you !
 
Physics news on Phys.org
To stop the (1.2) and so on labeling, simply add the * symbol.
\ begin{align*}
yourformula
\ end{align*}
Rather than align, you can also use {equation*}
 
Totally said:
To stop the (1.2) and so on labeling, simply add the * symbol.
\ begin{align*}
\ end{align*}
thank you so much , and is there anyway to quickly align it to the left or right rather than the centre?
 
Well, you could use & to push everything to the left in flalign.
\ begin{flalign*}
a &= bcdef & \\
&= ghij + klmn
\ end{flalign*}

Or if you want two formulas in single line on left and right, you could use minipage

\ begin{minipage}{0.5\linewidth}
\ begin{equation*}
Q=\frac{W}{\eta}=\frac{P\frac{d}{v}}{\eta}
\ end{equation*}
\ end{minipage} \hspace{0.5cm}
\ begin{minipage}{0.5\linewidth}
\ begin{equation*}
m=\frac{Q}{e}=\frac{Pd}{v\eta e}
\ end{equation*}
\ end{minipage} \hspace{0.5cm}
 
Sometimes you will probably want the last line to be numbered. Then you can remove the * (i.e. use align rather than align*) and end each line with \nonumber\\ instead of just \\. It gets annoying to type that every time, so you also consider adding something like "\newcommand{\nn}{\nonumber}" to the start of your LaTeX document. Now you can end each line with \nn\\.
 

Similar threads

  • · Replies 2 ·
Replies
2
Views
6K
  • · Replies 2 ·
Replies
2
Views
3K
  • · Replies 9 ·
Replies
9
Views
6K
  • · Replies 1 ·
Replies
1
Views
3K
  • · Replies 3 ·
Replies
3
Views
3K
  • · Replies 11 ·
Replies
11
Views
9K
  • · Replies 4 ·
Replies
4
Views
3K
  • · Replies 3 ·
Replies
3
Views
2K
  • · Replies 5 ·
Replies
5
Views
7K
  • · Replies 6 ·
Replies
6
Views
3K