Acortar \textleftarrow y \textrightarrow

Acortar \textleftarrow y \textrightarrow

Me gustaría que las flechas creadas por \textleftarrowy \textrightarrowfueran 50% y 75%corta, dejando la punta de la flecha del mismo tamaño. Lo estoy usando en un entorno no matemático; solo texto normal.

He consultado las siguientes publicaciones en vano, porque todas parecen estar basadas en matemáticas:

Respuesta1

Puedes usar el trimclippaquete para esto.

ingrese la descripción de la imagen aquí

El clipbox*comando elimina partes de su texto fuera del cuadro especificado por 4 coordenadas:

\clipbox*{{.25\width} 0pt {\width} {\height}} \textrightarrow

Dejará el 75% derecho de la flecha. Similarmente,

\clipbox*{0pt 0pt {.75\width} {\height}} \textleftarrow

Dejará el 75% izquierdo de la flecha. Ajuste como desee.

Aquí está el código:

%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}

información relacionada