![将 qed 符号移动到居中 tikz 图片的底部](https://linux22.com/image/338633/%E5%B0%86%20qed%20%E7%AC%A6%E5%8F%B7%E7%A7%BB%E5%8A%A8%E5%88%B0%E5%B1%85%E4%B8%AD%20tikz%20%E5%9B%BE%E7%89%87%E7%9A%84%E5%BA%95%E9%83%A8.png)
我怎样才能将 qed 符号放在底线,而不将其$P(X)=$
从垂直中心移动?
\documentclass{article}
\usepackage{amsthm}
\usepackage{tikz}
\begin{document}
\begin{proof}
something something something\\
$P(X)=$\begin{tikzpicture}[baseline={(current bounding box.center)}]
\node (1) at (0,0){$1$};
\node (2) at (-2,-1){$2$};
\node (3) at (0,-1){$3$};
\node (4) at (2,-1){$4$};
\node (5) at (-2,-2){$5$};
\node (6) at (0,-2){$6$};
\node (7) at (2,-2){$7$};
\node (8) at (0,-3){$8$};
\end{tikzpicture}
\end{proof}
\end{document}
答案1
用于\raisebox
降低基线。
\documentclass{article}
\usepackage{amsthm}
\usepackage{tikz}
\begin{document}
\begin{proof}
something something something\\
\raisebox{\depth}{%
$P(X)=$\begin{tikzpicture}[baseline={(current bounding box.center)}]
\node (1) at (0,0){$1$};
\node (2) at (-2,-1){$2$};
\node (3) at (0,-1){$3$};
\node (4) at (2,-1){$4$};
\node (5) at (-2,-2){$5$};
\node (6) at (0,-2){$6$};
\node (7) at (2,-2){$7$};
\node (8) at (0,-3){$8$};
\end{tikzpicture}}
\end{proof}
\end{document}
答案2
写矩阵的方式非常奇怪。这个简单的解决方案有什么问题:
\documentclass{article}
\usepackage{amsthm,mathtools}
\begin{document}
\begin{proof}
something something something\\
\[
\setlength\arraycolsep{1cm}
\renewcommand\arraystretch{2}
P(X) = \begin{matrix}
& 1 & \\
2 & 3 & 4 \\
5 & 6 & 7 \\
& 8 & \\
\end{matrix}
\]
\end{proof}
\end{document}