我做错了什么?我尝试在文档中做危险说明和预防说明,但命令\hpstatement{}
不起作用,如mhchem
手册中所述。
我的 MWE(或不工作):
\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage{mhchem}
\usepackage{hpstatement}
\usepackage{rsphrase}
\begin{document}
The statement \hpnumber{H200}\\
is ‘\hpstatement{H200}’
\end{document}
这仅打印:
错误如下:
Package hpstatement Error: You have to specify an H or P statement number
(hpstatement) when you use \hpnumber for the first time
(hpstatement) (e.g. \hpnumber{H200}).
See the hpstatement package documentation for explanation.
Type H <return> for immediate help.
...
l.10 The statement \hpnumber{H200}
\\
This error message was generated by an \errmessage
command, so I can't give any explicit help.
Pretend that you're Hercule Poirot: Examine all clues,
and deduce the truth by order and method.
Package hpstatement Error: H or P statement "H200"
(hpstatement) is not defined.
See the hpstatement package documentation for explanation.
Type H <return> for immediate help.
...
l.11 is ‘\hpstatement{H200}
答案1
仅当使用 明确指定语言时,数字和语句才有效babel
。这可以视为一个错误(可以通过将英语设置为 的默认语言来解决hpstatement
)。支持的语言包括英语、法语、德语。
梅威瑟:
\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage[english]{babel}
\usepackage{mhchem}
\usepackage{hpstatement}
\usepackage{rsphrase}
\begin{document}
The statement \hpnumber{H200}\\
is ‘\hpstatement{H200}’
\end{document}
结果: