13

I have just discovered the siunitx package and want to use it in a German language document. Unfortunately, I can't get the German word 'bis' instead of 'to' with the \SIrange command:

\listfiles
\documentclass{beamer}
\usepackage[ngerman]{babel}
\usepackage{siunitx}

\begin{document}
\begin{frame}
  $\dot{V}=\SIrange{0}{650}{\litre\per\hour}$
\end{frame}
\end{document}

What's wrong?

  • I've marked your inline code with backticks `. – Hendrik Vogt Mar 15 '11 at 11:35
  • In my (short) experience, it's dangerous to use spacing characters such as \,, \;, ~, etc. in the range-phrase, because they can cause range commands to not line break/word wrap and go beyond the right margin. It's better to use just blanks (e.g. range-phrase={ bis } instead of range-phrase={\,bis\,}). – user2328903 Feb 11 '14 at 19:14
10

Use the range-phrase option, either for the package or the \SIrange command. Note that you have to add the spaces before and after bis, e.g. using \, for 1/2 space.

\listfiles
\documentclass{beamer}
\usepackage[ngerman]{babel}
\usepackage[range-phrase={\,bis\,}]{siunitx}

\begin{document}
\begin{frame}
    $\dot{V}=\SIrange{0}{650}{\litre\per\hour}$
\end{frame}
\end{document}
  • 2
    If you're going to have lots of similar commands, it might be best to use the \sisetup command, rather than passing them all as package options... – Seamus Mar 15 '11 at 11:00
  • 1
    @Martin: Thanks, but according to the documentation this should be done automatically if the `translator' package is present on the system. – AlexG Mar 15 '11 at 11:22
  • @Alexander: I thought something like this exists. You should mention such things in the main question. I personally prefer to do thing by myself to be sure they work. – Martin Scharrer Mar 15 '11 at 11:34
  • 2
    @Alexander: The automated system seems to have a slight flaw, but I'm not sure if that is siunitx or translator. I'll look at it later today. – Joseph Wright Mar 15 '11 at 11:44
  • 6
    @Joseph: The "flaw" is that translator doesn't know the language as ngerman is not a class option. You must either use ngermanas class option, or load translator before siunitx with the option ngerman, or activate after siunitx the language \uselanguage{German} \languagealias{ngerman}{German} – Ulrike Fischer May 17 '11 at 9:31

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.