我想对齐符号\Circle
、\CIRCLE
、的中心\times
,而不是节点的中心。有没有简单的方法?
\documentclass[final,t]{beamer}
\mode<presentation>
\usepackage{wasysym}
\usepackage{bm}
\usepackage{tikz}
\usetikzlibrary{matrix}
\begin{document}
\begin{tikzpicture}
\centering
\matrix (m) [
matrix of math nodes, row sep=3em, column sep=1.5em, minimum height=4em, %nodes in empty cells , minimum width=3em
nodes={anchor=center}
]
{
\CIRCLE^{\frac{1}{4}} & \Circle^{\frac{1}{4}} & (\Circle^{\frac{1}{4}}\CIRCLE^{\frac{1}{4}}) & \bm{\times} \\
};
\path
(m-1-1) edge (m-1-2)
(m-1-2) edge (m-1-3)
(m-1-3) edge (m-1-4);
\end{tikzpicture}
\end{document}
这就是我得到的
答案1
您可以将其用于\smash{^{\frac{1}{4}}}
所有上标,这样它们就不会占用任何垂直空间,因此不会影响对齐。
\documentclass[final,t]{beamer}
\mode<presentation>
\usepackage{wasysym}
\usepackage{bm}
\usepackage{tikz}
\usetikzlibrary{matrix}
\begin{document}
\begin{tikzpicture}
\centering
\matrix (m) [
matrix of math nodes, row sep=3em, column sep=1.5em, minimum height=4em, %nodes in empty cells , minimum width=3em
nodes={anchor=center}
]
{
\CIRCLE\smash{^{\frac{1}{4}}} & \Circle\smash{^{\frac{1}{4}}} & (\Circle\smash{^{\frac{1}{4}}}\CIRCLE\smash{^{\frac{1}{4}}}) & \bm{\times} \\
};
\path
(m-1-1) edge (m-1-2)
(m-1-2) edge (m-1-3)
(m-1-3) edge (m-1-4);
\end{tikzpicture}
\end{document}