Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

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?

share|improve this question
    
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 at 19:14

1 Answer 1

up vote 5 down vote accepted

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}
share|improve this answer
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
    
Thanks @Seamus, I forgot about that. –  Martin Scharrer Mar 15 '11 at 11:12
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
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
2  
@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

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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