答案1
我不熟悉预定义符号,但构建它们并不困难;没有tikz
必要。
\documentclass{article}
\makeatletter
\newcommand*{\rightarrowvert}{\mbox{\mathsurround\z@$\rightarrow$\llap{\rule{.5pt}{2ex}}}}
\newcommand*{\vertleftarrow}{\mbox{\mathsurround\z@\rlap{\rule{.5pt}{2ex}}$\leftarrow$}}
\newcommand*{\showlength}[1]{%
\rightarrowvert
\kern#1\relax
\ifdim#1>\z@ \expandafter\@gobbletwo\fi\raisebox{1ex}%
\vertleftarrow
}
\makeatother
\begin{document}
\showlength{0.1667em}
\quad
\showlength{0.5em}
\quad
\showlength{-0.1667em}
\end{document}
使用图片模式,也可以为垂直线添加圆形帽......