3

I have, let's say, 5 of the equations spread throughout the document and I want them to be aligned similarly. The equation consist of two parts -- the formula itself and short descriptions (let's say boundaries). Obviously, there can be a lot of text (plus figures between) between any two equations. Can all the equations (and their parts) be aligned in the same way? This is an example:

\[
G=G_{I}=\begin{cases}
\cfrac{K_{I}^{2}}{E} & \text{plane stress}\\
\cfrac{(1-\nu^{2})K_{I}^{2}}{E} & \text{plane strain}
\end{cases}
\]

img

One equations with two lines, short comment about them, the part on the right aligned in the same way. However, I can't find a solution to align these throughtout the document (i.e., in multiple equations). It should look something like this

img

but the boundaries in this case are misaligned and the & operator can't be used. Is there a feature I'm missing or a workaround?

1 Answers1

3
\documentclass{article}

\usepackage{amsmath}

\begin{document}

\noindent Something\dots
\begin{alignat*}{2}
  K_{C} &= \sqrt{EG_{c}} &\qquad &\text{(plane stress)}\\
  \intertext{further description of the equation}
  K_{c} &= \sqrt{\frac{EG_{c}}{1-\nu^{2}}} &&\text{(plane strain)}
\end{alignat*}
Something\dots

\end{document}

output

  • That´s basically what I want but when used for multiple single-line formulas it does this link

    and I would really like the two notes next to equations to be aligned.

    – Birimaratoa Dec 11 '14 at 13:53
  • @VáclavŠefl See updated answer. – Svend Tveskæg Dec 11 '14 at 13:58
  • On the other hand - this is not very practical if the "further description of the equeations" should be a longer text, possibly including figures. If it is treated as intertext I´d lose a whole bunch of formatting capabilities, is that right?

    So to rephrase my original question - I have, let´s say 5 of the equations shown above, spread throughout the document and I want them to be aligned similarly. (like each of those above). Can this be done without them being in the same group?

    – Birimaratoa Dec 11 '14 at 14:18
  • @VáclavŠefl -- you've just expressed an important criterion in your comment. it would be much more visible added to the question; you should be able to edit the question to include it. – barbara beeton Dec 11 '14 at 14:21
  • @VáclavŠefl Next time, please include the entire question the first time you post it! (Now you've asked for something additional twice...) – Svend Tveskæg Dec 11 '14 at 14:30
  • Sorry, Im a newbie around here... – Birimaratoa Dec 11 '14 at 14:38
  • @VáclavŠefl I don't think you can align equations in different groups. Maybe someone with (far) more LaTeX knowledge can elaborate on this. – Svend Tveskæg Dec 11 '14 at 14:39
  • What I tend to do in these cases is to write a custom table header with fixed widths and reuse that through the document, then the lining up is consistent (but obviously less flexible). – Thruston Dec 11 '14 at 15:29
  • @Thruston That was my thought, too, but if the equations are spread throughout the document, how would you then go about doing it? – Svend Tveskæg Dec 11 '14 at 16:50
  • @SvendTveskæg either just copy the halign headers (if I know I'm not going to change it) or define a one-shot macro for them. – Thruston Dec 11 '14 at 20:58
  • @VáclavŠefl If formulas are far away from each other, keeping the alignment has no purpose. It might even look quite odd. – egreg Dec 13 '14 at 12:52
  • @egreg "far" is pretty relative in this case, two equations could be separated by a page or just 1-2 lines of text... – Birimaratoa Dec 15 '14 at 08:31
  • @VáclavŠefl Don't try preserving alignment then. – egreg Dec 15 '14 at 08:48