Space around vertical bar/pipe

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP











up vote
3
down vote

favorite












I am new to Latex and am giving it a try on a homework assignment. My professor's notes (which are written in Latex) include a formula that looks like this:



enter image description here



When I try and recreate this formula using Latex, my version looks like this:



enter image description here



There are a few differences between these two renderings, but the one that is bothering me most is that my professor's pipe character (|) has a comfortable amount of horizontal white space on either side; my pipe has very little space surrounding it.



How can I make my pipe character look like my professor's? Is he using a different character than I am?



Here is the code I am using:



[
E_1 = big langle 5, j rangle big
]






share|improve this question
















  • 2




    mid is the command for | used as an infix operator. Note also big should be bigl and big should be bigr or you lose the open/close spacing on the delimiters
    – David Carlisle
    Aug 31 at 12:09










  • @DavidCarlisle - mid was what I was looking for! Thanks! If you add your comment as an answer, I'll accept.
    – Nathan Friend
    Aug 31 at 12:18






  • 1




    I already did:-)
    – David Carlisle
    Aug 31 at 12:19










  • @DavidCarlisle - Also, I converted the bigs to bigl and bigr, but didn't notice a difference.
    – Nathan Friend
    Aug 31 at 12:19










  • Welcome to TeX.SX! Do you know about the tools offered by the mathtools package? If not, you might want to have a look to this question and to this.
    – GuM
    Aug 31 at 12:38














up vote
3
down vote

favorite












I am new to Latex and am giving it a try on a homework assignment. My professor's notes (which are written in Latex) include a formula that looks like this:



enter image description here



When I try and recreate this formula using Latex, my version looks like this:



enter image description here



There are a few differences between these two renderings, but the one that is bothering me most is that my professor's pipe character (|) has a comfortable amount of horizontal white space on either side; my pipe has very little space surrounding it.



How can I make my pipe character look like my professor's? Is he using a different character than I am?



Here is the code I am using:



[
E_1 = big langle 5, j rangle big
]






share|improve this question
















  • 2




    mid is the command for | used as an infix operator. Note also big should be bigl and big should be bigr or you lose the open/close spacing on the delimiters
    – David Carlisle
    Aug 31 at 12:09










  • @DavidCarlisle - mid was what I was looking for! Thanks! If you add your comment as an answer, I'll accept.
    – Nathan Friend
    Aug 31 at 12:18






  • 1




    I already did:-)
    – David Carlisle
    Aug 31 at 12:19










  • @DavidCarlisle - Also, I converted the bigs to bigl and bigr, but didn't notice a difference.
    – Nathan Friend
    Aug 31 at 12:19










  • Welcome to TeX.SX! Do you know about the tools offered by the mathtools package? If not, you might want to have a look to this question and to this.
    – GuM
    Aug 31 at 12:38












up vote
3
down vote

favorite









up vote
3
down vote

favorite











I am new to Latex and am giving it a try on a homework assignment. My professor's notes (which are written in Latex) include a formula that looks like this:



enter image description here



When I try and recreate this formula using Latex, my version looks like this:



enter image description here



There are a few differences between these two renderings, but the one that is bothering me most is that my professor's pipe character (|) has a comfortable amount of horizontal white space on either side; my pipe has very little space surrounding it.



How can I make my pipe character look like my professor's? Is he using a different character than I am?



Here is the code I am using:



[
E_1 = big langle 5, j rangle big
]






share|improve this question












I am new to Latex and am giving it a try on a homework assignment. My professor's notes (which are written in Latex) include a formula that looks like this:



enter image description here



When I try and recreate this formula using Latex, my version looks like this:



enter image description here



There are a few differences between these two renderings, but the one that is bothering me most is that my professor's pipe character (|) has a comfortable amount of horizontal white space on either side; my pipe has very little space surrounding it.



How can I make my pipe character look like my professor's? Is he using a different character than I am?



Here is the code I am using:



