对齐环境中每个子方程中的下支撑

对齐环境中每个子方程中的下支撑

我有

\usepackage{romannum}
\usepackage{amsmath}
\usepackage{mathtools}  

怎么可能写在此处输入图片描述

使用

\begin{subequations}
\begin{align}
...
\end{align}
\end{subequations}

代码如下所示:

\documentclass{article}
\usepackage{romannum}
\usepackage[english]{babel}
\usepackage[utf8]{inputenc}
\usepackage{fancyhdr}
\usepackage{geometry}
\geometry{legalpaper, portrait, margin=1.3in}
\usepackage{anyfontsize}
\usepackage{svg}
\usepackage{t1enc}
\pagestyle{fancy}
\fancyhf{}
\usepackage{amsmath}
\lhead{Small time solution from (15a,b)}
\rfoot{Page \thepage}
\usepackage[titletoc,toc]{appendix}
\usepackage{graphicx,amssymb,amstext}
\usepackage{graphicx}
%\usepackage[]{mcode}
\usepackage{xcolor}
\usepackage{titlesec}
\usepackage{hyperref}
\usepackage{xcolor}
\usepackage{cleveref}
\usepackage{nameref}
\usepackage{cite}
\usepackage{enumerate}
\usepackage{amssymb}     
\usepackage{mathtools}               %  new commands %
\newcommand \bprime {\backprime\hspace{-.11em}      }   %  backstroke
\newcommand \xprime {\prime\hspace{-.25em}\backprime}   %  cross
\showoutput
\showboxdepth3

\titleformat{\section}
  {\normalfont\Large\bfseries}   % The style of the section title
  {}                             % a prefix
  {0pt}                          % How much space exists between the prefix and the title
  {Section \thesection:\quad}    % How the section is represented
% Starred variant
\titleformat{name=\section,numberless}
  {\normalfont\Large\bfseries}
  {}
  {0pt}
  {}
\begin{document}
\begin{subequations}
\begin{align}
h^{''}  = \frac{1}{2}  -  \underbrace{\frac{\Big(h(T) + (1-b) \theta (T) \Big)^2}{4 A \sqrt{A \kappa}}}_\text{\Romannum{1}} \Big\{ \underbrace{\frac{(1 - C) \sqrt{\frac{\kappa}{A}}}{(1+(1-C)^2 \frac{\kappa}{A})}}_\text{\Romannum{2}}+ \underbrace{ \frac{C \sqrt{\frac{\kappa}{A}}}{(1+ C^2 \frac{\kappa}{A})}}_\text{\Romannum{3}}  + \underbrace{ \arctan \Big(\frac{\sqrt{\frac{\kappa}{A}}}{1 - C (1-C) \frac{\kappa}{A}}\Big)}_\text{\Romannum{4}} \Big\}  - M \hat g, 
\\
\Gamma \theta^{''} = \frac{1}{2} \bigg( \frac{1}{2} - b   - \underbrace{\Big(h(T) + (1-b) \theta (T) \Big)^2}_\text{\Romannum{5}}  \bigg\{ -\frac{1}{2A \kappa} \bigg( \underbrace{\frac{1}{(1+ (1-C)^2 \frac{\kappa}{A})}}_\text{\Romannum{6}} - \underbrace{\frac{1}{(1+C^2 \frac{\kappa}{A})}}_\text{\Romannum{7}}\bigg) 
\\
+ \underbrace{ \frac{(C-b)}{2 A \sqrt{A\kappa}}}_\text{\Romannum{8}}  \Big\{ \underbrace{ \frac{(1 - C) \sqrt{\frac{\kappa}{A}}}{(1+(1-C)^2 \frac{\kappa}{A})}}_\text{\Romannum{9}} + \underbrace{ \frac{C \sqrt{\frac{\kappa}{A}}}{(1+ C^2 \frac{\kappa}{A})}}_\text{\Romannum{10}}  + \underbrace{ \arctan \Big(\frac{\sqrt{\frac{\kappa}{A}}}{1 - C (1-C) \frac{\kappa}{A}}\Big) }_\text{\Romannum{11}}\Big\} \bigg\} \bigg) .
\end{align}
\end{subequations}
\\
\end{document}

答案1

引入了新命令\romanbrace

在此处输入图片描述

\documentclass{article}

