代码:
%\documentclass[12 pt,handout,notheorems]{beamer}
\documentclass[12 pt,handout,notheorems, serif]{beamer}
%\documentclass[12 pt]{article}
\usepackage{pgfpages}
\pgfpagesuselayout{resize to}[a4paper,landscape]
\usetheme{Boadilla}
\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}
\begin{equation}
F = ma
\end{equation}
\begin{equation}
\delta\left(t\right)=
\begin{cases}
\infty & t = 0,\\
0 & t \neq 0.
\end{cases}
\end{equation}
\begin{equation}
u\left(t\right)=
\begin{cases}
1 & t \geq 0,\\
0 & t < 0.
\end{cases}
\end{equation}
\begin{equation}
v = \omega r
\end{equation}
\end{document}
有没有办法将公式 16 重新标记为 中顶部和底部公式 16a 和 16b cases
,以及将公式 17 重新标记为 17a 和 17b?
答案1
subnumcases
在包中定义cases
:
\documentclass[12 pt,handout,notheorems, serif]{beamer}
\usetheme{Boadilla}
\usefonttheme{professionalfonts}
\usepackage{cases}
\usepackage{amsmath}
\begin{document}
\setcounter{equation}{14}
\begin{frame}
\begin{equation}
F = ma
\end{equation}
\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}
\begin{equation}
v = \omega r
\end{equation}
\end{frame}
\end{document}
答案2
这是我从中学到的一个技巧这个很好的答案由该软件包的作者编写witharrows
,其中有很多我之前没有充分意识到的隐藏宝石。
重点是witharrows
即使没有箭也可以使用。
\documentclass[12 pt,handout,notheorems, serif]{beamer}
%\documentclass[12 pt]{article}
\usepackage{pgfpages}
\pgfpagesuselayout{resize to}[a4paper,landscape]
\usetheme{Boadilla}
\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}
\begin{equation}
F = ma
\end{equation}
\begin{subequations}
\begin{DispWithArrows}< \delta\left(t\right)= >
\infty\;,\quad & t = 0\;,\\
0\;,\quad & t \neq 0\;.
\end{DispWithArrows}
\end{subequations}
\begin{subequations}
\begin{DispWithArrows}< u\left(t\right)= >
1\;,\quad & t \geq 0\;,\\
0\;,\quad & t < 0\;.
\end{DispWithArrows}
\end{subequations}
\begin{equation}
v = \omega r
\end{equation}
\end{document}
或者使用左对齐的列并\mleftright
按照 Mico 的建议。
\documentclass[12 pt,handout,notheorems, serif]{beamer}
%\documentclass[12 pt]{article}
\usepackage{pgfpages}
\pgfpagesuselayout{resize to}[a4paper,landscape]
\usetheme{Boadilla}
\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}
\begin{equation}
F = ma
\end{equation}
\begin{subequations}
\begin{DispWithArrows}< \delta\left(t\right)= >
\infty\;,\quad & t = 0\;,\\
\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)= >
1\;,\quad & t \geq 0\;,\\
0\;,\quad & t < 0\;.
\end{DispWithArrows}
\end{subequations}
\begin{equation}
v = \omega r
\end{equation}
\end{document}
答案3
只是为了多样性,这里有一个使用该cases
包及其subnumcases
环境的解决方案。
\documentclass[12pt,handout,notheorems, serif]{beamer}
\usetheme{Boadilla}
\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}
\begin{equation}
F = ma
\end{equation}
\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}
\begin{equation}
v = \omega r
\end{equation}
\end{frame}
\end{document}