# wrapping an arbitrary lon equation

In sage with the latex function, the question of getting an equation wrapped into multiple lines has been largely covered for all the cases where you know exatly what your equation will look like. My issue is when the equation can be insanely long without any way to control it, as it's part of a different process. I'll appreciate hints or even solutions from those who have been thru or may be from who's got an idea. Many thx in advance. ps: anything that works with overleaf and/or texShop (whatever this may require) is more than welcome M

As an example :

```
a=set([3,9,11,23])
print(latex(Permutations(a).list()))
print(latex(Combinations(a,3).list()))
```

One can see that for this very basic example that the content do not wrap. What am I doing wrong ? any hints? thx in advance M ps: In practice I just send the print to a file. here the purpose is to show what I'm talking about. Hope it make sens. ps: ENV = Montery (MacOS) + sagemath 9.7 + overleaf + TexShop