Allowing line break at ',' in inline math mode?











up vote
99
down vote

favorite
34












In the inline math mode ($...$), if the formula is too long, LaTeX will try to break it on operators, e.g.



very long text followed by a very long equation like $a+b+c+d+e+f+g+h+i+j+k+l$ etc


may be rendered as



very long text followed
by a very long equation
like a+b+c+d+e+f+g+h+i+
j+k+l etc


However, the break won't happen if they are separated by commas, e.g.



very long text followed by a very long equation like $a,b,c,d,e,f,g,h,i,j,k,l$ etc


will overflow the page like



very long text followed
by a very long equation
like a,b,c,d,e,f,g,h,i,j,k,l
etc


How to make LaTeX able to insert line breaks after a comma too?










share|improve this question






















  • I tried breqn but it uses "expl3.sty" which can not be found by Latex ALTHOUGH I downloaded it and put in the same folder where breqn.sty exists!
    – Ahmad
    Jan 8 '11 at 22:09










  • @Ahmad: If you've got a question, then you should ask it in a new post. Please do this with the "Ask Question" link. In your new question you could link to this one.
    – Hendrik Vogt
    Jan 8 '11 at 22:09












  • @Ahmad: Just a note to confirm Hendrik's comment, this ought to be reposted as a question for you to get the best chance of it being answered.
    – Loop Space
    Jan 8 '11 at 22:09












  • Late to the party, but just for the record: You can make the comma be treated like a binary or relation operator with the commands mathbin{,} or mathrel{,}. For instance, $stuff mathrel{,} morestuff$ will allow the linebreak between the two stuffs.
    – phfaist
    Dec 4 '17 at 22:27















up vote
99
down vote

favorite
34












In the inline math mode ($...$), if the formula is too long, LaTeX will try to break it on operators, e.g.



very long text followed by a very long equation like $a+b+c+d+e+f+g+h+i+j+k+l$ etc


may be rendered as



very long text followed
by a very long equation
like a+b+c+d+e+f+g+h+i+
j+k+l etc


However, the break won't happen if they are separated by commas, e.g.



very long text followed by a very long equation like $a,b,c,d,e,f,g,h,i,j,k,l$ etc


will overflow the page like



very long text followed
by a very long equation
like a,b,c,d,e,f,g,h,i,j,k,l
etc


How to make LaTeX able to insert line breaks after a comma too?










share|improve this question






















  • I tried breqn but it uses "expl3.sty" which can not be found by Latex ALTHOUGH I downloaded it and put in the same folder where breqn.sty exists!
    – Ahmad
    Jan 8 '11 at 22:09










  • @Ahmad: If you've got a question, then you should ask it in a new post. Please do this with the "Ask Question" link. In your new question you could link to this one.
    – Hendrik Vogt
    Jan 8 '11 at 22:09












  • @Ahmad: Just a note to confirm Hendrik's comment, this ought to be reposted as a question for you to get the best chance of it being answered.
    – Loop Space
    Jan 8 '11 at 22:09












  • Late to the party, but just for the record: You can make the comma be treated like a binary or relation operator with the commands mathbin{,} or mathrel{,}. For instance, $stuff mathrel{,} morestuff$ will allow the linebreak between the two stuffs.
    – phfaist
    Dec 4 '17 at 22:27













up vote
99
down vote

favorite
34









up vote
99
down vote

favorite
34






34





In the inline math mode ($...$), if the formula is too long, LaTeX will try to break it on operators, e.g.



very long text followed by a very long equation like $a+b+c+d+e+f+g+h+i+j+k+l$ etc


may be rendered as



very long text followed
by a very long equation
like a+b+c+d+e+f+g+h+i+
j+k+l etc


However, the break won't happen if they are separated by commas, e.g.



very long text followed by a very long equation like $a,b,c,d,e,f,g,h,i,j,k,l$ etc


will overflow the page like



very long text followed
by a very long equation
like a,b,c,d,e,f,g,h,i,j,k,l
etc


How to make LaTeX able to insert line breaks after a comma too?










share|improve this question













In the inline math mode ($...$), if the formula is too long, LaTeX will try to break it on operators, e.g.



very long text followed by a very long equation like $a+b+c+d+e+f+g+h+i+j+k+l$ etc


may be rendered as



very long text followed
by a very long equation
like a+b+c+d+e+f+g+h+i+
j+k+l etc


However, the break won't happen if they are separated by commas, e.g.



very long text followed by a very long equation like $a,b,c,d,e,f,g,h,i,j,k,l$ etc


will overflow the page like



very long text followed
by a very long equation
like a,b,c,d,e,f,g,h,i,j,k,l
etc


How to make LaTeX able to insert line breaks after a comma too?







math-mode line-breaking






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked Aug 18 '10 at 15:22









kennytm

3,18242118




3,18242118












  • I tried breqn but it uses "expl3.sty" which can not be found by Latex ALTHOUGH I downloaded it and put in the same folder where breqn.sty exists!
    – Ahmad
    Jan 8 '11 at 22:09










  • @Ahmad: If you've got a question, then you should ask it in a new post. Please do this with the "Ask Question" link. In your new question you could link to this one.
    – Hendrik Vogt
    Jan 8 '11 at 22:09












  • @Ahmad: Just a note to confirm Hendrik's comment, this ought to be reposted as a question for you to get the best chance of it being answered.
    – Loop Space
    Jan 8 '11 at 22:09












  • Late to the party, but just for the record: You can make the comma be treated like a binary or relation operator with the commands mathbin{,} or mathrel{,}. For instance, $stuff mathrel{,} morestuff$ will allow the linebreak between the two stuffs.
    – phfaist
    Dec 4 '17 at 22:27


















  • I tried breqn but it uses "expl3.sty" which can not be found by Latex ALTHOUGH I downloaded it and put in the same folder where breqn.sty exists!
    – Ahmad
    Jan 8 '11 at 22:09










  • @Ahmad: If you've got a question, then you should ask it in a new post. Please do this with the "Ask Question" link. In your new question you could link to this one.
    – Hendrik Vogt
    Jan 8 '11 at 22:09












  • @Ahmad: Just a note to confirm Hendrik's comment, this ought to be reposted as a question for you to get the best chance of it being answered.
    – Loop Space
    Jan 8 '11 at 22:09












  • Late to the party, but just for the record: You can make the comma be treated like a binary or relation operator with the commands mathbin{,} or mathrel{,}. For instance, $stuff mathrel{,} morestuff$ will allow the linebreak between the two stuffs.
    – phfaist
    Dec 4 '17 at 22:27
















