Shorten textleftarrow and textrightarrow












2















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}











share|improve this question























  • 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













  • 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
















2















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}











share|improve this question























  • 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













  • 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














2












2








2


0






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}











share|improve this question














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






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked Mar 4 at 17:18









AMLAML

1,3632426




1,3632426













  • 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













  • 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



















  • 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













  • 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

















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










1 Answer
1






active

oldest

votes


















2














You can use the trimclip package for this.



enter image description here



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}





share|improve this answer























    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
    });


    }
    });














    draft saved

    draft discarded


















    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









    2














    You can use the trimclip package for this.



    enter image description here



    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}





    share|improve this answer




























      2














      You can use the trimclip package for this.



      enter image description here



      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}





      share|improve this answer


























        2












        2








        2







        You can use the trimclip package for this.



        enter image description here



        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}





        share|improve this answer













        You can use the trimclip package for this.



        enter image description here



        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}






        share|improve this answer












        share|improve this answer



        share|improve this answer










        answered Mar 4 at 23:37









        Sandy GSandy G

        2,8621322




        2,8621322






























            draft saved

            draft discarded




















































            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.




            draft saved


            draft discarded














            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





















































            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







            Popular posts from this blog

            How to send String Array data to Server using php in android

            Title Spacing in Bjornstrup Chapter, Removing Chapter Number From Contents

            Is anime1.com a legal site for watching anime?