3

I try to type some units in my LaTeX document but somehow it is not working. What am I doing wrong?

\documentclass[a4paper,10pt,fleqn]{article}
\usepackage[
    polutonikogreek,
    latin,
    english,
    french,
    ngerman,
        ]{babel}
\usepackage{siunitx}
    \sisetup{
        locale=DE,
        per-mode=fraction,
        separate-uncertainty,
        exponent-to-prefix,
        prefixes-as-symbols=false,
        list-units=brackets,
        range-units=brackets,
        multi-part-units=brackets,
        table-unit-alignment=left,
        load=prefixed,
        load-configurations=abbreviations,
    }
\begin{document}
    \SI{1}{\hectopascal}
\end{document}
  • 1
    Welcome to TeX.SX. There is no command \hectopascal. Try \hecto\pascal instead and it will work ... – Stefan Pinnow Apr 12 '16 at 16:49
  • 1
    Hecto pascal is not a single unit. It is an amount and a unit (two macros). Please refer to the package manual. – daleif Apr 12 '16 at 16:50
  • so there is no easy way to write hPa because with \hecto\pascal it will appear as {1*10^2 Pa} – weatherfox Apr 12 '16 at 17:03
  • 3
    Have you got any reason for prefixes-as-symbols=false? – egreg Apr 12 '16 at 17:23
4

Global options can be overwritten locally in the optional argument of \SI:

\SI[prefixes-as-symbols]{1}{\hecto\pascal}

Full file:

\documentclass[a4paper,10pt,fleqn]{article}
\usepackage{siunitx}
    \sisetup{
        locale=DE,
        per-mode=fraction,
        separate-uncertainty,
        exponent-to-prefix,
        prefixes-as-symbols=false,
        list-units=brackets,
        range-units=brackets,
        multi-part-units=brackets,
        table-unit-alignment=left,
        % load=prefixed,
        load-configurations=abbreviations,
    }
\begin{document}
    \SI[prefixes-as-symbols]{1}{\hecto\pascal}

    \SI[prefixes-as-symbols]{1}{\micro\meter} =
    \SI[exponent-to-prefix=false]{e-6}{\meter} =
    \SI[exponent-to-prefix=false]{1}{\micro\meter}
\end{document}

Result

|improve this answer|||||
  • If I want 0.65 °K/100 m can I do that like this: code\SI{0.65}{\SIUnitSymbolDegree F}$\per$\SI{100}{\m}code Because with this way the "/" is not shown – weatherfox Apr 12 '16 at 19:42
  • @starter \per cannot be used outside of the macros of package siunitx. But a normal / or \slash (which allows line break) will do (in text mode, math mode not needed). – Heiko Oberdiek Apr 12 '16 at 19:50
  • Does someone know how to write 10^-6 µm. I'm not able to type in the -6 in the exponent. code \SI[prefixes-as-symbols]{10}{\micro\m} – weatherfox Apr 19 '16 at 6:10
  • @starter See updated answer. – Heiko Oberdiek Apr 19 '16 at 8:12

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.