10

I was wondering if there is a way to allow for line breaks within product lists of the siunitx package:

\documentclass{article}

\usepackage{showframe}
\usepackage{siunitx}

\begin{document}
This is a very long line and with a long list of numbers like this \SI[product-units=brackets-power]{128 x 256 x 512 x 1024}{\mm}.

This is a very long line and with a long list of numbers like this \SI[product-units=repeat]{128 x 256 x 512 x 1024}{\mm}.

This is a very long line and with a long list of numbers like this $(128 \times 256 \times 512 \times 1024)\,\si{\mm\tothe4}$.
\end{document}

MWP result

The third option does the right thing but I would really like to keep the possibility to globally define the layout of product lists in the preamble (e.g. \sisetup{product-units=brackets-power}) across the whole document. The allow-number-unit-breaks option in siunitx does not really help as I would need a way to "allow-output-product-breaks".

Any ideas how to do this? Thanks.

  • 5
    Not sure if this counts as an answer: current position is 'no' due to internal coding structures. I'm working on a major (v3) update to siunitx and this sort of thing is on the list, but it will be some time before that is ready. – Joseph Wright Mar 12 '14 at 18:41
  • That's what I suspected when reading the discussions on line breaking between numbers and units. So, I'm looking forward to v3. Would you mind posting your comment as an answer so that I can accept? – Matthias Mar 13 '14 at 8:28
3

With the current release of siunitx (2.5 branch) this is not possible due to the way things are set up internally. Work is currently ongoing on v3, which will feature a re-write of the internals and some changes to the defined behaviour. In particular, the new version will allow more flexibility with breaks, for example in this case (full details still under development!). The current timescale for a new release is probably not until Summer 2014.

  • 2
    Any chance this ended up being implemented? I couldn't find anything in the manual. – ralk912 May 15 '19 at 2:14
  • 1
    @ralk912 I have some code for this, but I've got a bit stuck with the finalisation (the usual 95% is easy, 5% is hard problem). I am aware it needs sorting; I will try to find the necessary time over the next few months. – Joseph Wright May 15 '19 at 6:33

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.