我只是想用 定义我自己的欧元 (€) 单位\DeclareSIUnit{\myeuro}{€}
,但无法让它工作。在此过程中,我做了以下 MWE,尝试了几种不同的方法,但似乎都不起作用。有人知道可能发生了什么以及如何解决这个问题吗?
\documentclass{article}
\usepackage{eurosym,textcomp,siunitx}
\DeclareSIUnit{\myalpha}{\alpha} %alpha just for comparison
\DeclareSIUnit{\myeuro}{€}
\DeclareSIUnit{\myeuroo}{\euro}
\DeclareSIUnit{\myeurooo}{\texteuro}
\begin{document}
Unicode symbol (€), euro (\euro) and texteuro (\texteuro)
all work fine in text, but for some reason I can't
use them in the qty command of siunitx:\\
Line 1: \qty{5}{\alpha}\\
Line 2: \qty{5}{\myalpha}\\
Line 3: \qty{5}{€}\\
Line 4: \qty{5}{\euro}\\
Line 5: \qty{5}{\texteuro}\\
Line 6: \qty{5}{\myeuro}\\
Line 7: \qty{5}{\myeuroo}\\
Line 8: \qty{5}{\myeurooo}\\
\end{document}