`\huge` 和 `\bm` 的组合如何起作用?

`\huge` 和 `\bm` 的组合如何起作用?

我最近发现了同时应用\huge和的一些奇怪行为\bm。特别是,根据加载的包,结果并不一致。

微波能量吸收 1: (已加载最少的软件包)

\documentclass{article}
\usepackage{mathtools}
\usepackage{bm}

\begin{document}
  $\Delta \qquad \bm{\Delta} \qquad {\Huge\bm{\Delta}}$

  $q \qquad \bm{q} \qquad {\Huge\bm{q}} $ 
\end{document}

结果 1

enter image description here

在这种情况下,\bm有效,但\huge没有影响。

微波辐射计 2:(已加载与我的特定项目相对应的软件包)

\documentclass{article}
\usepackage{amssymb}
\usepackage{amsthm}
\usepackage{mathtools}
\usepackage{newtxtext,newtxmath} % for times font
\usepackage[noadjust]{cite}
\usepackage[overload]{empheq} % for subnumbering in cases
\usepackage[framemethod=tikz]{mdframed}
\usepackage{bm}
\usepackage{algorithm}
\usepackage[a4paper, left = 1.5cm, right = 1.5cm, bottom = 1.5cm, top = 1.5cm]{geometry}
\usepackage{braket}
\usepackage[T1]{fontenc}
\usepackage[ansinew,utf8]{inputenc}

\begin{document}
  $\Delta \qquad \bm{\Delta} \qquad {\Huge\bm{\Delta}}$

  $q \qquad \bm{q} \qquad {\Huge\bm{q}} $ 
\end{document}

结果 2

enter image description here

这个就显得更加奇怪了,结果也有些出乎意料!

这些行为合理吗?

编辑

我有一个矩阵方程,每个矩阵都有一个\underbrace。矩阵的名称,例如\Deltaq,即将被放在那里。但是标签太小了,我需要把它们放大。最好的做法是什么?

  • scalebox
  • mathlarger
  • ...
\documentclass{article}
\usepackage{amssymb}
\usepackage{amsthm}
\usepackage{mathtools}
\usepackage{newtxtext,newtxmath} % for times font
\usepackage[noadjust]{cite}
\usepackage[overload]{empheq} % for subnumbering in cases
\usepackage[framemethod=tikz]{mdframed}
\usepackage{bm}
\usepackage{algorithm}
\usepackage[a4paper, left = 1.5cm, right = 1.5cm, bottom = 1.5cm, top = 1.5cm]{geometry}
\usepackage{braket}
\usepackage[T1]{fontenc}
\usepackage[ansinew,utf8]{inputenc}

\begin{document}
  \begin{equation}
  \label{eq:vec1}
  \nabla \xi(\bm{q}) = 
  \begin{bmatrix}
  \nabla \xi(q^{0}) \\ \nabla \xi(q^{1}) \\ \nabla \xi(q^{2}) \\ \nabla \xi(q^{3}) \\   \nabla \xi(q^{4}) \\ \nabla \xi(q^{5}) \\ \nabla \xi(q^{6}) 
  \end{bmatrix} = 
  \underbrace{\begin{bmatrix}
    2\lambda_{1}&2\lambda_{3}&2\lambda_{3} &0&0&0&0\\
    2\lambda_{3}&2\lambda_{1}&2\lambda_{3} &0&0&0&0\\
    2\lambda_{3}&2\lambda_{3}&2\lambda_{1} &0&0&0&0\\
    0&0&0&2\lambda_{1}&2\lambda_{3}&0&0\\
    0&0&0&2\lambda_{3}&2\lambda_{1}&0&0\\
    0&0&0&0&0&2\lambda_{1}&2\lambda_{3}\\
    0&0&0&0&0&2\lambda_{3}&2\lambda_{1} 
    \end{bmatrix}}_{\huge\bm{\Lambda}}
  \underbrace{\begin{bmatrix}
    q^{0}\\q^{1}\\q^{2}\\q^{3}\\q^{4}\\q^{5}\\q^{6}
    \end{bmatrix}}_{\huge\bm{q}}
  +2\omega\lambda_{2}
  \underbrace{\begin{bmatrix}
    \mathcal{Q}(q^{0},q^{1}) + \mathcal{Q}(q^{0},q^{2})\\
    \mathcal{Q}(q^{1},q^{0}) + \mathcal{Q}(q^{1},q^{2})\\
    \mathcal{Q}(q^{2},q^{0}) + \mathcal{Q}(q^{2},q^{1})\\
    \mathcal{Q}(q^{3},q^{4})\\
    \mathcal{Q}(q^{4},q^{3})\\
    \mathcal{Q}(q^{5},q^{6})\\
    \mathcal{Q}(q^{6},q^{5})
    \end{bmatrix}}_{\huge\bm{\Omega}}       
  +
  \underbrace{\begin{bmatrix}
    2\bigl(\lambda_{1}q^{0}_{\mathcal{T}} + \lambda_{3}(q^{1}_{\mathcal{T}} + q^{2}_{\mathcal{T}})\bigr)\\
    2\bigl(\lambda_{1}q^{1}_{\mathcal{T}} + \lambda_{3}(q^{0}_{\mathcal{T}} + q^{2}_{\mathcal{T}})\bigr)\\
    2\bigl(\lambda_{1}q^{2}_{\mathcal{T}} + \lambda_{3}(q^{0}_{\mathcal{T}} + q^{1}_{\mathcal{T}})\bigr)\\
    2\bigl(\lambda_{1}q^{3}_{\mathcal{T}} + \lambda_{3}q^{4}_{\mathcal{T}}\bigr)\\
    2\bigl(\lambda_{1}q^{4}_{\mathcal{T}} + \lambda_{3}q^{3}_{\mathcal{T}}\bigr)\\
    2\bigl(\lambda_{1}q^{5}_{\mathcal{T}} + \lambda_{3}q^{6}_{\mathcal{T}}\bigr)\\
    2\bigl(\lambda_{1}q^{6}_{\mathcal{T}} + \lambda_{3}q^{5}_{\mathcal{T}}\bigr)
    \end{bmatrix}}_{\huge\bm{C}} 
  = 0,
  \end{equation}
