1

I am trying to write a huge inline math expression $S_{new} =\left\lbrace(x_{k} + N(\mu_{x},\sigma),y_{k} + N(\mu_{y},\sigma))\allowbreak,(x_{k}+1 + N(\mu_{x},\sigma),y_{k}+1 + N(\mu_{y},\sigma))..\right\rbrace \forall \ k \in \left\lbrace1,2,....,(p-2)\right\rbrace \ and\ S_{new} \in S$. and it is overflowing margin, how can i prevent it from doing so and break line

swarnava112
  • 113
  • 3

1 Answers1

0

When you enclose some math between \left and \right no line break can happen: it's a math mode analog of \mbox (besides doing its main job of sizing fences).

Avoid long inline set description: they're difficult to follow. If you need one, don't add useless \left and \right. The \allowbreak token should go after the comma. Ellipsis should be \dots (or variant thereof) and textual subscripts should be in upright type. Remember to load amsmath.

$S_{\mathrm{new}} = \lbrace
  (x_{k} + N(\mu_{x},\sigma), y_{k} + N(\mu_{y},\sigma)),\allowbreak
  (x_{k}+1 + N(\mu_{x},\sigma), y_{k}+1 + N(\mu_{y},\sigma)),
  \dotsc % dots for commas
\rbrace$
for all $k\in\lbrace 1,2,\dots,(p-2)\rbrace$ and $S_{\mathrm{new}} \in S$.

Indenting the code like this may help you deciphering it and checking for unbalanced parentheses. Note that there are three distinct formulas; \forall should better be textual (but this is personal opinion).

egreg
  • 1,121,712