\usepackage{amsmath}
\newcounter{fudge}
\renewcommand\thefudge{\textnormal{\Roman{fudge}}}
\newcommand{\ouch}{\refstepcounter{fudge}\thefudge}
\newcommand{\romanbrace}[1]{\underbrace{#1}_{\ouch}}
\begin{document}

\begin{subequations}
\begin{align}
 y&= t_hi_s + i_s + \romanbrace{c_r a_z y!} \\
 z&= \romanbrace{s_tu_pi_d}
\end{align}
\end{subequations}
\end{document}

答案2

一些建议

  • 尽可能消除视觉混乱。省略不需要的括号,保持各组括号的大小一致,并确保下括号的深度相同。(在下面的代码中,查找几个\vphantom语句。)选择换行符,使公式材料不会突出到边距中。

  • 不要多次加载任何给定的包。另外,不要以冗余的方式加载包:amstext包由包自动加载amsmath,包又由mathtools包自动加载。

  • =第 1 行和第 3 行的符号彼此对齐,并将第 2 行和第 4 行的材料缩进。

  • 使用专用计数器(romcount在下面的代码中调用)并将其外观设置为大写罗马字母。然后,设置一个宏(\romantag在下面的代码中调用)以增加并显示此计数器;在各个语句的第二个参数中使用此宏\underbrace

在此处输入图片描述

\documentclass{article}
\usepackage[english]{babel}
\usepackage[utf8]{inputenc}
\usepackage{fancyhdr}
\usepackage{geometry}
\geometry{legalpaper, portrait, margin=1.3in}
\usepackage{svg}
\usepackage{t1enc}
\pagestyle{fancy}
\fancyhf{}
\lhead{Small time solution from (15a,b)}
\rfoot{Page \thepage}

\usepackage[titletoc,toc]{appendix}
\usepackage{graphicx,amssymb}%%%,amstext}
%%%\usepackage{amsmath}
%%%\usepackage{graphicx}
%\usepackage[]{mcode}
\usepackage{xcolor}
\usepackage{titlesec}
%%%\usepackage{xcolor}
\usepackage{cite}
\usepackage{enumerate}
%%%\usepackage{amssymb}     
\usepackage{mathtools}  

\usepackage[colorlinks]{hyperref}
\usepackage[nameinlink,noabbrev]{cleveref}
\usepackage{nameref}

\titleformat{\section}
  {\normalfont\Large\bfseries}   % The style of the section title
  {}                             % a prefix
  {0pt}                          % How much space exists between the prefix and the title
  {Section \thesection:\quad}    % How the section is represented
% Starred variant
\titleformat{name=\section,numberless}
  {\normalfont\Large\bfseries}
  {}
  {0pt}
  {}

\newcounter{romcount}
\renewcommand\theromcount{\Roman{romcount}}
\newcommand\romantag{\stepcounter{romcount}\textnormal{\theromcount}}

\begin{document}
\begin{subequations}
\begin{align}
h''  &= \frac{1}{2}  - M \hat g  \notag\\
&\qquad-
\underbrace{\frac{\bigl(h(T) + (1-b) \theta (T) \bigr)^2}{4 A \sqrt{A \kappa}}}_{\romantag} \biggl\{ 
\underbrace{\frac{(1 - C) \sqrt{\frac{\kappa}{A}}}{1+(1-C)^2 \frac{\kappa}{A}}}_{\romantag}+ 
\underbrace{ \frac{C \sqrt{\frac{\kappa}{A}}}{1+ C^2 \frac{\kappa}{A}}}_{\romantag}  + 
\underbrace{ \arctan \frac{\sqrt{\frac{\kappa}{A}}}{1 - C (1-C) \frac{\kappa}{A}}}_{\romantag} \biggr\} \,, \label{eq:first}\\
\Gamma \theta'' &= 
\frac{1}{2} \bigg[ \frac{1}{2} - b   - 
\underbrace{\bigl(h(T) + (1-b) \theta (T) \vphantom{\frac{1}{\frac{\kappa}{A}}}\bigr)^2}_{\romantag}  
\biggl\{ -\frac{1}{2A \kappa} \bigg( 
\underbrace{\frac{1}{1+ (1-C)^2 \frac{\kappa}{A}}}_{\romantag} - 
\underbrace{\frac{1}{1+C^2 \frac{\kappa}{A}}}_{\romantag}\bigg)  \notag \\
&\qquad+ 
\underbrace{ \frac{C-b}{2 A \sqrt{A\kappa}}\vphantom{\frac{1}{\frac{\kappa}{A}}}}_{\romantag}  \biggl( 
\underbrace{ \frac{(1 - C) \sqrt{\frac{\kappa}{A}}}{1+(1-C)^2 \frac{\kappa}{A}}}_{\romantag} + 
\underbrace{ \frac{C \sqrt{\frac{\kappa}{A}}}{1+ C^2 \frac{\kappa}{A}}}_{\romantag}  + 
\underbrace{ \arctan \frac{\sqrt{\frac{\kappa}{A}}}{1 - C (1-C) \frac{\kappa}{A}} }_{\romantag}
\biggr) \biggr\} \bigg] \,. \label{eq:second}
\end{align}
\end{subequations}

\end{document}

相关内容