\end{document}

enter image description here

答案1

您会收到警告Command \Huge invalid in math mode,因此结果无法预测。

使用\textstyle

\documentclass{article}
\usepackage{newtxtext,newtxmath} % for times font
\usepackage{amsmath}
\usepackage{bm}

\begin{document}

\begin{equation} \label{eq:vec1}
\begin{split}
\nabla \xi(\bm{q}) &=
  \begin{bmatrix}
    \nabla \xi(q^{0}) \\
    \nabla \xi(q^{1}) \\
    \nabla \xi(q^{2}) \\
    \nabla \xi(q^{3}) \\
    \nabla \xi(q^{4}) \\
    \nabla \xi(q^{5}) \\
    \nabla \xi(q^{6}) 
  \end{bmatrix} = 
  {\underbrace{\begin{bmatrix}
    2\lambda_{1}&2\lambda_{3}&2\lambda_{3} &0&0&0&0\\
    2\lambda_{3}&2\lambda_{1}&2\lambda_{3} &0&0&0&0\\
    2\lambda_{3}&2\lambda_{3}&2\lambda_{1} &0&0&0&0\\
    0&0&0&2\lambda_{1}&2\lambda_{3}&0&0\\
    0&0&0&2\lambda_{3}&2\lambda_{1}&0&0\\
    0&0&0&0&0&2\lambda_{1}&2\lambda_{3}\\
    0&0&0&0&0&2\lambda_{3}&2\lambda_{1} 
    \end{bmatrix}}_{\textstyle\bm{\Lambda}}}
  {\underbrace{\begin{bmatrix}
    q^{0}\\q^{1}\\q^{2}\\q^{3}\\q^{4}\\q^{5}\\q^{6}
    \end{bmatrix}}_{\textstyle\bm{q}}}
  \\[2ex]
  &\quad+2\omega\lambda_{2}
  {\underbrace{\begin{bmatrix}
    \mathcal{Q}(q^{0},q^{1}) + \mathcal{Q}(q^{0},q^{2})\\
    \mathcal{Q}(q^{1},q^{0}) + \mathcal{Q}(q^{1},q^{2})\\
    \mathcal{Q}(q^{2},q^{0}) + \mathcal{Q}(q^{2},q^{1})\\
    \mathcal{Q}(q^{3},q^{4})\\
    \mathcal{Q}(q^{4},q^{3})\\
    \mathcal{Q}(q^{5},q^{6})\\
    \mathcal{Q}(q^{6},q^{5})
    \end{bmatrix}}_{\textstyle\bm{\Omega}}}
  +
  {\underbrace{\begin{bmatrix}
    2\bigl(\lambda_{1}q^{0}_{\mathcal{T}} + \lambda_{3}(q^{1}_{\mathcal{T}} + q^{2}_{\mathcal{T}})\bigr)\\
    2\bigl(\lambda_{1}q^{1}_{\mathcal{T}} + \lambda_{3}(q^{0}_{\mathcal{T}} + q^{2}_{\mathcal{T}})\bigr)\\
    2\bigl(\lambda_{1}q^{2}_{\mathcal{T}} + \lambda_{3}(q^{0}_{\mathcal{T}} + q^{1}_{\mathcal{T}})\bigr)\\
    2\bigl(\lambda_{1}q^{3}_{\mathcal{T}} + \lambda_{3}q^{4}_{\mathcal{T}}\bigr)\\
    2\bigl(\lambda_{1}q^{4}_{\mathcal{T}} + \lambda_{3}q^{3}_{\mathcal{T}}\bigr)\\
    2\bigl(\lambda_{1}q^{5}_{\mathcal{T}} + \lambda_{3}q^{6}_{\mathcal{T}}\bigr)\\
    2\bigl(\lambda_{1}q^{6}_{\mathcal{T}} + \lambda_{3}q^{5}_{\mathcal{T}}\bigr)
    \end{bmatrix}}_{\textstyle\bm{C}}} 
  \\
  &= 0,
\end{split}
\end{equation}

\end{document}

enter image description here

您可以使用\textstyle\mathlarger{\bm{\Lambda}},但我看不出它的真正原因(需要\usepackage{relsize})。

相关内容