代码:
%\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}
\usepackage{bm}
\mleftright
\begin{document}
\setcounter{equation}{14}
\begin{equation}
\frac{d}{dt}\left(\mathcal{H}_u\right) = 0 = \frac{\partial \mathcal{H}_u}{\partial t} + \left(\frac{\partial \mathcal{H}_u}{\partial \mathbf{x}}\right)^{\textrm{T}}\underbrace{\dot{\mathbf{x}}}_{\mathcal{H}_\bm{\lambda}} + \left(\frac{\partial \mathcal{H}_u}{\partial \bm{\lambda}}\right)^{\textrm{T}}\dot{\bm{\lambda}} + \cancelto{0}{\frac{\partial \mathcal{H}_u}{\partial u}}\dot{u}
\end{equation}
\end{document}
虽然上面的代码看起来正确,但输出如下:
虽然括号放置正确,但输出结果不正确;表达式的后半部分\mathcal{H}_\bm{\lambda}
没有放在 中underbrace
(我只想\mathcal{H}_\bm{\lambda}
放在 下),而是写在 下。可能是什么问题?underbrace
underbrace
答案1
\mathcal{H}_\bm{\lambda}
需要去\mathcal{H}_{\bm{\lambda}}
(我跳过了一些包)
\documentclass{article}
\usepackage[fleqn]{amsmath}
\usepackage{bm}
\usepackage{cancel}
\newcommand{\diff}{\mathop{}\!\mathrm{d}}
\begin{document}
\setcounter{equation}{14}
\begin{equation}
\frac{\diff}{\diff t}\left(\mathcal{H}_u\right) = 0 =
\frac{\partial \mathcal{H}_u}{\partial t} +
\left(\frac{\partial \mathcal{H}_u}{\partial \mathbf{x}}\right)^{\textrm{T}}
\underbrace{\dot{\mathbf{x}}}_{\mathcal{H}_{\bm{\lambda}}}
+ \left(\frac{\partial \mathcal{H}_u}{\partial
\bm{\lambda}}\right)^{\textrm{T}}\dot{\bm{\lambda}}
+ \cancelto{0}{\frac{\partial \mathcal{H}_u}{\partial u}}\dot{u}
\end{equation}
\end{document}
我不确定底纹是否漂亮,但是没有错误。