I tried breqn but it uses "expl3.sty" which can not be found by Latex ALTHOUGH I downloaded it and put in the same folder where breqn.sty exists!
– Ahmad
Jan 8 '11 at 22:09




I tried breqn but it uses "expl3.sty" which can not be found by Latex ALTHOUGH I downloaded it and put in the same folder where breqn.sty exists!
– Ahmad
Jan 8 '11 at 22:09












@Ahmad: If you've got a question, then you should ask it in a new post. Please do this with the "Ask Question" link. In your new question you could link to this one.
– Hendrik Vogt
Jan 8 '11 at 22:09






@Ahmad: If you've got a question, then you should ask it in a new post. Please do this with the "Ask Question" link. In your new question you could link to this one.
– Hendrik Vogt
Jan 8 '11 at 22:09














@Ahmad: Just a note to confirm Hendrik's comment, this ought to be reposted as a question for you to get the best chance of it being answered.
– Loop Space
Jan 8 '11 at 22:09






@Ahmad: Just a note to confirm Hendrik's comment, this ought to be reposted as a question for you to get the best chance of it being answered.
– Loop Space
Jan 8 '11 at 22:09














Late to the party, but just for the record: You can make the comma be treated like a binary or relation operator with the commands mathbin{,} or mathrel{,}. For instance, $stuff mathrel{,} morestuff$ will allow the linebreak between the two stuffs.
– phfaist
Dec 4 '17 at 22:27




Late to the party, but just for the record: You can make the comma be treated like a binary or relation operator with the commands mathbin{,} or mathrel{,}. For instance, $stuff mathrel{,} morestuff$ will allow the linebreak between the two stuffs.
– phfaist
Dec 4 '17 at 22:27










6 Answers
6






active

oldest

votes

















up vote
86
down vote



accepted










If the expression contains many commas then consider to break it into several math expressions, separated by commas. It reads like a list of math expressions. This way TeX can break the line.



To achieve line breaks after a comma, you could insert allowbreak after the comma and before the next math symbol. If necessary, leave a blank after allowbreak.



If you would like to have a document wide solution, you could redefine the comma. One solution, following the tip here would be:



