# Equation sublabeling

Code:

%\documentclass[12 pt,handout,notheorems]{beamer}
\documentclass[12 pt,handout,notheorems, serif]{beamer}
%\documentclass[12 pt]{article}
\usepackage{pgfpages}
\pgfpagesuselayout{resize to}[a4paper,landscape]
\usefonttheme{professionalfonts} %To get the accents aligned correctly, albeit in Computer Modern Roman
\usepackage{cancel}
\usepackage{amsmath}
\usepackage{mleftright}
\mleftright
\begin{document}
\setcounter{equation}{14}
$$F = ma$$
$$\delta\left(t\right)= \begin{cases} \infty & t = 0,\\ 0 & t \neq 0. \end{cases}$$
$$u\left(t\right)= \begin{cases} 1 & t \geq 0,\\ 0 & t < 0. \end{cases}$$
$$v = \omega r$$
\end{document}


Output:

Is there a way to relabel equation 16 as 16a and 16b for the top and bottom equations in cases, as well as 17 to 17a and 17b?

With subnumcases defined in the cases package:

\documentclass[12 pt,handout,notheorems, serif]{beamer}
\usefonttheme{professionalfonts}

\usepackage{cases}
\usepackage{amsmath}

\begin{document}
\setcounter{equation}{14}
\begin{frame}
$$F = ma$$
\begin{subnumcases}{\delta(t) = }
\infty  & $t = 0$,    \\
0  & $t \neq 0$.
\end{subnumcases}
\begin{subnumcases}{u(t)=}
1   & $t \geq 0$,   \\
0   & $t < 0$.
\end{subnumcases}
$$v = \omega r$$
\end{frame}
\end{document}


This is a trick I learned from this nice answer by the author of the witharrows package, which has a lot of hidden gems I did not appreciate enough before.

The point is that you can use witharrows even without arrows.

\documentclass[12 pt,handout,notheorems, serif]{beamer}
%\documentclass[12 pt]{article}
\usepackage{pgfpages}
\pgfpagesuselayout{resize to}[a4paper,landscape]
\usefonttheme{professionalfonts} %To get the accents aligned correctly, albeit in Computer Modern Roman
\usepackage{cancel}
\usepackage{amsmath}
\usepackage{mleftright}
\usepackage{witharrows}
\renewcommand{\left}{\mleft}%<- seriously?
\renewcommand{\right}{\mright}%<- seriously?
\begin{document}
\setcounter{equation}{14}
$$F = ma$$
\begin{subequations}
\begin{DispWithArrows}< \delta\left(t\right)= >
\end{DispWithArrows}
\end{subequations}
\begin{subequations}
\begin{DispWithArrows}< u\left(t\right)= >
\end{DispWithArrows}
\end{subequations}
$$v = \omega r$$
\end{document}


Or with left aligned columns and \mleftright as suggested by Mico.

\documentclass[12 pt,handout,notheorems, serif]{beamer}
%\documentclass[12 pt]{article}
\usepackage{pgfpages}
\pgfpagesuselayout{resize to}[a4paper,landscape]
\usefonttheme{professionalfonts} %To get the accents aligned correctly, albeit in Computer Modern Roman
\usepackage{cancel}
\usepackage{amsmath}
\usepackage{mleftright}
\usepackage{witharrows}
\mleftright
% \renewcommand{\left}{\mleft}%<- seriously?
% \renewcommand{\right}{\mright}%<- seriously?
\begin{document}
\setcounter{equation}{14}
$$F = ma$$
\begin{subequations}
\begin{DispWithArrows}< \delta\left(t\right)= >
\pgfmathsetmacro{\myw}{width("$\infty$")}\makebox[\myw pt][l]{$0$}\;,\quad & t \neq 0\;.
\end{DispWithArrows}
\end{subequations}
\begin{subequations}
\begin{DispWithArrows}< u\left(t\right)= >
\end{DispWithArrows}
\end{subequations}
$$v = \omega r$$
\end{document}


• Hmmm what does < \delta\left(t\right)= > do? – Superman May 13 '20 at 3:42
• @Superman As far as I understand this the stuff between < and > will be left of the brace. – user194703 May 13 '20 at 3:43

Just for the sake of variety, here's a solution which uses the cases package and its subnumcases environment.

\documentclass[12pt,handout,notheorems, serif]{beamer}
\usefonttheme{professionalfonts}
\usepackage{pgfpages}
\pgfpagesuselayout{resize to}[a4paper,landscape]
\usepackage{cases} % for 'subnumcases' environment
% 'amsmath' is loaded automatically by 'beamer' class
\begin{document}
\setcounter{equation}{14}
\begin{frame}
$$F = ma$$
\begin{subnumcases}{\delta(t)=}
\infty & $t = 0$,\\
0      & $t \neq 0$.
\end{subnumcases}
\begin{subnumcases}{u(t)=}
1 & $t \geq 0$,\\
0 & $t < 0$.
\end{subnumcases}
$$v = \omega r$$
\end{frame}
\end{document}

• All three are pretty good answers! Thank you so much @all – Superman May 13 '20 at 6:23
• @Superman - Please "accept" Zarko's answer -- he posted his solution a few minutes before I posted mine. – Mico May 13 '20 at 6:26