Simple LaTeX question, line-spacing equations

  • LaTeX
  • Thread starter binbagsss
  • Start date
  • Tags
    Latex
In summary, the conversation discusses ways to stop labeling equations in LaTeX, such as using the * symbol in align or using flalign or minipage to align equations to the left or right. It is also possible to add a command to the LaTeX document to make it easier to stop labeling equations.
  • #1
binbagsss
1,307
11
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
  • #2
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*}
 
  • #3
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?
 
  • #4
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}
 
  • #5
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\\.
 

FAQ: Simple LaTeX question, line-spacing equations

What is LaTeX?

LaTeX is a document preparation system that allows users to create high-quality documents with a professional layout and formatting. It is commonly used in academic and scientific fields for writing research papers, reports, and presentations.

What is the purpose of line-spacing in equations?

Line-spacing in equations is used to improve the readability and clarity of mathematical expressions. It allows for better differentiation between different parts of an equation and helps to reduce visual clutter.

How do I change the line-spacing in equations?

To change the line-spacing in equations, you can use the "\linespread" command followed by a number. The default value is 1, and increasing the number will increase the line-spacing. For example, "\linespread{1.5}" will set the line-spacing to 1.5 times the default value.

Can I change the line-spacing in equations for a specific part of my document?

Yes, you can change the line-spacing in equations for a specific part of your document by using the "\begin{spacing}" and "\end{spacing}" commands. This allows you to have different line-spacing in different sections of your document.

How can I adjust the line-spacing in equations to make them fit on one line?

If an equation is too long and does not fit on one line, you can use the "\resizebox" command to automatically adjust the size of the equation to fit the line. However, it is recommended to rewrite the equation to make it more readable rather than changing the line-spacing.

Similar threads

Replies
2
Views
759
Replies
1
Views
2K
Replies
3
Views
458
Replies
11
Views
6K
Replies
4
Views
2K
Replies
3
Views
881
Replies
6
Views
2K
Replies
5
Views
4K
Back
Top