makeatletter
defold@comma{,}
catcode`,=13
def,{%
ifmmode%
old@commadiscretionary{}{}{}%
else%
old@comma%
fi%
}
makeatother





share|improve this answer



















  • 4




    Thanks. My expression is actually a set with 48 elements, so splitting them into several expressions may not sound mathematically logical. I will try allowbreak.
    – kennytm
    Aug 18 '10 at 15:50










  • +1, excellent answer! However, there's a complication: Please see tex.stackexchange.com/q/19094/1347.
    – M.S. Dousti
    May 26 '11 at 9:51






  • 5




    Note that the allowbreak solution does not work if you have left...right delimiters that span the break in your equation
    – Mosby
    Jan 7 '16 at 15:45






  • 1




    Any trick for allowbreak working in left...right delimiters?
    – loved.by.Jesus
    Mar 21 '17 at 15:29










  • This document-wide solution seems to break tikz...
    – xuhdev
    Aug 13 '17 at 4:22


















up vote
36
down vote













You could take a look at the breqn package, which is aimed at solving this problem in a general sense.






share|improve this answer

















  • 9




    Wow, breqn allows left and right to work across line breaks!
    – Mark Meckes
    Aug 18 '10 at 17:13






  • 7




    Indeed, amongst other things. The late Michael Downes was a very clever guy!
    – Joseph Wright
    Aug 18 '10 at 18:02












  • For commas, this does not work with all types of atoms. See the discussion here.
    – Ruben Verborgh
    Apr 26 '15 at 12:47


















up vote
13
down vote













Here is a solution that doesn't make the comma globally active:



documentclass{article}

newcommand{splitatcommas}[1]{%
begingroup
begingrouplccode`~=`, lowercase{endgroup
edef~{mathcharthemathcode`, penalty0 noexpandhspace{0pt plus 1em}}%
}mathcode`,="8000 #1%
endgroup
}

begin{document}

setlength{lineskiplimit}{2pt}setlength{lineskip}{3pt} % for this particular case

$splitatcommas{
frac{1}{2},frac{3}{5},frac{8}{13},frac{21}{34},frac{55}{89},
frac{144}{233},frac{377}{610},frac{987}{1597},frac{2584}{4181},
frac{6765}{10946},frac{17711}{28657},frac{46368}{75025},
frac{121393}{196418},frac{317811}{514229},frac{832040}{1346269},
frac{2178309}{3524578},frac{5702887}{9227465},
frac{14930352}{24157817},frac{39088169}{63245986},frac{102334155}{165580141}
}$

end{document}


The setting of lineskiplimit and lineskip are for the particular case where fractions are needed in the argument.



enter image description here



A variant that allows nesting:



documentclass{article}

newcommand{splitatcommas}[1]{%
begingroup
ifnummathcode`,="8000
else
begingrouplccode`~=`, lowercase{endgroup
edef~{mathcharthemathcode`, penalty0 noexpandhspace{0pt plus 1em}}%
}mathcode`,="8000
fi
#1%
endgroup
}

newcommand{tuple}[1]{(splitatcommas{#1})}
newcommand{set}[1]{{splitatcommas{#1}}}

begin{document}

setlength{lineskiplimit}{2pt}setlength{lineskip}{3pt} % for this particular case

$splitatcommas{
frac{1}{2},frac{3}{5},frac{8}{13},frac{21}{34},frac{55}{89},
frac{144}{233},frac{377}{610},frac{987}{1597},frac{2584}{4181},
frac{6765}{10946},frac{17711}{28657},frac{46368}{75025},
frac{121393}{196418},frac{317811}{514229},frac{832040}{1346269},
frac{2178309}{3524578},frac{5702887}{9227465},
frac{14930352}{24157817},frac{39088169}{63245986},frac{102334155}{165580141}
}$

$set{
tuple{a,b,c,d},tuple{1,2,3,4,5,6},tuple{11,22,33,44,55,66,77,88},
tuple{a,b,c,d},tuple{1,2,3,4,5,6},tuple{11,22,33,44,55,66,77,88},
tuple{a,b,c,d},tuple{1,2,3,4,5,6},tuple{11,22,33,44,55,66,77,88},
tuple{a,b,c,d},tuple{1,2,3,4,5,6},tuple{11,22,33,44,55,66,77,88}
}$

end{document}


enter image description here






share|improve this answer























  • @Nasser With breqn this is guaranteed not to work. Probably something can be done, I'll work on your problem later.
    – egreg
    May 14 '16 at 16:59










  • Did you manage to find the workaround for breqn?
    – azetina
    Jul 13 '16 at 13:51






  • 1




    @azetina I don't consider breqn a usable piece of software.
    – egreg
    Jul 13 '16 at 14:15










  • @egreg Nice solution! But if I do nesting like splitatcommas{a , b,splitatcommas{c, d} I’m getting errors like ! Bad mathchar (32768). Do you have any idea to fix this?
    – Ronny
    Jan 7 at 23:02






  • 1




    @Ronny Added the variant
    – egreg
    Jan 8 at 13:46


















up vote
0
down vote













If you can split the equation into several sub equation using $, and if you are using braces use left. and right. (with dot) to balance the braces.



Example:



 $X = left{right.a$, $b$, $c$, $dleft.right}$


X = { a, b, c, d }



This should allow line breaks behind the commas.






share|improve this answer

















  • 10




    You might as well just omit left and right. Putting the matching brace directly adjacent obviates any point to having scaling braces at all.
    – Kundor
    Mar 15 '14 at 18:36










  • disregarding the pointless left and right commands, ;) it is a quick workaround.
    – loved.by.Jesus
    Jun 6 '16 at 10:39


















up vote
0
down vote













In luatex you have a new possibility that does not involve active characters, you can declare , to be a mathbin (like +) so that line breaking is allowed and then set the mathord-mathbin spacing to zero so it gets no space before, like punctuation:



enter image description here



documentclass{article}

begin{document}

$
mathcode`,="213B % mathbin
Umathordbinspacingtextstyle 0mu % no space before
a,a,a,a,a,a,a,a,a,a,a,a,a,a,a,a,a,a,a,a,a,a,a,a,a,a,a,a,a,a,a,a,a,
a,a,a,a,a,a,a,a,a,a,a,a,a,a,a,a,a,a,a,a,a,a,a,a,a,a,a,a,a,a,a,a,a$
end{document}





share|improve this answer




























    up vote
    0
    down vote













    Just try inserting allowbreak in between your inline equations.



    $x_1, x_2,...allowbreak, y_1,y_2,y_n$.
    The line won't reach out and break at before y_1






    share|improve this answer



















    • 1




      Welcome ! Could you please expand your answer a bit, with a small example for instance ?
      – BambOo
      Nov 5 at 15:38











    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: 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%2f1959%2fallowing-line-break-at-in-inline-math-mode%23new-answer', 'question_page');
    }
    );

    Post as a guest















    Required, but never shown

























    6 Answers
    6






    active

    oldest

    votes








    6 Answers
    6






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes








    up vote
    86
    down vote



    accepted










    If the expression contains many commas then consider to break it into several math expressions, separated by commas. It reads like a list of math expressions. This way TeX can break the line.



    To achieve line breaks after a comma, you could insert allowbreak after the comma and before the next math symbol. If necessary, leave a blank after allowbreak.



    If you would like to have a document wide solution, you could redefine the comma. One solution, following the tip here would be:



    makeatletter
    defold@comma{,}
    catcode`,=13
    def,{%
    ifmmode%
    old@commadiscretionary{}{}{}%
    else%
    old@comma%
    fi%
    }
    makeatother





    share|improve this answer



















    • 4




      Thanks. My expression is actually a set with 48 elements, so splitting them into several expressions may not sound mathematically logical. I will try allowbreak.
      – kennytm
      Aug 18 '10 at 15:50










    • +1, excellent answer! However, there's a complication: Please see tex.stackexchange.com/q/19094/1347.
      – M.S. Dousti
      May 26 '11 at 9:51






    • 5




      Note that the allowbreak solution does not work if you have left...right delimiters that span the break in your equation
      – Mosby
      Jan 7 '16 at 15:45






    • 1




      Any trick for allowbreak working in left...right delimiters?
      – loved.by.Jesus
      Mar 21 '17 at 15:29










    • This document-wide solution seems to break tikz...
      – xuhdev
      Aug 13 '17 at 4:22















    up vote
    86
    down vote



    accepted










    If the expression contains many commas then consider to break it into several math expressions, separated by commas. It reads like a list of math expressions. This way TeX can break the line.



    To achieve line breaks after a comma, you could insert allowbreak after the comma and before the next math symbol. If necessary, leave a blank after allowbreak.



    If you would like to have a document wide solution, you could redefine the comma. One solution, following the tip here would be:



    makeatletter
    defold@comma{,}
    catcode`,=13
    def,{%
    ifmmode%
    old@commadiscretionary{}{}{}%
    else%
    old@comma%
    fi%
    }
    makeatother





    share|improve this answer



















    • 4




      Thanks. My expression is actually a set with 48 elements, so splitting them into several expressions may not sound mathematically logical. I will try allowbreak.
      – kennytm
      Aug 18 '10 at 15:50










    • +1, excellent answer! However, there's a complication: Please see tex.stackexchange.com/q/19094/1347.
      – M.S. Dousti
      May 26 '11 at 9:51






    • 5




      Note that the allowbreak solution does not work if you have left...right delimiters that span the break in your equation
      – Mosby
      Jan 7 '16 at 15:45






    • 1




      Any trick for allowbreak working in left...right delimiters?
      – loved.by.Jesus
      Mar 21 '17 at 15:29










    • This document-wide solution seems to break tikz...
      – xuhdev
      Aug 13 '17 at 4:22













    up vote
    86
    down vote



    accepted







    up vote
    86
    down vote



    accepted






    If the expression contains many commas then consider to break it into several math expressions, separated by commas. It reads like a list of math expressions. This way TeX can break the line.



    To achieve line breaks after a comma, you could insert allowbreak after the comma and before the next math symbol. If necessary, leave a blank after allowbreak.



    If you would like to have a document wide solution, you could redefine the comma. One solution, following the tip here would be:



    makeatletter
    defold@comma{,}
    catcode`,=13
    def,{%
    ifmmode%
    old@commadiscretionary{}{}{}%
    else%
    old@comma%
    fi%
    }
    makeatother





    share|improve this answer














    If the expression contains many commas then consider to break it into several math expressions, separated by commas. It reads like a list of math expressions. This way TeX can break the line.



    To achieve line breaks after a comma, you could insert allowbreak after the comma and before the next math symbol. If necessary, leave a blank after allowbreak.



    If you would like to have a document wide solution, you could redefine the comma. One solution, following the tip here would be:



    makeatletter
    defold@comma{,}
    catcode`,=13
    def,{%
    ifmmode%
    old@commadiscretionary{}{}{}%
    else%
    old@comma%
    fi%
    }
    makeatother






    share|improve this answer














    share|improve this answer



    share|improve this answer








    edited Aug 18 '10 at 15:47

























    answered Aug 18 '10 at 15:30









    Stefan Kottwitz

    174k63566753




    174k63566753








    • 4




      Thanks. My expression is actually a set with 48 elements, so splitting them into several expressions may not sound mathematically logical. I will try allowbreak.
      – kennytm
      Aug 18 '10 at 15:50










    • +1, excellent answer! However, there's a complication: Please see tex.stackexchange.com/q/19094/1347.
      – M.S. Dousti
      May 26 '11 at 9:51






    • 5




      Note that the allowbreak solution does not work if you have left...right delimiters that span the break in your equation
      – Mosby
      Jan 7 '16 at 15:45






    • 1




      Any trick for allowbreak working in left...right delimiters?
      – loved.by.Jesus
      Mar 21 '17 at 15:29










    • This document-wide solution seems to break tikz...
      – xuhdev
      Aug 13 '17 at 4:22














    • 4




      Thanks. My expression is actually a set with 48 elements, so splitting them into several expressions may not sound mathematically logical. I will try allowbreak.
      – kennytm
      Aug 18 '10 at 15:50










    • +1, excellent answer! However, there's a complication: Please see tex.stackexchange.com/q/19094/1347.
      – M.S. Dousti
      May 26 '11 at 9:51






    • 5




      Note that the allowbreak solution does not work if you have left...right delimiters that span the break in your equation
      – Mosby
      Jan 7 '16 at 15:45






    • 1




      Any trick for allowbreak working in left...right delimiters?
      – loved.by.Jesus
      Mar 21 '17 at 15:29










    • This document-wide solution seems to break tikz...
      – xuhdev
      Aug 13 '17 at 4:22








    4




    4




    Thanks. My expression is actually a set with 48 elements, so splitting them into several expressions may not sound mathematically logical. I will try allowbreak.
    – kennytm
    Aug 18 '10 at 15:50




    Thanks. My expression is actually a set with 48 elements, so splitting them into several expressions may not sound mathematically logical. I will try allowbreak.
    – kennytm
    Aug 18 '10 at 15:50












    +1, excellent answer! However, there's a complication: Please see tex.stackexchange.com/q/19094/1347.
    – M.S. Dousti
    May 26 '11 at 9:51




    +1, excellent answer! However, there's a complication: Please see tex.stackexchange.com/q/19094/1347.
    – M.S. Dousti
    May 26 '11 at 9:51




    5




    5




    Note that the allowbreak solution does not work if you have left...right delimiters that span the break in your equation
    – Mosby
    Jan 7 '16 at 15:45




    Note that the allowbreak solution does not work if you have left...right delimiters that span the break in your equation
    – Mosby
    Jan 7 '16 at 15:45




    1




    1




    Any trick for allowbreak working in left...right delimiters?
    – loved.by.Jesus
    Mar 21 '17 at 15:29




    Any trick for allowbreak working in left...right delimiters?
    – loved.by.Jesus
    Mar 21 '17 at 15:29












    This document-wide solution seems to break tikz...
    – xuhdev
    Aug 13 '17 at 4:22




    This document-wide solution seems to break tikz...
    – xuhdev
    Aug 13 '17 at 4:22










    up vote
    36
    down vote













    You could take a look at the breqn package, which is aimed at solving this problem in a general sense.






    share|improve this answer

















    • 9




      Wow, breqn allows left and right to work across line breaks!
      – Mark Meckes
      Aug 18 '10 at 17:13






    • 7




      Indeed, amongst other things. The late Michael Downes was a very clever guy!
      – Joseph Wright
      Aug 18 '10 at 18:02












    • For commas, this does not work with all types of atoms. See the discussion here.
      – Ruben Verborgh
      Apr 26 '15 at 12:47















    up vote
    36
    down vote













    You could take a look at the breqn package, which is aimed at solving this problem in a general sense.






    share|improve this answer

















    • 9




      Wow, breqn allows left and right to work across line breaks!
      – Mark Meckes
      Aug 18 '10 at 17:13






    • 7




      Indeed, amongst other things. The late Michael Downes was a very clever guy!
      – Joseph Wright
      Aug 18 '10 at 18:02












    • For commas, this does not work with all types of atoms. See the discussion here.
      – Ruben Verborgh
      Apr 26 '15 at 12:47













    up vote
    36
    down vote










    up vote
    36
    down vote









    You could take a look at the breqn package, which is aimed at solving this problem in a general sense.






    share|improve this answer












    You could take a look at the breqn package, which is aimed at solving this problem in a general sense.







    share|improve this answer












    share|improve this answer



    share|improve this answer










    answered Aug 18 '10 at 16:56









    Joseph Wright

    200k21549874




    200k21549874








    • 9




      Wow, breqn allows left and right to work across line breaks!
      – Mark Meckes
      Aug 18 '10 at 17:13






    • 7




      Indeed, amongst other things. The late Michael Downes was a very clever guy!
      – Joseph Wright
      Aug 18 '10 at 18:02












    • For commas, this does not work with all types of atoms. See the discussion here.
      – Ruben Verborgh
      Apr 26 '15 at 12:47














    • 9




      Wow, breqn allows left and right to work across line breaks!
      – Mark Meckes
      Aug 18 '10 at 17:13






    • 7




      Indeed, amongst other things. The late Michael Downes was a very clever guy!
      – Joseph Wright
      Aug 18 '10 at 18:02












    • For commas, this does not work with all types of atoms. See the discussion here.
      – Ruben Verborgh
      Apr 26 '15 at 12:47








    9




    9




    Wow, breqn allows left and right to work across line breaks!
    – Mark Meckes
    Aug 18 '10 at 17:13




    Wow, breqn allows left and right to work across line breaks!
    – Mark Meckes
    Aug 18 '10 at 17:13




    7




    7




    Indeed, amongst other things. The late Michael Downes was a very clever guy!
    – Joseph Wright
    Aug 18 '10 at 18:02






    Indeed, amongst other things. The late Michael Downes was a very clever guy!
    – Joseph Wright
    Aug 18 '10 at 18:02














    For commas, this does not work with all types of atoms. See the discussion here.
    – Ruben Verborgh
    Apr 26 '15 at 12:47




    For commas, this does not work with all types of atoms. See the discussion here.
    – Ruben Verborgh
    Apr 26 '15 at 12:47










    up vote
    13
    down vote













    Here is a solution that doesn't make the comma globally active:



    documentclass{article}

    newcommand{splitatcommas}[1]{%
    begingroup
    begingrouplccode`~=`, lowercase{endgroup
    edef~{mathcharthemathcode`, penalty0 noexpandhspace{0pt plus 1em}}%
    }mathcode`,="8000 #1%
    endgroup
    }

    begin{document}

    setlength{lineskiplimit}{2pt}setlength{lineskip}{3pt} % for this particular case

    $splitatcommas{
    frac{1}{2},frac{3}{5},frac{8}{13},frac{21}{34},frac{55}{89},
    frac{144}{233},frac{377}{610},frac{987}{1597},frac{2584}{4181},
    frac{6765}{10946},frac{17711}{28657},frac{46368}{75025},
    frac{121393}{196418},frac{317811}{514229},frac{832040}{1346269},
    frac{2178309}{3524578},frac{5702887}{9227465},
    frac{14930352}{24157817},frac{39088169}{63245986},frac{102334155}{165580141}
    }$

    end{document}


    The setting of lineskiplimit and lineskip are for the particular case where fractions are needed in the argument.



    enter image description here



    A variant that allows nesting:



    documentclass{article}

    newcommand{splitatcommas}[1]{%
    begingroup
    ifnummathcode`,="8000
    else
    begingrouplccode`~=`, lowercase{endgroup
    edef~{mathcharthemathcode`, penalty0 noexpandhspace{0pt plus 1em}}%
    }mathcode`,="8000
    fi
    #1%
    endgroup
    }

    newcommand{tuple}[1]{(splitatcommas{#1})}
    newcommand{set}[1]{{splitatcommas{#1}}}

    begin{document}

    setlength{lineskiplimit}{2pt}setlength{lineskip}{3pt} % for this particular case

    $splitatcommas{
    frac{1}{2},frac{3}{5},frac{8}{13},frac{21}{34},frac{55}{89},
    frac{144}{233},frac{377}{610},frac{987}{1597},frac{2584}{4181},
    frac{6765}{10946},frac{17711}{28657},frac{46368}{75025},
    frac{121393}{196418},frac{317811}{514229},frac{832040}{1346269},
    frac{2178309}{3524578},frac{5702887}{9227465},
    frac{14930352}{24157817},frac{39088169}{63245986},frac{102334155}{165580141}
    }$

    $set{
    tuple{a,b,c,d},tuple{1,2,3,4,5,6},tuple{11,22,33,44,55,66,77,88},
    tuple{a,b,c,d},tuple{1,2,3,4,5,6},tuple{11,22,33,44,55,66,77,88},
    tuple{a,b,c,d},tuple{1,2,3,4,5,6},tuple{11,22,33,44,55,66,77,88},
    tuple{a,b,c,d},tuple{1,2,3,4,5,6},tuple{11,22,33,44,55,66,77,88}
    }$

    end{document}


    enter image description here






    share|improve this answer























    • @Nasser With breqn this is guaranteed not to work. Probably something can be done, I'll work on your problem later.
      – egreg
      May 14 '16 at 16:59










    • Did you manage to find the workaround for breqn?
      – azetina
      Jul 13 '16 at 13:51






    • 1




      @azetina I don't consider breqn a usable piece of software.
      – egreg
      Jul 13 '16 at 14:15










    • @egreg Nice solution! But if I do nesting like splitatcommas{a , b,splitatcommas{c, d} I’m getting errors like ! Bad mathchar (32768). Do you have any idea to fix this?
      – Ronny
      Jan 7 at 23:02






    • 1




      @Ronny Added the variant
      – egreg
      Jan 8 at 13:46















    up vote
    13
    down vote













    Here is a solution that doesn't make the comma globally active:



    documentclass{article}

    newcommand{splitatcommas}[1]{%
    begingroup
    begingrouplccode`~=`, lowercase{endgroup
    edef~{mathcharthemathcode`, penalty0 noexpandhspace{0pt plus 1em}}%
    }mathcode`,="8000 #1%
    endgroup
    }

    begin{document}

    setlength{lineskiplimit}{2pt}setlength{lineskip}{3pt} % for this particular case

    $splitatcommas{
    frac{1}{2},frac{3}{5},frac{8}{13},frac{21}{34},frac{55}{89},
    frac{144}{233},frac{377}{610},frac{987}{1597},frac{2584}{4181},
    frac{6765}{10946},frac{17711}{28657},frac{46368}{75025},
    frac{121393}{196418},frac{317811}{514229},frac{832040}{1346269},
    frac{2178309}{3524578},frac{5702887}{9227465},
    frac{14930352}{24157817},frac{39088169}{63245986},frac{102334155}{165580141}
    }$

    end{document}


    The setting of lineskiplimit and lineskip are for the particular case where fractions are needed in the argument.



    enter image description here



    A variant that allows nesting:



    documentclass{article}

    newcommand{splitatcommas}[1]{%
    begingroup
    ifnummathcode`,="8000
    else
    begingrouplccode`~=`, lowercase{endgroup
    edef~{mathcharthemathcode`, penalty0 noexpandhspace{0pt plus 1em}}%
    }mathcode`,="8000
    fi
    #1%
    endgroup
    }

    newcommand{tuple}[1]{(splitatcommas{#1})}
    newcommand{set}[1]{{splitatcommas{#1}}}

    begin{document}

    setlength{lineskiplimit}{2pt}setlength{lineskip}{3pt} % for this particular case

    $splitatcommas{
    frac{1}{2},frac{3}{5},frac{8}{13},frac{21}{34},frac{55}{89},
    frac{144}{233},frac{377}{610},frac{987}{1597},frac{2584}{4181},
    frac{6765}{10946},frac{17711}{28657},frac{46368}{75025},
    frac{121393}{196418},frac{317811}{514229},frac{832040}{1346269},
    frac{2178309}{3524578},frac{5702887}{9227465},
    frac{14930352}{24157817},frac{39088169}{63245986},frac{102334155}{165580141}
    }$

    $set{
    tuple{a,b,c,d},tuple{1,2,3,4,5,6},tuple{11,22,33,44,55,66,77,88},
    tuple{a,b,c,d},tuple{1,2,3,4,5,6},tuple{11,22,33,44,55,66,77,88},
    tuple{a,b,c,d},tuple{1,2,3,4,5,6},tuple{11,22,33,44,55,66,77,88},
    tuple{a,b,c,d},tuple{1,2,3,4,5,6},tuple{11,22,33,44,55,66,77,88}
    }$

    end{document}


    enter image description here






    share|improve this answer























    • @Nasser With breqn this is guaranteed not to work. Probably something can be done, I'll work on your problem later.
      – egreg
      May 14 '16 at 16:59










    • Did you manage to find the workaround for breqn?
      – azetina
      Jul 13 '16 at 13:51






    • 1




      @azetina I don't consider breqn a usable piece of software.
      – egreg
      Jul 13 '16 at 14:15










    • @egreg Nice solution! But if I do nesting like splitatcommas{a , b,splitatcommas{c, d} I’m getting errors like ! Bad mathchar (32768). Do you have any idea to fix this?
      – Ronny
      Jan 7 at 23:02






    • 1




      @Ronny Added the variant
      – egreg
      Jan 8 at 13:46













    up vote
    13
    down vote










    up vote
    13
    down vote









    Here is a solution that doesn't make the comma globally active:



    documentclass{article}

    newcommand{splitatcommas}[1]{%
    begingroup
    begingrouplccode`~=`, lowercase{endgroup
    edef~{mathcharthemathcode`, penalty0 noexpandhspace{0pt plus 1em}}%
    }mathcode`,="8000 #1%
    endgroup
    }

    begin{document}

    setlength{lineskiplimit}{2pt}setlength{lineskip}{3pt} % for this particular case

    $splitatcommas{
    frac{1}{2},frac{3}{5},frac{8}{13},frac{21}{34},frac{55}{89},
    frac{144}{233},frac{377}{610},frac{987}{1597},frac{2584}{4181},
    frac{6765}{10946},frac{17711}{28657},frac{46368}{75025},
    frac{121393}{196418},frac{317811}{514229},frac{832040}{1346269},
    frac{2178309}{3524578},frac{5702887}{9227465},
    frac{14930352}{24157817},frac{39088169}{63245986},frac{102334155}{165580141}
    }$

    end{document}


    The setting of lineskiplimit and lineskip are for the particular case where fractions are needed in the argument.



    enter image description here



    A variant that allows nesting:



    documentclass{article}

    newcommand{splitatcommas}[1]{%
    begingroup
    ifnummathcode`,="8000
    else
    begingrouplccode`~=`, lowercase{endgroup
    edef~{mathcharthemathcode`, penalty0 noexpandhspace{0pt plus 1em}}%
    }mathcode`,="8000
    fi
    #1%
    endgroup
    }

    newcommand{tuple}[1]{(splitatcommas{#1})}
    newcommand{set}[1]{{splitatcommas{#1}}}

    begin{document}

    setlength{lineskiplimit}{2pt}setlength{lineskip}{3pt} % for this particular case

    $splitatcommas{
    frac{1}{2},frac{3}{5},frac{8}{13},frac{21}{34},frac{55}{89},
    frac{144}{233},frac{377}{610},frac{987}{1597},frac{2584}{4181},
    frac{6765}{10946},frac{17711}{28657},frac{46368}{75025},
    frac{121393}{196418},frac{317811}{514229},frac{832040}{1346269},
    frac{2178309}{3524578},frac{5702887}{9227465},
    frac{14930352}{24157817},frac{39088169}{63245986},frac{102334155}{165580141}
    }$

    $set{
    tuple{a,b,c,d},tuple{1,2,3,4,5,6},tuple{11,22,33,44,55,66,77,88},
    tuple{a,b,c,d},tuple{1,2,3,4,5,6},tuple{11,22,33,44,55,66,77,88},
    tuple{a,b,c,d},tuple{1,2,3,4,5,6},tuple{11,22,33,44,55,66,77,88},
    tuple{a,b,c,d},tuple{1,2,3,4,5,6},tuple{11,22,33,44,55,66,77,88}
    }$

    end{document}


    enter image description here






    share|improve this answer














    Here is a solution that doesn't make the comma globally active:



    documentclass{article}

    newcommand{splitatcommas}[1]{%
    begingroup
    begingrouplccode`~=`, lowercase{endgroup
    edef~{mathcharthemathcode`, penalty0 noexpandhspace{0pt plus 1em}}%
    }mathcode`,="8000 #1%
    endgroup
    }

    begin{document}

    setlength{lineskiplimit}{2pt}setlength{lineskip}{3pt} % for this particular case

    $splitatcommas{
    frac{1}{2},frac{3}{5},frac{8}{13},frac{21}{34},frac{55}{89},
    frac{144}{233},frac{377}{610},frac{987}{1597},frac{2584}{4181},
    frac{6765}{10946},frac{17711}{28657},frac{46368}{75025},
    frac{121393}{196418},frac{317811}{514229},frac{832040}{1346269},
    frac{2178309}{3524578},frac{5702887}{9227465},
    frac{14930352}{24157817},frac{39088169}{63245986},frac{102334155}{165580141}
    }$

    end{document}


    The setting of lineskiplimit and lineskip are for the particular case where fractions are needed in the argument.



    enter image description here



    A variant that allows nesting:



    documentclass{article}

    newcommand{splitatcommas}[1]{%
    begingroup
    ifnummathcode`,="8000
    else
    begingrouplccode`~=`, lowercase{endgroup
    edef~{mathcharthemathcode`, penalty0 noexpandhspace{0pt plus 1em}}%
    }mathcode`,="8000
    fi
    #1%
    endgroup
    }

    newcommand{tuple}[1]{(splitatcommas{#1})}
    newcommand{set}[1]{{splitatcommas{#1}}}

    begin{document}

    setlength{lineskiplimit}{2pt}setlength{lineskip}{3pt} % for this particular case

    $splitatcommas{
    frac{1}{2},frac{3}{5},frac{8}{13},frac{21}{34},frac{55}{89},
    frac{144}{233},frac{377}{610},frac{987}{1597},frac{2584}{4181},
    frac{6765}{10946},frac{17711}{28657},frac{46368}{75025},
    frac{121393}{196418},frac{317811}{514229},frac{832040}{1346269},
    frac{2178309}{3524578},frac{5702887}{9227465},
    frac{14930352}{24157817},frac{39088169}{63245986},frac{102334155}{165580141}
    }$

    $set{
    tuple{a,b,c,d},tuple{1,2,3,4,5,6},tuple{11,22,33,44,55,66,77,88},
    tuple{a,b,c,d},tuple{1,2,3,4,5,6},tuple{11,22,33,44,55,66,77,88},
    tuple{a,b,c,d},tuple{1,2,3,4,5,6},tuple{11,22,33,44,55,66,77,88},
    tuple{a,b,c,d},tuple{1,2,3,4,5,6},tuple{11,22,33,44,55,66,77,88}
    }$

    end{document}


    enter image description here







    share|improve this answer














    share|improve this answer



    share|improve this answer








    edited Jan 8 at 13:45

























    answered May 14 '16 at 9:06









    egreg

    698k8518573126




    698k8518573126












    • @Nasser With breqn this is guaranteed not to work. Probably something can be done, I'll work on your problem later.
      – egreg
      May 14 '16 at 16:59










    • Did you manage to find the workaround for breqn?
      – azetina
      Jul 13 '16 at 13:51






    • 1




      @azetina I don't consider breqn a usable piece of software.
      – egreg
      Jul 13 '16 at 14:15










    • @egreg Nice solution! But if I do nesting like splitatcommas{a , b,splitatcommas{c, d} I’m getting errors like ! Bad mathchar (32768). Do you have any idea to fix this?
      – Ronny
      Jan 7 at 23:02






    • 1




      @Ronny Added the variant
      – egreg
      Jan 8 at 13:46


















    • @Nasser With breqn this is guaranteed not to work. Probably something can be done, I'll work on your problem later.
      – egreg
      May 14 '16 at 16:59










    • Did you manage to find the workaround for breqn?
      – azetina
      Jul 13 '16 at 13:51






    • 1




      @azetina I don't consider breqn a usable piece of software.
      – egreg
      Jul 13 '16 at 14:15










    • @egreg Nice solution! But if I do nesting like splitatcommas{a , b,splitatcommas{c, d} I’m getting errors like ! Bad mathchar (32768). Do you have any idea to fix this?
      – Ronny
      Jan 7 at 23:02






    • 1




      @Ronny Added the variant
      – egreg
      Jan 8 at 13:46
















    @Nasser With breqn this is guaranteed not to work. Probably something can be done, I'll work on your problem later.
    – egreg
    May 14 '16 at 16:59




    @Nasser With breqn this is guaranteed not to work. Probably something can be done, I'll work on your problem later.
    – egreg
    May 14 '16 at 16:59












    Did you manage to find the workaround for breqn?
    – azetina
    Jul 13 '16 at 13:51




    Did you manage to find the workaround for breqn?
    – azetina
    Jul 13 '16 at 13:51




    1




    1




    @azetina I don't consider breqn a usable piece of software.
    – egreg
    Jul 13 '16 at 14:15




    @azetina I don't consider breqn a usable piece of software.
    – egreg
    Jul 13 '16 at 14:15












    @egreg Nice solution! But if I do nesting like splitatcommas{a , b,splitatcommas{c, d} I’m getting errors like ! Bad mathchar (32768). Do you have any idea to fix this?
    – Ronny
    Jan 7 at 23:02




    @egreg Nice solution! But if I do nesting like splitatcommas{a , b,splitatcommas{c, d} I’m getting errors like ! Bad mathchar (32768). Do you have any idea to fix this?
    – Ronny
    Jan 7 at 23:02




    1




    1




    @Ronny Added the variant
    – egreg
    Jan 8 at 13:46




    @Ronny Added the variant
    – egreg
    Jan 8 at 13:46










    up vote
    0
    down vote













    If you can split the equation into several sub equation using $, and if you are using braces use left. and right. (with dot) to balance the braces.



    Example:



     $X = left{right.a$, $b$, $c$, $dleft.right}$


    X = { a, b, c, d }



    This should allow line breaks behind the commas.






    share|improve this answer

















    • 10




      You might as well just omit left and right. Putting the matching brace directly adjacent obviates any point to having scaling braces at all.
      – Kundor
      Mar 15 '14 at 18:36










    • disregarding the pointless left and right commands, ;) it is a quick workaround.
      – loved.by.Jesus
      Jun 6 '16 at 10:39















    up vote
    0
    down vote













    If you can split the equation into several sub equation using $, and if you are using braces use left. and right. (with dot) to balance the braces.



    Example:



     $X = left{right.a$, $b$, $c$, $dleft.right}$


    X = { a, b, c, d }



    This should allow line breaks behind the commas.






    share|improve this answer

















    • 10




      You might as well just omit left and right. Putting the matching brace directly adjacent obviates any point to having scaling braces at all.
      – Kundor
      Mar 15 '14 at 18:36










    • disregarding the pointless left and right commands, ;) it is a quick workaround.
      – loved.by.Jesus
      Jun 6 '16 at 10:39













    up vote
    0
    down vote










    up vote
    0
    down vote









    If you can split the equation into several sub equation using $, and if you are using braces use left. and right. (with dot) to balance the braces.



    Example:



     $X = left{right.a$, $b$, $c$, $dleft.right}$


    X = { a, b, c, d }



    This should allow line breaks behind the commas.






    share|improve this answer












    If you can split the equation into several sub equation using $, and if you are using braces use left. and right. (with dot) to balance the braces.



    Example:



     $X = left{right.a$, $b$, $c$, $dleft.right}$


    X = { a, b, c, d }



    This should allow line breaks behind the commas.







    share|improve this answer












    share|improve this answer



    share|improve this answer










    answered Feb 18 '14 at 13:33









    maitek

    111




    111








    • 10




      You might as well just omit left and right. Putting the matching brace directly adjacent obviates any point to having scaling braces at all.
      – Kundor
      Mar 15 '14 at 18:36










    • disregarding the pointless left and right commands, ;) it is a quick workaround.
      – loved.by.Jesus
      Jun 6 '16 at 10:39














    • 10




      You might as well just omit left and right. Putting the matching brace directly adjacent obviates any point to having scaling braces at all.
      – Kundor
      Mar 15 '14 at 18:36










    • disregarding the pointless left and right commands, ;) it is a quick workaround.
      – loved.by.Jesus
      Jun 6 '16 at 10:39








    10




    10




    You might as well just omit left and right. Putting the matching brace directly adjacent obviates any point to having scaling braces at all.
    – Kundor
    Mar 15 '14 at 18:36




    You might as well just omit left and right. Putting the matching brace directly adjacent obviates any point to having scaling braces at all.
    – Kundor
    Mar 15 '14 at 18:36












    disregarding the pointless left and right commands, ;) it is a quick workaround.
    – loved.by.Jesus
    Jun 6 '16 at 10:39




    disregarding the pointless left and right commands, ;) it is a quick workaround.
    – loved.by.Jesus
    Jun 6 '16 at 10:39










    up vote
    0
    down vote













    In luatex you have a new possibility that does not involve active characters, you can declare , to be a mathbin (like +) so that line breaking is allowed and then set the mathord-mathbin spacing to zero so it gets no space before, like punctuation:



    enter image description here



    documentclass{article}

    begin{document}

    $
    mathcode`,="213B % mathbin
    Umathordbinspacingtextstyle 0mu % no space before
    a,a,a,a,a,a,a,a,a,a,a,a,a,a,a,a,a,a,a,a,a,a,a,a,a,a,a,a,a,a,a,a,a,
    a,a,a,a,a,a,a,a,a,a,a,a,a,a,a,a,a,a,a,a,a,a,a,a,a,a,a,a,a,a,a,a,a$
    end{document}





    share|improve this answer

























      up vote
      0
      down vote













      In luatex you have a new possibility that does not involve active characters, you can declare , to be a mathbin (like +) so that line breaking is allowed and then set the mathord-mathbin spacing to zero so it gets no space before, like punctuation:



      enter image description here



      documentclass{article}

      begin{document}

      $
      mathcode`,="213B % mathbin
      Umathordbinspacingtextstyle 0mu % no space before
      a,a,a,a,a,a,a,a,a,a,a,a,a,a,a,a,a,a,a,a,a,a,a,a,a,a,a,a,a,a,a,a,a,
      a,a,a,a,a,a,a,a,a,a,a,a,a,a,a,a,a,a,a,a,a,a,a,a,a,a,a,a,a,a,a,a,a$
      end{document}





      share|improve this answer























        up vote
        0
        down vote










        up vote
        0
        down vote









        In luatex you have a new possibility that does not involve active characters, you can declare , to be a mathbin (like +) so that line breaking is allowed and then set the mathord-mathbin spacing to zero so it gets no space before, like punctuation:



        enter image description here



        documentclass{article}

        begin{document}

        $
        mathcode`,="213B % mathbin
        Umathordbinspacingtextstyle 0mu % no space before
        a,a,a,a,a,a,a,a,a,a,a,a,a,a,a,a,a,a,a,a,a,a,a,a,a,a,a,a,a,a,a,a,a,
        a,a,a,a,a,a,a,a,a,a,a,a,a,a,a,a,a,a,a,a,a,a,a,a,a,a,a,a,a,a,a,a,a$
        end{document}





        share|improve this answer












        In luatex you have a new possibility that does not involve active characters, you can declare , to be a mathbin (like +) so that line breaking is allowed and then set the mathord-mathbin spacing to zero so it gets no space before, like punctuation:



        enter image description here



        documentclass{article}

        begin{document}

        $
        mathcode`,="213B % mathbin
        Umathordbinspacingtextstyle 0mu % no space before
        a,a,a,a,a,a,a,a,a,a,a,a,a,a,a,a,a,a,a,a,a,a,a,a,a,a,a,a,a,a,a,a,a,
        a,a,a,a,a,a,a,a,a,a,a,a,a,a,a,a,a,a,a,a,a,a,a,a,a,a,a,a,a,a,a,a,a$
        end{document}






        share|improve this answer












        share|improve this answer



        share|improve this answer










        answered Oct 6 at 10:04









        David Carlisle

        477k3811061841




        477k3811061841






















            up vote
            0
            down vote













            Just try inserting allowbreak in between your inline equations.



            $x_1, x_2,...allowbreak, y_1,y_2,y_n$.
            The line won't reach out and break at before y_1






            share|improve this answer



















            • 1




              Welcome ! Could you please expand your answer a bit, with a small example for instance ?
              – BambOo
              Nov 5 at 15:38















            up vote
            0
            down vote













            Just try inserting allowbreak in between your inline equations.



            $x_1, x_2,...allowbreak, y_1,y_2,y_n$.
            The line won't reach out and break at before y_1






            share|improve this answer



















            • 1




              Welcome ! Could you please expand your answer a bit, with a small example for instance ?
              – BambOo
              Nov 5 at 15:38













            up vote
            0
            down vote










            up vote
            0
            down vote









            Just try inserting allowbreak in between your inline equations.



            $x_1, x_2,...allowbreak, y_1,y_2,y_n$.
            The line won't reach out and break at before y_1






            share|improve this answer














            Just try inserting allowbreak in between your inline equations.



            $x_1, x_2,...allowbreak, y_1,y_2,y_n$.
            The line won't reach out and break at before y_1







            share|improve this answer














            share|improve this answer



            share|improve this answer








            edited 12 hours ago

























            answered Nov 5 at 14:53









            Albert Chen

            1013




            1013








            • 1




              Welcome ! Could you please expand your answer a bit, with a small example for instance ?
              – BambOo
              Nov 5 at 15:38














            • 1




              Welcome ! Could you please expand your answer a bit, with a small example for instance ?
              – BambOo
              Nov 5 at 15:38








            1




            1




            Welcome ! Could you please expand your answer a bit, with a small example for instance ?
            – BambOo
            Nov 5 at 15:38




            Welcome ! Could you please expand your answer a bit, with a small example for instance ?
            – BambOo
            Nov 5 at 15:38


















             

            draft saved


            draft discarded



















































             


            draft saved


            draft discarded














            StackExchange.ready(
            function () {
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%2f1959%2fallowing-line-break-at-in-inline-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

            Contact image not getting when fetch all contact list from iPhone by CNContact

            count number of partitions of a set with n elements into k subsets

            A CLEAN and SIMPLE way to add appendices to Table of Contents and bookmarks