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?

2
  • I've marked your inline code with backticks `. Commented Mar 15, 2011 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\,}). Commented Feb 11, 2014 at 19:14

1 Answer 1

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}
6
  • 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
    Commented Mar 15, 2011 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
    Commented Mar 15, 2011 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. Commented Mar 15, 2011 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
    Commented Mar 15, 2011 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} Commented May 17, 2011 at 9:31

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .