答案1
你可以得到更好的箭tikz-cd
:
\documentclass{article}
\usepackage[sc]{mathpazo}
\usepackage{amsmath}
\usepackage{tikz-cd}
\usepackage{graphicx}
\DeclareMathOperator{\argmin}{arg\,min}
\begin{document}
\begin{tikzcd}[row sep=0pt]
\displaystyle\frac{1}{N}\sum_{i=1}^{N} q(w_{i},\theta)
\arrow[r]
&
\mathbb{E}[q(w,\theta)]
\\
\rotatebox[origin=c]{90}{$\argmin$}
&
\rotatebox[origin=c]{90}{$\argmin$}
\\
\hat{\theta} \arrow[r,red] & \theta
\end{tikzcd}
\end{document}
答案2
例如,环境array
可用于对齐:
\documentclass{article}
\usepackage{amsmath} % for \DeclareMathOperator
\usepackage{dsfont} % for \mathds
\usepackage{color} % for \color{red}
\usepackage{graphicx} % for \rotatebox
\DeclareMathOperator*{\argmin}{argmin}
\begin{document}
\[
\begin{array}{ccc}
N^{-1} \sum_{i=1}^{N} q(w_i, \theta)
& \longrightarrow & \mathds{E} [q(w, \theta)] \\[1.5ex]
\rotatebox{90}{$\argmin$} & &
\rotatebox{90}{$\argmin$} \\[1ex]
\hat\theta & \color{red}\longrightarrow & \theta_0
\end{array}
\]
\end{document}
答案3
另一种解决方案是alignat
,and eqparbox
:
\documentclass{article}
\usepackage{mathtools, amsfonts} %
\DeclarePairedDelimiterXPP{\Exp}[1]{\mathbb{E}}[]{}{#1}
\DeclareMathOperator*{\argmin}{argmin}
\usepackage[svgnames]{xcolor} %
\usepackage{graphicx} %
\usepackage{eqparbox}
\newcommand\eqmathbox[2][M]{\eqmakebox[#1]{$\displaystyle#2$}}
\begin{document}
\begin{alignat*}{2}
\eqmathbox[ML]{ N^{-1} \sum_{i=1}^{N} q(w_i, \theta)}
& \longrightarrow{} & \eqmathbox[MR]{\Exp{q(w, \theta)}} \\%[1.5ex]
\eqmathbox[ML]{\rotatebox{90}{$\argmin$}} & &
\eqmathbox[MR]{\rotatebox{90}{$\argmin$}} \\[-0.7ex]
\eqmathbox[ML]{\hat\theta} & \color{Crimson}\longrightarrow & \eqmathbox[MR]{\theta_0}
\end{alignat*}
\end{document}