![我该如何排版?(水平和对齐取消)](https://linux22.com/image/429834/%E6%88%91%E8%AF%A5%E5%A6%82%E4%BD%95%E6%8E%92%E7%89%88%EF%BC%9F%EF%BC%88%E6%B0%B4%E5%B9%B3%E5%92%8C%E5%AF%B9%E9%BD%90%E5%8F%96%E6%B6%88%EF%BC%89.png)
答案1
这使用tikz
,我认为它实现了你想要的。你也可以尝试箭头的方向。你也可以使用arrows
和arrows.meta
TikZ 库尝试箭头尖端(手册第 16 节,第 191 页)。
\documentclass{article}
\usepackage{tikz,amsmath}
\usetikzlibrary{arrows}
\newcommand\arrowcrosswe[1]{
\begin{tikzpicture}[baseline=(o.base)]
\node (o) at (0,0) {#1};
\draw[-latex] (o.west) -- (o.east);
\end{tikzpicture}
}
\newcommand\arrowcross[3]{
\begin{tikzpicture}[baseline=(o.base)]
\node (o) at (0,0) {#1};
\draw[-latex] (o.#2) -- (o.#3);
\end{tikzpicture}
}
\newcommand\arrowcrossew[1]{
\begin{tikzpicture}[baseline=(o.base)]
\node (o) at (0,0) {#1};
\draw[-latex] (o.west) -- (o.east);
\end{tikzpicture}
}
\newcommand{\crossfrac}[2]{
\genfrac{}{}{}{}{\arrowcrosswe{#1}}{\arrowcrosswe{#2}}
}
\begin{document}
\arrowcrossew{333}
\arrowcross{444}{north east}{south west}
\begin{tabular}{ccc}
\arrowcrosswe{777} & 777 & \arrowcrossew{777}\\
\arrowcrosswe{333} & 333 & \arrowcrossew{333}\\
\arrowcross{555}{south}{north} & 555 & \arrowcross{555}{north west}{south east}
\end{tabular}
$\crossfrac{777}{333}$
\end{document}
编辑:我忘记了分数部分。此更新尝试用于amsmath
获取\genfrac
命令。