Spacing setting of math modeCunning (La)TeX tricksHow is char processed in math mode?How do I disregard automatic spacing between characters in math mode?How to get less spacing in math modeMath mode: Spacing after SuperscriptsGlobally changing math line spacinglock spacing in math modeSetting a default horizontal spacing value for math modeHorizontal spacing in “align” modeAuto spacing in math modeSpacing around variables in math-modeDebugging - spacing in math mode

Getting an entry level IT position later in life

Write The Shortest Program To Check If A Binary Tree Is Balanced

Is an "are" omitted in this sentence

Based on what criteria do you add/not add icons to labels within a toolbar?

what can you do with Format View

Is there a way to say "double + any number" in German?

How to design an effective polearm-bow hybrid?

Are the related objects in an SOQL query shared?

I was contacted by a private bank overseas to get my inheritance

Why should I "believe in" weak solutions to PDEs?

Why does capacitance not depend on the material of the plates?

Why does putting a dot after the URL remove login information?

Pronouns when writing from the point of view of a robot

What is the right Bonferroni adjustment?

How does Rust's 128-bit integer `i128` work on a 64-bit system?

What license to choose for my PhD thesis?

Can attackers change the public key of certificate during the SSL handshake

What's "halachic" about "Esav hates Ya'akov"?

How to win against ants

Did Logical Positivism fail because it simply denied human emotion?

Is space radiation a risk for space film photography, and how is this prevented?

On the consistency of different well-polished astronomy software

What does "autolyco-sentimental" mean?

What is it exactly about flying a Flyboard across the English channel that made Zapata's thighs burn?



Spacing setting of math mode


Cunning (La)TeX tricksHow is char processed in math mode?How do I disregard automatic spacing between characters in math mode?How to get less spacing in math modeMath mode: Spacing after SuperscriptsGlobally changing math line spacinglock spacing in math modeSetting a default horizontal spacing value for math modeHorizontal spacing in “align” modeAuto spacing in math modeSpacing around variables in math-modeDebugging - spacing in math mode






.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty margin-bottom:0;








13















In typing of an article, I need to type many formulas like



$ left( a, b,c,d | e,f,g,h right) $.


Since they are too tight, I should add space using , command to obtain



$ left( a, , b, , c, , d | e, , f, , g, , h right) $.


But my problem is there are too many of such formulas. Is there any command which changes the default spacing between characters in the math mode?










share|improve this question


























  • [beginpmatrixa&b&c&d&e&f&g&hendpmatrix] (don't forget to add usepackageamsmath to the preamble) could be an option.

    – manooooh
    Jul 25 at 17:36


















13















In typing of an article, I need to type many formulas like



$ left( a, b,c,d | e,f,g,h right) $.


Since they are too tight, I should add space using , command to obtain



$ left( a, , b, , c, , d | e, , f, , g, , h right) $.


But my problem is there are too many of such formulas. Is there any command which changes the default spacing between characters in the math mode?










share|improve this question


























  • [beginpmatrixa&b&c&d&e&f&g&hendpmatrix] (don't forget to add usepackageamsmath to the preamble) could be an option.

    – manooooh
    Jul 25 at 17:36














13












13








13


1






In typing of an article, I need to type many formulas like



$ left( a, b,c,d | e,f,g,h right) $.


Since they are too tight, I should add space using , command to obtain



$ left( a, , b, , c, , d | e, , f, , g, , h right) $.


But my problem is there are too many of such formulas. Is there any command which changes the default spacing between characters in the math mode?










share|improve this question
















In typing of an article, I need to type many formulas like



$ left( a, b,c,d | e,f,g,h right) $.


Since they are too tight, I should add space using , command to obtain



$ left( a, , b, , c, , d | e, , f, , g, , h right) $.


But my problem is there are too many of such formulas. Is there any command which changes the default spacing between characters in the math mode?







math-mode spacing






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Jul 25 at 17:29









leandriis

17.6k1 gold badge11 silver badges37 bronze badges




17.6k1 gold badge11 silver badges37 bronze badges










asked Jul 25 at 17:20









HS8637HS8637

3291 silver badge7 bronze badges




3291 silver badge7 bronze badges















  • [beginpmatrixa&b&c&d&e&f&g&hendpmatrix] (don't forget to add usepackageamsmath to the preamble) could be an option.

    – manooooh
    Jul 25 at 17:36


















  • [beginpmatrixa&b&c&d&e&f&g&hendpmatrix] (don't forget to add usepackageamsmath to the preamble) could be an option.

    – manooooh
    Jul 25 at 17:36

















[beginpmatrixa&b&c&d&e&f&g&hendpmatrix] (don't forget to add usepackageamsmath to the preamble) could be an option.

– manooooh
Jul 25 at 17:36






[beginpmatrixa&b&c&d&e&f&g&hendpmatrix] (don't forget to add usepackageamsmath to the preamble) could be an option.

– manooooh
Jul 25 at 17:36











2 Answers
2






active

oldest

votes


















15














Assuming you don't need the thing in subscripts or superscripts, the easiest way is to exit from math mode, doubling the thinmuskip, reentering math mode, typesetting the lists and go back.



documentclassarticle
usepackageamsmath

newcommandcls[2]%
mathordmbox%
thinmuskip=2thinmuskip
$(#1mid#2)$%
%


begindocument

$( a, b,c,d mid e,f,g,h)$

$(a,, b,, c,, d mid e,, f,, g,, h)$

$clsa,b,c,de,f,g,h$

enddocument


enter image description here



A different solution that allows for resizing the parentheses as usual for commands defined with DeclarePairedDelimiter, see the examples. It also has a friendlier syntax.



documentclassarticle
usepackageamsmath
usepackagexparse

AtBeginDocumentmathchardefclscomma=mathcode`,

ExplSyntaxOn
NewDocumentCommandclssom

group_begin:
IfBooleanTF#1

hs_cls_auto:n #3


hs_cls_manual:nn #2 #3

group_end:


cs_new_protected:Nn hs_cls_auto:n

__hs_cls_activate_comma:
__hs_cls_activate_bar:n ;middlevert;
left( #1 right)


cs_new_protected:Nn hs_cls_manual:nn

__hs_cls_activate_comma:
__hs_cls_activate_bar:n __hs_cls_mid:n #1
__hs_cls_open:n #1 #2 __hs_cls_close:n #1


cs_new_protected:Nn __hs_cls_activate_comma:

char_set_active_eq:nN `, __hs_cls_comma:
mathcode`,="8000 scan_stop:


cs_new_protected:Nn __hs_cls_comma: clscomma,

cs_new_protected:Nn __hs_cls_activate_bar:n

cs_set_protected:Nn __hs_cls_bar: #1
char_set_active_eq:nN ` __hs_cls_bar:
mathcode`

cs_new_protected:Nn __hs_cls_open:n

tl_if_novalue:nTF #1 ( mathopen#1(

cs_new_protected:Nn __hs_cls_mid:n

tl_if_novalue:nTF #1 mid mathrel#1vert

cs_new_protected:Nn __hs_cls_close:n

tl_if_novalue:nTF #1 ) mathclose#1)

ExplSyntaxOff

begindocument

$( a, b,c,d mid e,f,g,h)$

$(a,, b,, c,, d mid e,, f,, g,, h)$

$clse,f,g,h$

$cls[Big]e,f,g,h$

$cls*dfraca2,b,c,d$

enddocument


enter image description here






share|improve this answer



























  • Thanks for your comments and answers but I need a more general command of thinmuskip=2thinmuskip

    – HS8637
    Jul 25 at 18:00











  • @HS8637 Why? A comma is followed by a thin space and , inserts another thin space; the thin space has width thinmuskip, so you get exactly the same output with my code and with ,, all around.

    – egreg
    Jul 25 at 18:18











  • Dear @egreg. You're right. But I need to change the setting of spacing, not an especial case.

    – HS8637
    Jul 25 at 18:21











  • @HS8637 Reread your question. Those are the formulas you mention. Changing in general the spacing after commas is not something I'd recommend.

    – egreg
    Jul 25 at 18:23











  • @egreg Thanks for adding the LaTeX3 code, it is full of little interesting things!

    – frougon
    Jul 25 at 20:38


















9














You can process each of the two lists (left and right) using etoolbox and a cunning delimiter trick:



enter image description here



documentclassarticle

usepackageetoolbox

% https://tex.stackexchange.com/a/89187/5764
newcommandprintlist[2][,]%
defitemdelimdefitemdelim#1% Item delimiter delayed by one cycle
renewcommand*do[1]itemdelim##1% How each item is processed
docsvlist#2% Process CSV list

makeatletter
def@LandR#1|#2relaxdefleftlist#1defrightlist#2%
defLandR#1, % Middle divider
edefxnoexpandprintlist[,,]rightlistx
right) % Right bracket

makeatother

begindocument

$left( a, b, c, d | e, f, g, h right)$

$LandR e, f, g, h$

enddocument


Each list is printed using printlist[,,], which adds a small space , after each delimiter ,. You can adjust the layout of the left/right bracket and middle divider.



If you wish to include larger constructions, you may need to use noexpand, as in



LandR f, g, h, noexpandfracij





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%2f501447%2fspacing-setting-of-math-mode%23new-answer', 'question_page');

    );

    Post as a guest















    Required, but never shown

























    2 Answers
    2






    active

    oldest

    votes








    2 Answers
    2






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes









    15














    Assuming you don't need the thing in subscripts or superscripts, the easiest way is to exit from math mode, doubling the thinmuskip, reentering math mode, typesetting the lists and go back.



    documentclassarticle
    usepackageamsmath

    newcommandcls[2]%
    mathordmbox%
    thinmuskip=2thinmuskip
    $(#1mid#2)$%
    %


    begindocument

    $( a, b,c,d mid e,f,g,h)$

    $(a,, b,, c,, d mid e,, f,, g,, h)$

    $clsa,b,c,de,f,g,h$

    enddocument


    enter image description here



    A different solution that allows for resizing the parentheses as usual for commands defined with DeclarePairedDelimiter, see the examples. It also has a friendlier syntax.



    documentclassarticle
    usepackageamsmath
    usepackagexparse

    AtBeginDocumentmathchardefclscomma=mathcode`,

    ExplSyntaxOn
    NewDocumentCommandclssom

    group_begin:
    IfBooleanTF#1

    hs_cls_auto:n #3


    hs_cls_manual:nn #2 #3

    group_end:


    cs_new_protected:Nn hs_cls_auto:n

    __hs_cls_activate_comma:
    __hs_cls_activate_bar:n ;middlevert;
    left( #1 right)


    cs_new_protected:Nn hs_cls_manual:nn

    __hs_cls_activate_comma:
    __hs_cls_activate_bar:n __hs_cls_mid:n #1
    __hs_cls_open:n #1 #2 __hs_cls_close:n #1


    cs_new_protected:Nn __hs_cls_activate_comma:

    char_set_active_eq:nN `, __hs_cls_comma:
    mathcode`,="8000 scan_stop:


    cs_new_protected:Nn __hs_cls_comma: clscomma,

    cs_new_protected:Nn __hs_cls_activate_bar:n

    cs_set_protected:Nn __hs_cls_bar: #1
    char_set_active_eq:nN ` __hs_cls_bar:
    mathcode`

    cs_new_protected:Nn __hs_cls_open:n

    tl_if_novalue:nTF #1 ( mathopen#1(

    cs_new_protected:Nn __hs_cls_mid:n

    tl_if_novalue:nTF #1 mid mathrel#1vert

    cs_new_protected:Nn __hs_cls_close:n

    tl_if_novalue:nTF #1 ) mathclose#1)

    ExplSyntaxOff

    begindocument

    $( a, b,c,d mid e,f,g,h)$

    $(a,, b,, c,, d mid e,, f,, g,, h)$

    $clse,f,g,h$

    $cls[Big]e,f,g,h$

    $cls*dfraca2,b,c,d$

    enddocument


    enter image description here






    share|improve this answer



























    • Thanks for your comments and answers but I need a more general command of thinmuskip=2thinmuskip

      – HS8637
      Jul 25 at 18:00











    • @HS8637 Why? A comma is followed by a thin space and , inserts another thin space; the thin space has width thinmuskip, so you get exactly the same output with my code and with ,, all around.

      – egreg
      Jul 25 at 18:18











    • Dear @egreg. You're right. But I need to change the setting of spacing, not an especial case.

      – HS8637
      Jul 25 at 18:21











    • @HS8637 Reread your question. Those are the formulas you mention. Changing in general the spacing after commas is not something I'd recommend.

      – egreg
      Jul 25 at 18:23











    • @egreg Thanks for adding the LaTeX3 code, it is full of little interesting things!

      – frougon
      Jul 25 at 20:38















    15














    Assuming you don't need the thing in subscripts or superscripts, the easiest way is to exit from math mode, doubling the thinmuskip, reentering math mode, typesetting the lists and go back.



    documentclassarticle
    usepackageamsmath

    newcommandcls[2]%
    mathordmbox%
    thinmuskip=2thinmuskip
    $(#1mid#2)$%
    %


    begindocument

    $( a, b,c,d mid e,f,g,h)$

    $(a,, b,, c,, d mid e,, f,, g,, h)$

    $clsa,b,c,de,f,g,h$

    enddocument


    enter image description here



    A different solution that allows for resizing the parentheses as usual for commands defined with DeclarePairedDelimiter, see the examples. It also has a friendlier syntax.



    documentclassarticle
    usepackageamsmath
    usepackagexparse

    AtBeginDocumentmathchardefclscomma=mathcode`,

    ExplSyntaxOn
    NewDocumentCommandclssom

    group_begin:
    IfBooleanTF#1

    hs_cls_auto:n #3


    hs_cls_manual:nn #2 #3

    group_end:


    cs_new_protected:Nn hs_cls_auto:n

    __hs_cls_activate_comma:
    __hs_cls_activate_bar:n ;middlevert;
    left( #1 right)


    cs_new_protected:Nn hs_cls_manual:nn

    __hs_cls_activate_comma:
    __hs_cls_activate_bar:n __hs_cls_mid:n #1
    __hs_cls_open:n #1 #2 __hs_cls_close:n #1


    cs_new_protected:Nn __hs_cls_activate_comma:

    char_set_active_eq:nN `, __hs_cls_comma:
    mathcode`,="8000 scan_stop:


    cs_new_protected:Nn __hs_cls_comma: clscomma,

    cs_new_protected:Nn __hs_cls_activate_bar:n

    cs_set_protected:Nn __hs_cls_bar: #1
    char_set_active_eq:nN ` __hs_cls_bar:
    mathcode`

    cs_new_protected:Nn __hs_cls_open:n

    tl_if_novalue:nTF #1 ( mathopen#1(

    cs_new_protected:Nn __hs_cls_mid:n

    tl_if_novalue:nTF #1 mid mathrel#1vert

    cs_new_protected:Nn __hs_cls_close:n

    tl_if_novalue:nTF #1 ) mathclose#1)

    ExplSyntaxOff

    begindocument

    $( a, b,c,d mid e,f,g,h)$

    $(a,, b,, c,, d mid e,, f,, g,, h)$

    $clse,f,g,h$

    $cls[Big]e,f,g,h$

    $cls*dfraca2,b,c,d$

    enddocument


    enter image description here






    share|improve this answer



























    • Thanks for your comments and answers but I need a more general command of thinmuskip=2thinmuskip

      – HS8637
      Jul 25 at 18:00











    • @HS8637 Why? A comma is followed by a thin space and , inserts another thin space; the thin space has width thinmuskip, so you get exactly the same output with my code and with ,, all around.

      – egreg
      Jul 25 at 18:18











    • Dear @egreg. You're right. But I need to change the setting of spacing, not an especial case.

      – HS8637
      Jul 25 at 18:21











    • @HS8637 Reread your question. Those are the formulas you mention. Changing in general the spacing after commas is not something I'd recommend.

      – egreg
      Jul 25 at 18:23











    • @egreg Thanks for adding the LaTeX3 code, it is full of little interesting things!

      – frougon
      Jul 25 at 20:38













    15












    15








    15







    Assuming you don't need the thing in subscripts or superscripts, the easiest way is to exit from math mode, doubling the thinmuskip, reentering math mode, typesetting the lists and go back.



    documentclassarticle
    usepackageamsmath

    newcommandcls[2]%
    mathordmbox%
    thinmuskip=2thinmuskip
    $(#1mid#2)$%
    %


    begindocument

    $( a, b,c,d mid e,f,g,h)$

    $(a,, b,, c,, d mid e,, f,, g,, h)$

    $clsa,b,c,de,f,g,h$

    enddocument


    enter image description here



    A different solution that allows for resizing the parentheses as usual for commands defined with DeclarePairedDelimiter, see the examples. It also has a friendlier syntax.



    documentclassarticle
    usepackageamsmath
    usepackagexparse

    AtBeginDocumentmathchardefclscomma=mathcode`,

    ExplSyntaxOn
    NewDocumentCommandclssom

    group_begin:
    IfBooleanTF#1

    hs_cls_auto:n #3


    hs_cls_manual:nn #2 #3

    group_end:


    cs_new_protected:Nn hs_cls_auto:n

    __hs_cls_activate_comma:
    __hs_cls_activate_bar:n ;middlevert;
    left( #1 right)


    cs_new_protected:Nn hs_cls_manual:nn

    __hs_cls_activate_comma:
    __hs_cls_activate_bar:n __hs_cls_mid:n #1
    __hs_cls_open:n #1 #2 __hs_cls_close:n #1


    cs_new_protected:Nn __hs_cls_activate_comma:

    char_set_active_eq:nN `, __hs_cls_comma:
    mathcode`,="8000 scan_stop:


    cs_new_protected:Nn __hs_cls_comma: clscomma,

    cs_new_protected:Nn __hs_cls_activate_bar:n

    cs_set_protected:Nn __hs_cls_bar: #1
    char_set_active_eq:nN ` __hs_cls_bar:
    mathcode`

    cs_new_protected:Nn __hs_cls_open:n

    tl_if_novalue:nTF #1 ( mathopen#1(

    cs_new_protected:Nn __hs_cls_mid:n

    tl_if_novalue:nTF #1 mid mathrel#1vert

    cs_new_protected:Nn __hs_cls_close:n

    tl_if_novalue:nTF #1 ) mathclose#1)

    ExplSyntaxOff

    begindocument

    $( a, b,c,d mid e,f,g,h)$

    $(a,, b,, c,, d mid e,, f,, g,, h)$

    $clse,f,g,h$

    $cls[Big]e,f,g,h$

    $cls*dfraca2,b,c,d$

    enddocument


    enter image description here






    share|improve this answer















    Assuming you don't need the thing in subscripts or superscripts, the easiest way is to exit from math mode, doubling the thinmuskip, reentering math mode, typesetting the lists and go back.



    documentclassarticle
    usepackageamsmath

    newcommandcls[2]%
    mathordmbox%
    thinmuskip=2thinmuskip
    $(#1mid#2)$%
    %


    begindocument

    $( a, b,c,d mid e,f,g,h)$

    $(a,, b,, c,, d mid e,, f,, g,, h)$

    $clsa,b,c,de,f,g,h$

    enddocument


    enter image description here



    A different solution that allows for resizing the parentheses as usual for commands defined with DeclarePairedDelimiter, see the examples. It also has a friendlier syntax.



    documentclassarticle
    usepackageamsmath
    usepackagexparse

    AtBeginDocumentmathchardefclscomma=mathcode`,

    ExplSyntaxOn
    NewDocumentCommandclssom

    group_begin:
    IfBooleanTF#1

    hs_cls_auto:n #3


    hs_cls_manual:nn #2 #3

    group_end:


    cs_new_protected:Nn hs_cls_auto:n

    __hs_cls_activate_comma:
    __hs_cls_activate_bar:n ;middlevert;
    left( #1 right)


    cs_new_protected:Nn hs_cls_manual:nn

    __hs_cls_activate_comma:
    __hs_cls_activate_bar:n __hs_cls_mid:n #1
    __hs_cls_open:n #1 #2 __hs_cls_close:n #1


    cs_new_protected:Nn __hs_cls_activate_comma:

    char_set_active_eq:nN `, __hs_cls_comma:
    mathcode`,="8000 scan_stop:


    cs_new_protected:Nn __hs_cls_comma: clscomma,

    cs_new_protected:Nn __hs_cls_activate_bar:n

    cs_set_protected:Nn __hs_cls_bar: #1
    char_set_active_eq:nN ` __hs_cls_bar:
    mathcode`

    cs_new_protected:Nn __hs_cls_open:n

    tl_if_novalue:nTF #1 ( mathopen#1(

    cs_new_protected:Nn __hs_cls_mid:n

    tl_if_novalue:nTF #1 mid mathrel#1vert

    cs_new_protected:Nn __hs_cls_close:n

    tl_if_novalue:nTF #1 ) mathclose#1)

    ExplSyntaxOff

    begindocument

    $( a, b,c,d mid e,f,g,h)$

    $(a,, b,, c,, d mid e,, f,, g,, h)$

    $clse,f,g,h$

    $cls[Big]e,f,g,h$

    $cls*dfraca2,b,c,d$

    enddocument


    enter image description here







    share|improve this answer














    share|improve this answer



    share|improve this answer








    edited Jul 25 at 18:22

























    answered Jul 25 at 17:35









    egregegreg

    760k90 gold badges1986 silver badges3334 bronze badges




    760k90 gold badges1986 silver badges3334 bronze badges















    • Thanks for your comments and answers but I need a more general command of thinmuskip=2thinmuskip

      – HS8637
      Jul 25 at 18:00











    • @HS8637 Why? A comma is followed by a thin space and , inserts another thin space; the thin space has width thinmuskip, so you get exactly the same output with my code and with ,, all around.

      – egreg
      Jul 25 at 18:18











    • Dear @egreg. You're right. But I need to change the setting of spacing, not an especial case.

      – HS8637
      Jul 25 at 18:21











    • @HS8637 Reread your question. Those are the formulas you mention. Changing in general the spacing after commas is not something I'd recommend.

      – egreg
      Jul 25 at 18:23











    • @egreg Thanks for adding the LaTeX3 code, it is full of little interesting things!

      – frougon
      Jul 25 at 20:38

















    • Thanks for your comments and answers but I need a more general command of thinmuskip=2thinmuskip

      – HS8637
      Jul 25 at 18:00











    • @HS8637 Why? A comma is followed by a thin space and , inserts another thin space; the thin space has width thinmuskip, so you get exactly the same output with my code and with ,, all around.

      – egreg
      Jul 25 at 18:18











    • Dear @egreg. You're right. But I need to change the setting of spacing, not an especial case.

      – HS8637
      Jul 25 at 18:21











    • @HS8637 Reread your question. Those are the formulas you mention. Changing in general the spacing after commas is not something I'd recommend.

      – egreg
      Jul 25 at 18:23











    • @egreg Thanks for adding the LaTeX3 code, it is full of little interesting things!

      – frougon
      Jul 25 at 20:38
















    Thanks for your comments and answers but I need a more general command of thinmuskip=2thinmuskip

    – HS8637
    Jul 25 at 18:00





    Thanks for your comments and answers but I need a more general command of thinmuskip=2thinmuskip

    – HS8637
    Jul 25 at 18:00













    @HS8637 Why? A comma is followed by a thin space and , inserts another thin space; the thin space has width thinmuskip, so you get exactly the same output with my code and with ,, all around.

    – egreg
    Jul 25 at 18:18





    @HS8637 Why? A comma is followed by a thin space and , inserts another thin space; the thin space has width thinmuskip, so you get exactly the same output with my code and with ,, all around.

    – egreg
    Jul 25 at 18:18













    Dear @egreg. You're right. But I need to change the setting of spacing, not an especial case.

    – HS8637
    Jul 25 at 18:21





    Dear @egreg. You're right. But I need to change the setting of spacing, not an especial case.

    – HS8637
    Jul 25 at 18:21













    @HS8637 Reread your question. Those are the formulas you mention. Changing in general the spacing after commas is not something I'd recommend.

    – egreg
    Jul 25 at 18:23





    @HS8637 Reread your question. Those are the formulas you mention. Changing in general the spacing after commas is not something I'd recommend.

    – egreg
    Jul 25 at 18:23













    @egreg Thanks for adding the LaTeX3 code, it is full of little interesting things!

    – frougon
    Jul 25 at 20:38





    @egreg Thanks for adding the LaTeX3 code, it is full of little interesting things!

    – frougon
    Jul 25 at 20:38













    9














    You can process each of the two lists (left and right) using etoolbox and a cunning delimiter trick:



    enter image description here



    documentclassarticle

    usepackageetoolbox

    % https://tex.stackexchange.com/a/89187/5764
    newcommandprintlist[2][,]%
    defitemdelimdefitemdelim#1% Item delimiter delayed by one cycle
    renewcommand*do[1]itemdelim##1% How each item is processed
    docsvlist#2% Process CSV list

    makeatletter
    def@LandR#1|#2relaxdefleftlist#1defrightlist#2%
    defLandR#1, % Middle divider
    edefxnoexpandprintlist[,,]rightlistx
    right) % Right bracket

    makeatother

    begindocument

    $left( a, b, c, d | e, f, g, h right)$

    $LandR e, f, g, h$

    enddocument


    Each list is printed using printlist[,,], which adds a small space , after each delimiter ,. You can adjust the layout of the left/right bracket and middle divider.



    If you wish to include larger constructions, you may need to use noexpand, as in



    LandR f, g, h, noexpandfracij





    share|improve this answer































      9














      You can process each of the two lists (left and right) using etoolbox and a cunning delimiter trick:



      enter image description here



      documentclassarticle

      usepackageetoolbox

      % https://tex.stackexchange.com/a/89187/5764
      newcommandprintlist[2][,]%
      defitemdelimdefitemdelim#1% Item delimiter delayed by one cycle
      renewcommand*do[1]itemdelim##1% How each item is processed
      docsvlist#2% Process CSV list

      makeatletter
      def@LandR#1|#2relaxdefleftlist#1defrightlist#2%
      defLandR#1, % Middle divider
      edefxnoexpandprintlist[,,]rightlistx
      right) % Right bracket

      makeatother

      begindocument

      $left( a, b, c, d | e, f, g, h right)$

      $LandR e, f, g, h$

      enddocument


      Each list is printed using printlist[,,], which adds a small space , after each delimiter ,. You can adjust the layout of the left/right bracket and middle divider.



      If you wish to include larger constructions, you may need to use noexpand, as in



      LandR f, g, h, noexpandfracij





      share|improve this answer





























        9












        9








        9







        You can process each of the two lists (left and right) using etoolbox and a cunning delimiter trick:



        enter image description here



        documentclassarticle

        usepackageetoolbox

        % https://tex.stackexchange.com/a/89187/5764
        newcommandprintlist[2][,]%
        defitemdelimdefitemdelim#1% Item delimiter delayed by one cycle
        renewcommand*do[1]itemdelim##1% How each item is processed
        docsvlist#2% Process CSV list

        makeatletter
        def@LandR#1|#2relaxdefleftlist#1defrightlist#2%
        defLandR#1, % Middle divider
        edefxnoexpandprintlist[,,]rightlistx
        right) % Right bracket

        makeatother

        begindocument

        $left( a, b, c, d | e, f, g, h right)$

        $LandR e, f, g, h$

        enddocument


        Each list is printed using printlist[,,], which adds a small space , after each delimiter ,. You can adjust the layout of the left/right bracket and middle divider.



        If you wish to include larger constructions, you may need to use noexpand, as in



        LandR f, g, h, noexpandfracij





        share|improve this answer















        You can process each of the two lists (left and right) using etoolbox and a cunning delimiter trick:



        enter image description here



        documentclassarticle

        usepackageetoolbox

        % https://tex.stackexchange.com/a/89187/5764
        newcommandprintlist[2][,]%
        defitemdelimdefitemdelim#1% Item delimiter delayed by one cycle
        renewcommand*do[1]itemdelim##1% How each item is processed
        docsvlist#2% Process CSV list

        makeatletter
        def@LandR#1|#2relaxdefleftlist#1defrightlist#2%
        defLandR#1, % Middle divider
        edefxnoexpandprintlist[,,]rightlistx
        right) % Right bracket

        makeatother

        begindocument

        $left( a, b, c, d | e, f, g, h right)$

        $LandR e, f, g, h$

        enddocument


        Each list is printed using printlist[,,], which adds a small space , after each delimiter ,. You can adjust the layout of the left/right bracket and middle divider.



        If you wish to include larger constructions, you may need to use noexpand, as in



        LandR f, g, h, noexpandfracij






        share|improve this answer














        share|improve this answer



        share|improve this answer








        edited Jul 26 at 0:26

























        answered Jul 25 at 17:53









        WernerWerner

        459k76 gold badges1025 silver badges1764 bronze badges




        459k76 gold badges1025 silver badges1764 bronze badges






























            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%2f501447%2fspacing-setting-of-math-mode%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

            Category:9 (number) SubcategoriesMedia in category "9 (number)"Navigation menuUpload mediaGND ID: 4485639-8Library of Congress authority ID: sh85091979ReasonatorScholiaStatistics

            Circuit construction for execution of conditional statements using least significant bitHow are two different registers being used as “control”?How exactly is the stated composite state of the two registers being produced using the $R_zz$ controlled rotations?Efficiently performing controlled rotations in HHLWould this quantum algorithm implementation work?How to prepare a superposed states of odd integers from $1$ to $sqrtN$?Why is this implementation of the order finding algorithm not working?Circuit construction for Hamiltonian simulationHow can I invert the least significant bit of a certain term of a superposed state?Implementing an oracleImplementing a controlled sum operation

            Magento 2 “No Payment Methods” in Admin New OrderHow to integrate Paypal Express Checkout with the Magento APIMagento 1.5 - Sales > Order > edit order and shipping methods disappearAuto Invoice Check/Money Order Payment methodAdd more simple payment methods?Shipping methods not showingWhat should I do to change payment methods if changing the configuration has no effects?1.9 - No Payment Methods showing upMy Payment Methods not Showing for downloadable/virtual product when checkout?Magento2 API to access internal payment methodHow to call an existing payment methods in the registration form?