Shorten textleftarrow and textrightarrow
I would like the arrows created by textleftarrow and textrightarrow to be 50% and 75% shorter, while leaving the arrow head the same size. I'm using it in a non-math environment; just normal text.
I have consulted the following posts to no avail, because they all seem to be math-based:
- Very short arrow symbol
- Arrows of arbitrary length
mathpazo
%XeLaTeX
documentclass[11pt]{book}
usepackage{polyglossia}
begin{document}
Why textrightarrow{} can't I figure this out textleftarrow ?
end{document}
arrows polyglossia arrowwithtext
add a comment |
I would like the arrows created by textleftarrow and textrightarrow to be 50% and 75% shorter, while leaving the arrow head the same size. I'm using it in a non-math environment; just normal text.
I have consulted the following posts to no avail, because they all seem to be math-based:
- Very short arrow symbol
- Arrows of arbitrary length
mathpazo
%XeLaTeX
documentclass[11pt]{book}
usepackage{polyglossia}
begin{document}
Why textrightarrow{} can't I figure this out textleftarrow ?
end{document}
arrows polyglossia arrowwithtext
What prevents you from using a math-based solution and wrapping it intoensuremath{...}?
– marmot
Mar 4 at 19:15
The arrow produced byensuremath{rightarrow}looks the same astextrightarrow. I don't see in those examples how to shorten it in combination withensuremath.
– AML
Mar 4 at 19:41
What I meant isdocumentclass{article} newcommand{veryshortarrow}[1][3pt]{ensuremath{mathrel{% hbox{rule[dimexprfontdimen22textfont2-.2ptrelax]{#1}{.4pt}}% mkern-4muhbox{usefont{U}{lasy}{m}{n}symbol{41}}}}} begin{document} averyshortarrow b end{document}
– marmot
Mar 4 at 19:47
It's got potential. Thank you. Looking for the arrow head to be the same size and also a left arrow.
– AML
Mar 4 at 19:59
add a comment |
I would like the arrows created by textleftarrow and textrightarrow to be 50% and 75% shorter, while leaving the arrow head the same size. I'm using it in a non-math environment; just normal text.
I have consulted the following posts to no avail, because they all seem to be math-based:
- Very short arrow symbol
- Arrows of arbitrary length
mathpazo
%XeLaTeX
documentclass[11pt]{book}
usepackage{polyglossia}
begin{document}
Why textrightarrow{} can't I figure this out textleftarrow ?
end{document}
arrows polyglossia arrowwithtext
I would like the arrows created by textleftarrow and textrightarrow to be 50% and 75% shorter, while leaving the arrow head the same size. I'm using it in a non-math environment; just normal text.
I have consulted the following posts to no avail, because they all seem to be math-based:
- Very short arrow symbol
- Arrows of arbitrary length
mathpazo
%XeLaTeX
documentclass[11pt]{book}
usepackage{polyglossia}
begin{document}
Why textrightarrow{} can't I figure this out textleftarrow ?
end{document}
arrows polyglossia arrowwithtext
arrows polyglossia arrowwithtext
asked Mar 4 at 17:18
AMLAML
1,3632426
1,3632426
What prevents you from using a math-based solution and wrapping it intoensuremath{...}?
– marmot
Mar 4 at 19:15
The arrow produced byensuremath{rightarrow}looks the same astextrightarrow. I don't see in those examples how to shorten it in combination withensuremath.
– AML
Mar 4 at 19:41
What I meant isdocumentclass{article} newcommand{veryshortarrow}[1][3pt]{ensuremath{mathrel{% hbox{rule[dimexprfontdimen22textfont2-.2ptrelax]{#1}{.4pt}}% mkern-4muhbox{usefont{U}{lasy}{m}{n}symbol{41}}}}} begin{document} averyshortarrow b end{document}
– marmot
Mar 4 at 19:47
It's got potential. Thank you. Looking for the arrow head to be the same size and also a left arrow.
– AML
Mar 4 at 19:59
add a comment |
What prevents you from using a math-based solution and wrapping it intoensuremath{...}?
– marmot
Mar 4 at 19:15
The arrow produced byensuremath{rightarrow}looks the same astextrightarrow. I don't see in those examples how to shorten it in combination withensuremath.
– AML
Mar 4 at 19:41
What I meant isdocumentclass{article} newcommand{veryshortarrow}[1][3pt]{ensuremath{mathrel{% hbox{rule[dimexprfontdimen22textfont2-.2ptrelax]{#1}{.4pt}}% mkern-4muhbox{usefont{U}{lasy}{m}{n}symbol{41}}}}} begin{document} averyshortarrow b end{document}
– marmot
Mar 4 at 19:47
It's got potential. Thank you. Looking for the arrow head to be the same size and also a left arrow.
– AML
Mar 4 at 19:59
What prevents you from using a math-based solution and wrapping it into
ensuremath{...}?– marmot
Mar 4 at 19:15
What prevents you from using a math-based solution and wrapping it into
ensuremath{...}?– marmot
Mar 4 at 19:15
The arrow produced by
ensuremath{rightarrow} looks the same as textrightarrow. I don't see in those examples how to shorten it in combination with ensuremath.– AML
Mar 4 at 19:41
The arrow produced by
ensuremath{rightarrow} looks the same as textrightarrow. I don't see in those examples how to shorten it in combination with ensuremath.– AML
Mar 4 at 19:41
What I meant is
documentclass{article} newcommand{veryshortarrow}[1][3pt]{ensuremath{mathrel{% hbox{rule[dimexprfontdimen22textfont2-.2ptrelax]{#1}{.4pt}}% mkern-4muhbox{usefont{U}{lasy}{m}{n}symbol{41}}}}} begin{document} averyshortarrow b end{document}– marmot
Mar 4 at 19:47
What I meant is
documentclass{article} newcommand{veryshortarrow}[1][3pt]{ensuremath{mathrel{% hbox{rule[dimexprfontdimen22textfont2-.2ptrelax]{#1}{.4pt}}% mkern-4muhbox{usefont{U}{lasy}{m}{n}symbol{41}}}}} begin{document} averyshortarrow b end{document}– marmot
Mar 4 at 19:47
It's got potential. Thank you. Looking for the arrow head to be the same size and also a left arrow.
– AML
Mar 4 at 19:59
It's got potential. Thank you. Looking for the arrow head to be the same size and also a left arrow.
– AML
Mar 4 at 19:59
add a comment |
1 Answer
1
active
oldest
votes
You can use the trimclip package for this.

The clipbox* command removes portions of your text outside the box specified by 4 coordinates:
clipbox*{{.25width} 0pt {width} {height}} textrightarrow
will leave the right 75% of the arrow. Similarly,
clipbox*{0pt 0pt {.75width} {height}} textleftarrow
will leave the left 75% of the arrow. Adjust as desired.
Here's the code:
%XeLaTeX
documentclass[11pt]{book}
usepackage{polyglossia}
usepackage{trimclip}
newcommand{shorttextrightarrow}{clipbox*{{.25width} 0pt {width} {height}} textrightarrow}
newcommand{shorttextleftarrow}{clipbox*{0pt 0pt {.75width} {height}} textleftarrow}
begin{document}
Why textrightarrow can't I figure this out textleftarrow ?
Why shorttextrightarrow can't I figure this out shorttextleftarrow ?
end{document}
add a comment |
Your Answer
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "85"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%2f477739%2fshorten-textleftarrow-and-textrightarrow%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
You can use the trimclip package for this.

The clipbox* command removes portions of your text outside the box specified by 4 coordinates:
clipbox*{{.25width} 0pt {width} {height}} textrightarrow
will leave the right 75% of the arrow. Similarly,
clipbox*{0pt 0pt {.75width} {height}} textleftarrow
will leave the left 75% of the arrow. Adjust as desired.
Here's the code:
%XeLaTeX
documentclass[11pt]{book}
usepackage{polyglossia}
usepackage{trimclip}
newcommand{shorttextrightarrow}{clipbox*{{.25width} 0pt {width} {height}} textrightarrow}
newcommand{shorttextleftarrow}{clipbox*{0pt 0pt {.75width} {height}} textleftarrow}
begin{document}
Why textrightarrow can't I figure this out textleftarrow ?
Why shorttextrightarrow can't I figure this out shorttextleftarrow ?
end{document}
add a comment |
You can use the trimclip package for this.

The clipbox* command removes portions of your text outside the box specified by 4 coordinates:
clipbox*{{.25width} 0pt {width} {height}} textrightarrow
will leave the right 75% of the arrow. Similarly,
clipbox*{0pt 0pt {.75width} {height}} textleftarrow
will leave the left 75% of the arrow. Adjust as desired.
Here's the code:
%XeLaTeX
documentclass[11pt]{book}
usepackage{polyglossia}
usepackage{trimclip}
newcommand{shorttextrightarrow}{clipbox*{{.25width} 0pt {width} {height}} textrightarrow}
newcommand{shorttextleftarrow}{clipbox*{0pt 0pt {.75width} {height}} textleftarrow}
begin{document}
Why textrightarrow can't I figure this out textleftarrow ?
Why shorttextrightarrow can't I figure this out shorttextleftarrow ?
end{document}
add a comment |
You can use the trimclip package for this.

The clipbox* command removes portions of your text outside the box specified by 4 coordinates:
clipbox*{{.25width} 0pt {width} {height}} textrightarrow
will leave the right 75% of the arrow. Similarly,
clipbox*{0pt 0pt {.75width} {height}} textleftarrow
will leave the left 75% of the arrow. Adjust as desired.
Here's the code:
%XeLaTeX
documentclass[11pt]{book}
usepackage{polyglossia}
usepackage{trimclip}
newcommand{shorttextrightarrow}{clipbox*{{.25width} 0pt {width} {height}} textrightarrow}
newcommand{shorttextleftarrow}{clipbox*{0pt 0pt {.75width} {height}} textleftarrow}
begin{document}
Why textrightarrow can't I figure this out textleftarrow ?
Why shorttextrightarrow can't I figure this out shorttextleftarrow ?
end{document}
You can use the trimclip package for this.

The clipbox* command removes portions of your text outside the box specified by 4 coordinates:
clipbox*{{.25width} 0pt {width} {height}} textrightarrow
will leave the right 75% of the arrow. Similarly,
clipbox*{0pt 0pt {.75width} {height}} textleftarrow
will leave the left 75% of the arrow. Adjust as desired.
Here's the code:
%XeLaTeX
documentclass[11pt]{book}
usepackage{polyglossia}
usepackage{trimclip}
newcommand{shorttextrightarrow}{clipbox*{{.25width} 0pt {width} {height}} textrightarrow}
newcommand{shorttextleftarrow}{clipbox*{0pt 0pt {.75width} {height}} textleftarrow}
begin{document}
Why textrightarrow can't I figure this out textleftarrow ?
Why shorttextrightarrow can't I figure this out shorttextleftarrow ?
end{document}
answered Mar 4 at 23:37
Sandy GSandy G
2,8621322
2,8621322
add a comment |
add a comment |
Thanks for contributing an answer to TeX - LaTeX Stack Exchange!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%2f477739%2fshorten-textleftarrow-and-textrightarrow%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
What prevents you from using a math-based solution and wrapping it into
ensuremath{...}?– marmot
Mar 4 at 19:15
The arrow produced by
ensuremath{rightarrow}looks the same astextrightarrow. I don't see in those examples how to shorten it in combination withensuremath.– AML
Mar 4 at 19:41
What I meant is
documentclass{article} newcommand{veryshortarrow}[1][3pt]{ensuremath{mathrel{% hbox{rule[dimexprfontdimen22textfont2-.2ptrelax]{#1}{.4pt}}% mkern-4muhbox{usefont{U}{lasy}{m}{n}symbol{41}}}}} begin{document} averyshortarrow b end{document}– marmot
Mar 4 at 19:47
It's got potential. Thank you. Looking for the arrow head to be the same size and also a left arrow.
– AML
Mar 4 at 19:59