[
E_1 = big langle 5, j rangle big
]








share|improve this question











share|improve this question




share|improve this question










asked Aug 31 at 12:01









Nathan Friend

1855




1855







  • 2




    mid is the command for | used as an infix operator. Note also big should be bigl and big should be bigr or you lose the open/close spacing on the delimiters
    – David Carlisle
    Aug 31 at 12:09










  • @DavidCarlisle - mid was what I was looking for! Thanks! If you add your comment as an answer, I'll accept.
    – Nathan Friend
    Aug 31 at 12:18






  • 1




    I already did:-)
    – David Carlisle
    Aug 31 at 12:19










  • @DavidCarlisle - Also, I converted the bigs to bigl and bigr, but didn't notice a difference.
    – Nathan Friend
    Aug 31 at 12:19










  • Welcome to TeX.SX! Do you know about the tools offered by the mathtools package? If not, you might want to have a look to this question and to this.
    – GuM
    Aug 31 at 12:38












  • 2




    mid is the command for | used as an infix operator. Note also big should be bigl and big should be bigr or you lose the open/close spacing on the delimiters
    – David Carlisle
    Aug 31 at 12:09










  • @DavidCarlisle - mid was what I was looking for! Thanks! If you add your comment as an answer, I'll accept.
    – Nathan Friend
    Aug 31 at 12:18






  • 1




    I already did:-)
    – David Carlisle
    Aug 31 at 12:19










  • @DavidCarlisle - Also, I converted the bigs to bigl and bigr, but didn't notice a difference.
    – Nathan Friend
    Aug 31 at 12:19










  • Welcome to TeX.SX! Do you know about the tools offered by the mathtools package? If not, you might want to have a look to this question and to this.
    – GuM
    Aug 31 at 12:38







2




2




mid is the command for | used as an infix operator. Note also big should be bigl and big should be bigr or you lose the open/close spacing on the delimiters
– David Carlisle
Aug 31 at 12:09




mid is the command for | used as an infix operator. Note also big should be bigl and big should be bigr or you lose the open/close spacing on the delimiters
– David Carlisle
Aug 31 at 12:09












@DavidCarlisle - mid was what I was looking for! Thanks! If you add your comment as an answer, I'll accept.
– Nathan Friend
Aug 31 at 12:18




@DavidCarlisle - mid was what I was looking for! Thanks! If you add your comment as an answer, I'll accept.
– Nathan Friend
Aug 31 at 12:18




1




1




I already did:-)
– David Carlisle
Aug 31 at 12:19




I already did:-)
– David Carlisle
Aug 31 at 12:19












@DavidCarlisle - Also, I converted the bigs to bigl and bigr, but didn't notice a difference.
– Nathan Friend
Aug 31 at 12:19




@DavidCarlisle - Also, I converted the bigs to bigl and bigr, but didn't notice a difference.
– Nathan Friend
Aug 31 at 12:19












Welcome to TeX.SX! Do you know about the tools offered by the mathtools package? If not, you might want to have a look to this question and to this.
– GuM
Aug 31 at 12:38




Welcome to TeX.SX! Do you know about the tools offered by the mathtools package? If not, you might want to have a look to this question and to this.
– GuM
Aug 31 at 12:38










2 Answers
2






active

oldest

votes

















up vote
5
down vote



accepted










mid is the command for | used as an infix operator. Note also big should be bigl and big should be bigr or you lose the open/close spacing on the delimiters, however unfortunately you can't use the bigm variant with mid as it isn't a delimiter so you need bigm| :



documentclassarticle

usepackageamsmath

begindocument

aaa
[
E_1 = langle 5, j rangle mid j in 1, cdots, n - 5
]

bbb
[
E_1 = bigl j in 1, cdots, n - 5 bigr
]
enddocument


enter image description here






share|improve this answer






















  • @GuM I'm getting too old for this:-)
    – David Carlisle
    Aug 31 at 12:56










  • @GuM updated, thanks.
    – David Carlisle
    Aug 31 at 13:00

















up vote
3
down vote













I propose to define macros set and innerp with packages xparse and mathtools, using a simple syntax: setx;P(x) and innerpx,y.



These commands have a starred version, which adds a pair of implicit left right in front of the delimiters and ensures a proper spacing. They also can have as an optional argument one of big, Big, bigg, Bigg, which similarly adds a pair of implicit bigl bigr, &c.



documentclassarticle
usepackage[utf8]inputenc

usepackagexparse
usepackagemathtools

DeclarePairedDelimiterXset[1]setargs#1
%%% Syntax: setx ; P(x))
NewDocumentCommandsetargs>SplitArgument1;m
setargsaux#1
NewDocumentCommandsetargsauxmm
IfNoValueTF#2#1nonscript,#1nonscript;delimsizevertnonscript:mathopen #2nonscript,

DeclarePairedDelimiterXinnerp[1]langlerangleinnpargs#1
%%% Syntax: innerpx,y
NewDocumentCommandinnpargs >SplitArgument1,m
innpargsaux#1
NewDocumentCommandinnpargsaux m m
#1:,,mathopen#2%

begindocument

[
E_1 = set* innerp5, j ; j in set1, cdots, n - set5
]

[
E_1 = set[Big] innerp5, j ; j in set1, cdots, n - set5
]

enddocument


enter image description here






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',
    convertImagesToLinks: false,
    noModals: false,
    showLowRepImageUploadWarning: true,
    reputationToPostImages: null,
    bindNavPrevention: true,
    postfix: "",
    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%2f448669%2fspace-around-vertical-bar-pipe%23new-answer', 'question_page');

    );

    Post as a guest






























    2 Answers
    2






    active

    oldest

    votes








    2 Answers
    2






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes








    up vote
    5
    down vote



    accepted










    mid is the command for | used as an infix operator. Note also big should be bigl and big should be bigr or you lose the open/close spacing on the delimiters, however unfortunately you can't use the bigm variant with mid as it isn't a delimiter so you need bigm| :



    documentclassarticle

    usepackageamsmath

    begindocument

    aaa
    [
    E_1 = langle 5, j rangle mid j in 1, cdots, n - 5
    ]

    bbb
    [
    E_1 = bigl j in 1, cdots, n - 5 bigr
    ]
    enddocument


    enter image description here






    share|improve this answer






















    • @GuM I'm getting too old for this:-)
      – David Carlisle
      Aug 31 at 12:56










    • @GuM updated, thanks.
      – David Carlisle
      Aug 31 at 13:00














    up vote
    5
    down vote



    accepted










    mid is the command for | used as an infix operator. Note also big should be bigl and big should be bigr or you lose the open/close spacing on the delimiters, however unfortunately you can't use the bigm variant with mid as it isn't a delimiter so you need bigm| :



    documentclassarticle

    usepackageamsmath

    begindocument

    aaa
    [
    E_1 = langle 5, j rangle mid j in 1, cdots, n - 5
    ]

    bbb
    [
    E_1 = bigl j in 1, cdots, n - 5 bigr
    ]
    enddocument


    enter image description here






    share|improve this answer






















    • @GuM I'm getting too old for this:-)
      – David Carlisle
      Aug 31 at 12:56










    • @GuM updated, thanks.
      – David Carlisle
      Aug 31 at 13:00












    up vote
    5
    down vote



    accepted







    up vote
    5
    down vote



    accepted






    mid is the command for | used as an infix operator. Note also big should be bigl and big should be bigr or you lose the open/close spacing on the delimiters, however unfortunately you can't use the bigm variant with mid as it isn't a delimiter so you need bigm| :



    documentclassarticle

    usepackageamsmath

    begindocument

    aaa
    [
    E_1 = langle 5, j rangle mid j in 1, cdots, n - 5
    ]

    bbb
    [
    E_1 = bigl j in 1, cdots, n - 5 bigr
    ]
    enddocument


    enter image description here






    share|improve this answer














    mid is the command for | used as an infix operator. Note also big should be bigl and big should be bigr or you lose the open/close spacing on the delimiters, however unfortunately you can't use the bigm variant with mid as it isn't a delimiter so you need bigm| :



    documentclassarticle

    usepackageamsmath

    begindocument

    aaa
    [
    E_1 = langle 5, j rangle mid j in 1, cdots, n - 5
    ]

    bbb
    [
    E_1 = bigl j in 1, cdots, n - 5 bigr
    ]
    enddocument


    enter image description here







    share|improve this answer














    share|improve this answer



    share|improve this answer








    edited Aug 31 at 12:59

























    answered Aug 31 at 12:16









    David Carlisle

    466k3810931816




    466k3810931816











    • @GuM I'm getting too old for this:-)
      – David Carlisle
      Aug 31 at 12:56










    • @GuM updated, thanks.
      – David Carlisle
      Aug 31 at 13:00
















    • @GuM I'm getting too old for this:-)
      – David Carlisle
      Aug 31 at 12:56










    • @GuM updated, thanks.
      – David Carlisle
      Aug 31 at 13:00















    @GuM I'm getting too old for this:-)
    – David Carlisle
    Aug 31 at 12:56




    @GuM I'm getting too old for this:-)
    – David Carlisle
    Aug 31 at 12:56












    @GuM updated, thanks.
    – David Carlisle
    Aug 31 at 13:00




    @GuM updated, thanks.
    – David Carlisle
    Aug 31 at 13:00










    up vote
    3
    down vote













    I propose to define macros set and innerp with packages xparse and mathtools, using a simple syntax: setx;P(x) and innerpx,y.



    These commands have a starred version, which adds a pair of implicit left right in front of the delimiters and ensures a proper spacing. They also can have as an optional argument one of big, Big, bigg, Bigg, which similarly adds a pair of implicit bigl bigr, &c.



    documentclassarticle
    usepackage[utf8]inputenc

    usepackagexparse
    usepackagemathtools

    DeclarePairedDelimiterXset[1]setargs#1
    %%% Syntax: setx ; P(x))
    NewDocumentCommandsetargs>SplitArgument1;m
    setargsaux#1
    NewDocumentCommandsetargsauxmm
    IfNoValueTF#2#1nonscript,#1nonscript;delimsizevertnonscript:mathopen #2nonscript,

    DeclarePairedDelimiterXinnerp[1]langlerangleinnpargs#1
    %%% Syntax: innerpx,y
    NewDocumentCommandinnpargs >SplitArgument1,m
    innpargsaux#1
    NewDocumentCommandinnpargsaux m m
    #1:,,mathopen#2%

    begindocument

    [
    E_1 = set* innerp5, j ; j in set1, cdots, n - set5
    ]

    [
    E_1 = set[Big] innerp5, j ; j in set1, cdots, n - set5
    ]

    enddocument


    enter image description here






    share|improve this answer
























      up vote
      3
      down vote













      I propose to define macros set and innerp with packages xparse and mathtools, using a simple syntax: setx;P(x) and innerpx,y.



      These commands have a starred version, which adds a pair of implicit left right in front of the delimiters and ensures a proper spacing. They also can have as an optional argument one of big, Big, bigg, Bigg, which similarly adds a pair of implicit bigl bigr, &c.



      documentclassarticle
      usepackage[utf8]inputenc

      usepackagexparse
      usepackagemathtools

      DeclarePairedDelimiterXset[1]setargs#1
      %%% Syntax: setx ; P(x))
      NewDocumentCommandsetargs>SplitArgument1;m
      setargsaux#1
      NewDocumentCommandsetargsauxmm
      IfNoValueTF#2#1nonscript,#1nonscript;delimsizevertnonscript:mathopen #2nonscript,

      DeclarePairedDelimiterXinnerp[1]langlerangleinnpargs#1
      %%% Syntax: innerpx,y
      NewDocumentCommandinnpargs >SplitArgument1,m
      innpargsaux#1
      NewDocumentCommandinnpargsaux m m
      #1:,,mathopen#2%

      begindocument

      [
      E_1 = set* innerp5, j ; j in set1, cdots, n - set5
      ]

      [
      E_1 = set[Big] innerp5, j ; j in set1, cdots, n - set5
      ]

      enddocument


      enter image description here






      share|improve this answer






















        up vote
        3
        down vote










        up vote
        3
        down vote









        I propose to define macros set and innerp with packages xparse and mathtools, using a simple syntax: setx;P(x) and innerpx,y.



        These commands have a starred version, which adds a pair of implicit left right in front of the delimiters and ensures a proper spacing. They also can have as an optional argument one of big, Big, bigg, Bigg, which similarly adds a pair of implicit bigl bigr, &c.



        documentclassarticle
        usepackage[utf8]inputenc

        usepackagexparse
        usepackagemathtools

        DeclarePairedDelimiterXset[1]setargs#1
        %%% Syntax: setx ; P(x))
        NewDocumentCommandsetargs>SplitArgument1;m
        setargsaux#1
        NewDocumentCommandsetargsauxmm
        IfNoValueTF#2#1nonscript,#1nonscript;delimsizevertnonscript:mathopen #2nonscript,

        DeclarePairedDelimiterXinnerp[1]langlerangleinnpargs#1
        %%% Syntax: innerpx,y
        NewDocumentCommandinnpargs >SplitArgument1,m
        innpargsaux#1
        NewDocumentCommandinnpargsaux m m
        #1:,,mathopen#2%

        begindocument

        [
        E_1 = set* innerp5, j ; j in set1, cdots, n - set5
        ]

        [
        E_1 = set[Big] innerp5, j ; j in set1, cdots, n - set5
        ]

        enddocument


        enter image description here






        share|improve this answer












        I propose to define macros set and innerp with packages xparse and mathtools, using a simple syntax: setx;P(x) and innerpx,y.



        These commands have a starred version, which adds a pair of implicit left right in front of the delimiters and ensures a proper spacing. They also can have as an optional argument one of big, Big, bigg, Bigg, which similarly adds a pair of implicit bigl bigr, &c.



        documentclassarticle
        usepackage[utf8]inputenc

        usepackagexparse
        usepackagemathtools

        DeclarePairedDelimiterXset[1]setargs#1
        %%% Syntax: setx ; P(x))
        NewDocumentCommandsetargs>SplitArgument1;m
        setargsaux#1
        NewDocumentCommandsetargsauxmm
        IfNoValueTF#2#1nonscript,#1nonscript;delimsizevertnonscript:mathopen #2nonscript,

        DeclarePairedDelimiterXinnerp[1]langlerangleinnpargs#1
        %%% Syntax: innerpx,y
        NewDocumentCommandinnpargs >SplitArgument1,m
        innpargsaux#1
        NewDocumentCommandinnpargsaux m m
        #1:,,mathopen#2%

        begindocument

        [
        E_1 = set* innerp5, j ; j in set1, cdots, n - set5
        ]

        [
        E_1 = set[Big] innerp5, j ; j in set1, cdots, n - set5
        ]

        enddocument


        enter image description here







        share|improve this answer












        share|improve this answer



        share|improve this answer










        answered Aug 31 at 12:53









        Bernard

        156k763189




        156k763189



























             

            draft saved


            draft discarded















































             


            draft saved


            draft discarded














            StackExchange.ready(
            function ()
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%2f448669%2fspace-around-vertical-bar-pipe%23new-answer', 'question_page');

            );

            Post as a guest













































































            Comments

            Popular posts from this blog

            What does second last employer means? [closed]

            List of Gilmore Girls characters

            Confectionery