我试图将两条线在头部或中心对齐,但发现这是不可能的。
例如,此代码生成以下帧
\documentclass{beamer}
\usepackage[english]{babel}
\usepackage[utf8x]{inputenc}
\usepackage{tikz-cd}
\usepackage{amsmath,amssymb,amsthm}
\begin{document}
\begin{equation*}
\begin{tikzcd}
\text{The following lines are not aligned} \arrow{d}
\\
\begin{aligned}
& Line 1\\
& Line 2 \text{(Not aligned at the beginning!)}
\end{aligned}
\end{tikzcd}
\end{equation*}
\end{document}
或者
这些解决方案可行吗?
答案1
中心
\documentclass{beamer}
\usepackage[english]{babel}
\usepackage[utf8x]{inputenc}
\usepackage{tikz-cd}
\usepackage{amsmath,amssymb,amsthm}
\begin{document}
\begin{equation*}
\begin{tikzcd}
\text{The following lines are not aligned} \arrow{d}
\\
\begin{array}{c}
Line 1\\
Line 2 \text{(Not aligned at the beginning!)}
\end{array}
\end{tikzcd}
\end{equation*}
\end{document}
左对齐
\documentclass{beamer}
\usepackage[english]{babel}
\usepackage[utf8x]{inputenc}
\usepackage{tikz-cd}
\usepackage{amsmath,amssymb,amsthm}
\begin{document}
\begin{equation*}
\begin{tikzcd}
\text{The following lines are not aligned} \arrow{d}
\\
\begin{array}{l}
Line 1\\
Line 2 \text{(Not aligned at the beginning!)}
\end{array}
\end{tikzcd}
\end{equation*}
\end{document}