1

I wrote this code:

\documentclass{article}
\usepackage{amsmath}
\begin{document}

\begin{subequations}
\begin{align}
f(x) &= \cos x, \qquad h(x) = -x, \\
g(x) &= x, \qquad l(x) = \sin x.
\end{align}
\end{subequations}

\end{document}

I got this result:

What do I have to change for the equal signs in the right column to be also aligned (note that I want to conserve the labels as they are)?

2
  • In that post, the numeration of the equations is not mantained.
    – jmaguire
    Commented Sep 15, 2021 at 17:45
  • This answer tex.stackexchange.com/a/590213 has a helpful diagram. When used with align (no *) that should give you what you want. Commented Sep 15, 2021 at 18:51

1 Answer 1

2

This is typically done in an align with the introduction of additional &'s:

enter image description here

\documentclass{article}

\usepackage{amsmath}

\begin{document}

\begin{subequations}
\begin{align}
  f(x) &= \cos x, & h(x) &= -x,     \\
  g(x) &= x,      & l(x) &= \sin x.
\end{align}
\end{subequations}

\end{document}

The equations are spread horizontally automatically. You can have multiple such constructions on a single line.

Not the answer you're looking for? Browse other questions tagged .