siunitx 包给出错误消息

siunitx 包给出错误消息

我尝试在 LaTeX 文档中输入一些单位,但不知为何不起作用。我做错了什么?

\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

全局选项可以在可选参数中本地覆盖\SI

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

完整文件:

\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}

结果

相关内容