0

I want to allow my inline math to break lines after \sim, which I'm using a lot. To this end, I've tried:

\usepackage{regexpatch}
...
\xapptocmd{\sim}{\allowbreak}{SUCCESS}{FAIL}
...
$X \sim N(0, 1)$

Unfortunately this just prints out FAIL at the top of the document, but I'm not sure how to diagnose why \xapptocmd is actually failing. Is it possible to patch math commands in this way?

I'm happy to swap regexpatch out with any other package if it helps.

Migwell
  • 143

0 Answers0