答案1
没有 TikZ,纯图像模式(根据您想要使用的上下文进行细化,正如 MS-SPO 所评论的那样):
\documentclass{amsart}
\begin{document}
\begin{picture}(10,10)
\put(0,0){\vector(1,0){10}}
\end{picture}
\end{document}
答案2
进一步将 CarLaTex 的方法应用到此,您可以像使用普通文本一样使用绘制的箭头\newcommand\arw
。但是,如您所见,需要进行一些调整才能获得适当的空白间距。我的解决方案肯定会因字体不同而失败,可以使用适当的 Latex 常量进行改进,但您明白我的意思了。
放大:
\documentclass{amsart}
\newcommand\arw[0]{%
\begin{picture}(13,10)% allow some space after the tip
\put(0,0.3em){\vector(1,0){10}}% shift it up a little
\end{picture}}
\begin{document}
Lorem \arw ipsum dolor sit amet consectetuer rutrum Aenean vitae Phasellus risus. Vivamus et ridiculus Suspendisse Vestibulum hendrerit dolor ipsum congue.
Et ac quis pharetra convallis tempus pellentesque id Vestibulum tincidunt malesuada. Vitae et Maecenas Ut hendrerit quis \arw sagittis arcu mi vitae lobortis. At.
\arw
Tortor mus neque egestas habitant sed laoreet quis purus pede lacinia. Suscipit vel Vivamus laoreet dis Cras elit ipsum consequat eget orci. $a \arw b$ Massa diam.
$a \arw b$
\end{document}
以下是 CarLaTex 建议的版本\mathrel
:
相关代码修改:
Tortor mus neque egestas habitant sed laoreet quis purus pede lacinia. Suscipit vel Vivamus laoreet dis Cras elit ipsum
consequat eget orci. $a \arw b$ Massa $ab \mathrel{\arw} bc$ diam.
$a \arw b$
$ab \mathrel{\arw bc}$
答案3
以下是解决方案,picture
与\tikz
方法进行了比较。如您所见,仍需要对空白和位置进行一些调整。
(PS:是的,第二部分应该读作“tarw without ...”...)
\documentclass{amsart}
\usepackage{tikz}
\usetikzlibrary{arrows.meta}
\newcommand\arw[0]{%
\begin{picture}(13,10)% allow some space after the tip
\put(0,0.3em){\vector(1,0){10}}% shift it up a little
\end{picture}}
\newcommand\tarw[0]{\tikz{\draw[-Latex] (0,0) -- (0.5,0);}}
\begin{document}
\section{arw}
Lorem \arw ipsum dolor sit amet consectetuer rutrum Aenean vitae Phasellus risus. Vivamus et ridiculus Suspendisse Vestibulum hendrerit dolor ipsum congue.
Et ac quis pharetra convallis tempus pellentesque id Vestibulum tincidunt malesuada. Vitae et Maecenas Ut hendrerit quis \arw sagittis arcu mi vitae lobortis. At.
\arw
Tortor mus neque egestas habitant sed laoreet quis purus pede lacinia. Suscipit vel Vivamus laoreet dis Cras elit ipsum consequat eget orci. $a \arw b$ Massa $ab \mathrel{\arw} bc$ diam.
$a \arw b$
$ab \mathrel{\tarw bc}$\section{arw without any white space adjustments}
Lorem \tarw ipsum dolor sit amet consectetuer rutrum Aenean vitae Phasellus risus. Vivamus et ridiculus Suspendisse Vestibulum hendrerit dolor ipsum congue.
Et ac quis pharetra convallis tempus pellentesque id Vestibulum tincidunt malesuada. Vitae et Maecenas Ut hendrerit quis \tarw sagittis arcu mi vitae lobortis. At.
\tarw
Tortor mus neque egestas habitant sed laoreet quis purus pede lacinia. Suscipit vel Vivamus laoreet dis Cras elit ipsum consequat eget orci. $a \tarw b$ Massa $ab \mathrel{\tarw} bc$ diam.
$a \tarw b$
$ab \mathrel{\tarw bc}$
\end{document}