2

I was basically trying to replicate the answer to this question: Print \frac{4}{3} m/s using the SI unit package

In doing so, I hope to achieve a proper output of minus one third (as a fraction) the elementary charge. This is my code:

\SI[quotient-mode=fraction]{-1/3}{\elementarycharge}

It gives me the error "Package siunitx: Invalid number '-1/3'." The following code works properly:

\SI[quotient-mode=fraction]{-1}{\elementarycharge}

But as soon as I add the "/3", the error occurs. This is quite odd, as I am very certain to have followed the answer to the question mentioned before. I have seen workarounds where you put the number in a different commannd in front of the unit, but I would like to find a real solution.

I hope I followed this forums conventions, as I was not sure whether i should comment on the five year old question or not.

All the best, thanks

Lucas

  • (well, you did the right thing to ask a new question (as well as format your code correctly and link to relevant previous questions), TeX.SE operates differently from most other normal forums -- side note, comment is distinct from answers, and answers must answer the question. – user202729 Aug 13 '22 at 12:14

0 Answers0