Align Multiple Points: A LaTeX Problem

In summary, the problem is that the equation does not align properly when using alignat. In addition, Fantom can be used to achieve the desired alignment.
  • #1
ATY
34
1
So, I got the following problem: I want to write my equation the way you can see it in the picture:
ZaOE1.png


I am actually running this:

\ begin{align}
\begin{split}
...
\ end{split}
\ end{align}

My problem is, that I can not set multiple align points. I need one point to attach the first 4 lines to the left side (because due to split they would otherwise go to the ride side), but the lines 5-8 look like they got aligned to the "+" from the first line.
How do I do this ? I hope that somebody can answer my question.
 
Physics news on Phys.org
  • #3
ok, I tried it, but I got the following problem:
1. if I add a "&" at the beginning of every column to align the first 4 columns to the left side and additionally add an "&" before the "+" in the first column the program divides(?), because it thinks that I want to create a table.
38316_1.png


2. if I do not use the "&" before at the beginning of the first 4 columns, I manage to align the lines 5-8 properly, but the first columns are suddenly alligned to the right side of my paper.

38316_2.png
 
  • #4
Sorry, that was a bad idea.

Thinking about it some more, try using fantom:
Code:
\begin{align*}
& + \frac{(\Delta t^4)}{6} [ (\frac{b}{8} + \frac{c}{8} + d)  \\
& \hphantom{{} + \frac{(\Delta t^4)}{6} [} (\frac{3c}{8} + \frac{3d}{4})
\end{align*}

$$
\begin{align*}

& + \frac{(\Delta t^4)}{6} [ (\frac{b}{8} + \frac{c}{8} + d) \\

& \hphantom{{} + \frac{(\Delta t^4)}{6} [} (\frac{3c}{8} + \frac{3d}{4})

\end{align*}
$$
 
  • Like
Likes ATY
  • #5
this works fantastically :D
Thank you so much :)
 
  • #6
You can also use the IEEEeqnarray environment for this sort of thing (install the IEEEtrantools package and load with \usepackage[retainorgcmds]{IEEEtrantools}). There's a nice explanation at http://moser-isi.ethz.ch/docs/typeset_equations.pdf.

Code:
\begin{IEEEeqnarray*}{rCll}
  y^{n + 1} &=& \IEEEeqnarraymulticol{2}{l}{
    y^{n} + \Delta t \bigl[ (a + b + c + d) (f)_{t = t^{n}} \bigr]} \\
  && \IEEEeqnarraymulticol{2}{l}{+\> \dotsb} \\
  && +\> \frac{(\Delta t)^{4}}{6} \Biggl[ &
    \biggl( \frac{b}{8} + \frac{c}{8} + d \biggr)
    \biggl( \frac{\partial^{3} f}{\partial t^{3}}
      + 3 f \frac{\partial^{3} f}{\partial t^{2} \partial y}
      + 3 f^{2} \frac{\partial^{3} f}{\partial t \partial y^{2}}
      + f^{3} \frac{\partial^{3} f}{\partial y^{3}} \biggr)_{t = t^{n}} \\
    &&& +\> \biggl( \frac{3c}{8} + \frac{3d}{4} \biggr)
    \biggl( \frac{\partial^{2} f}{\partial t^{2}}
      + 2 f \frac{\partial^{2} f}{\partial t \partial y}
      + f^{2} \frac{\partial^{2} f}{\partial y^{2}} \biggr)_{t = t^{n}}
    \biggl( \frac{\partial f}{\partial y} \biggr)_{t = t^{n}} \\
    &&& +\> \dotsb \\
    &&& +\> \biggl( \frac{3c}{4} + 3d \biggr)
    \biggl( \frac{\partial f}{\partial t}
      + f \frac{\partial f}{\partial y} \biggr)_{t = t^{n}}
    \biggl( \frac{\partial^{2} f}{\partial t \partial y} \biggr)_{t = t^{n}}
  \Biggr] \\
  && \IEEEeqnarraymulticol{2}{l}{+\> \dotsb} \\
  && \IEEEeqnarraymulticol{2}{l}{
    +\> \mathcal{O} \bigl( (\Delta t)^{6} f^{(5)} \bigr) \,.} \IEEEyesnumber
\end{IEEEeqnarray*}

Produces this:

pr1-1.png
 
Last edited:
  • Like
Likes DrClaude

What is "Align Multiple Points: A LaTeX Problem"?

"Align Multiple Points: A LaTeX Problem" is a common issue that arises when trying to align multiple points or equations in LaTeX, a typesetting language commonly used in scientific and academic writing.

Why is aligning multiple points in LaTeX important?

In scientific and academic writing, it is important to present information in a clear and organized manner. Aligning multiple points or equations can help to improve the readability and understanding of the content.

What are some common approaches to solving this problem?

One common approach is to use the "align" environment in LaTeX, which allows for multiple equations or points to be aligned in a specific way. Another approach is to use the "array" environment, which allows for more customization in terms of alignment and spacing.

Are there any packages or tools available to help with aligning multiple points in LaTeX?

Yes, there are several packages available such as "amsmath" and "mathtools" that provide additional features for aligning multiple points or equations in LaTeX. Additionally, there are online tools and tutorials that can assist with aligning points in LaTeX.

What are some tips for effectively aligning multiple points in LaTeX?

Some tips for effectively aligning multiple points in LaTeX include using the "&" symbol to indicate where the alignment should occur, using the "\\" command to start a new line, and using the alignment characters like "=" and "<" to specify the type of alignment desired.

Similar threads

  • MATLAB, Maple, Mathematica, LaTeX
Replies
2
Views
3K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
1
Views
2K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
9
Views
3K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
6
Views
2K
  • Mechanical Engineering
Replies
20
Views
2K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
1
Views
1K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
1
Views
946
  • MATLAB, Maple, Mathematica, LaTeX
Replies
1
Views
1K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
2
Views
3K
Replies
1
Views
790
Back
Top