
答案1
您可以使用該trimclip
套件來實現此目的。
該clipbox*
命令刪除 4 個座標指定的框之外的文字部分:
\clipbox*{{.25\width} 0pt {\width} {\height}} \textrightarrow
將留下箭頭右側的 75%。相似地,
\clipbox*{0pt 0pt {.75\width} {\height}} \textleftarrow
將留下箭頭左側的 75%。根據需要進行調整。
這是代碼:
%XeLaTeX
\documentclass[11pt]{book}
\usepackage{polyglossia}
\usepackage{trimclip}
\newcommand{\shorttextrightarrow}{\clipbox*{{.25\width} 0pt {\width} {\height}} \textrightarrow}
\newcommand{\shorttextleftarrow}{\clipbox*{0pt 0pt {.75\width} {\height}} \textleftarrow}
\begin{document}
Why \textrightarrow\ can't I figure this out \textleftarrow ?
Why \shorttextrightarrow\ can't I figure this out \shorttextleftarrow ?
\end{document}