I'm trying to show a url with a long parameter list, and I'd like to prioritize some breakpoints over others, eg:


My problem here is that seqsplit is often choosing to break in the middle of the integers, just as frequently as anywhere else. I understand I can prevent this by using \seqsplit{[{100},{200},{300}...]} but for a long list, grouping manually becomes quite cumbersome.

Ideally, I could say something like:

\seqsplit[\& ,]{...}

To suggest that seqsplit prioritize the & and , as good breakpoints.

1 Answer 1


I can propose a different solution:


  \tl_map_inline:nn { #2 }
    \tl_if_in:nnTF { #1 } { ##1 } { \penalty -100 } { \penalty 0 }
    \skip_horizontal:n { 0pt plus 1pt }




A slightly stretchable space is added after , and \& in order to help filling lines.

enter image description here

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.