0

I am searching for a simple way to use subequations, with numerical numbering, so I don't have (1a) (1b) like in the example below etc. I simply want (1) (2) etc

Thanks for the help

\documentclass{article}
\usepackage{amsmath}
\newcommand\StepSubequations{
  \stepcounter{parentequation}
  \gdef\theparentequation{\arabic{parentequation}}
  \setcounter{equation}{0}
}
\begin{document}
\begin{subequations}
\begin{alignat}{2}
a&=b(x) \quad &\text{for} t<t_1  \label{eq:subeq1}\\
\StepSubequations
a&=c(x)  \quad &\text{for} t\geq t_1 \label{eq:subeq2}
\end{alignat}
\label{straincomponent}
\end{subequations}

\end{document}
  • Welcome to TeX SX! If that's what you want, don't use the subequations environment and everything will go fine. – Bernard Sep 4 '19 at 12:54
  • what would be the best option for equations with double alignment? – user195812 Sep 4 '19 at 13:00
  • The second column is , so to say, a comment. What do you mean with ‘option’? – Bernard Sep 4 '19 at 13:05
  • its a definition fwhich environment should i use? The function is defined by several sections – user195812 Sep 4 '19 at 13:23
1

You can have this, based on empheq(which loads mathtools) but you'll lose the possibility to refer to the definition as a whole:

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

\begin{empheq}[left={a=\empheqlbrace}]{alignat=2}
b(x) \quad &\text{for } t<t_1 \label{eq:subeq1}
\\
c(x) \quad &\text{for } t\geq t_1 \label{eq:subeq2}
\end{empheq}

\end{document} 

enter image description here

1

With use of the numcases environment from the cases package:

\documentclass{article}
\usepackage{amsmath}
\usepackage{cases}

\begin{document}

\begin{numcases}{a=}
  b(x) & for $t<t_1$        \label{eq:subeq1},\\
  c(x) & for $t\geq t_1$    \label{eq:subeq2}
\end{numcases}
From \eqref{eq:subeq1} folows \dots
\end{document} 

enter image description here

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.