有人能解决上述错误吗?我想在我的论文中表示 10%。我使用了 10\textdiscount、10$\textdiscount$、$10\textdiscount$。所有这些都导致我出现上述错误。有人能告诉我解决方案吗?我也想表示 $10.. \textdollar 也不起作用。请帮我解决这个问题。
答案1
如果我编译
\documentclass{article}
\begin{document}
\textdiscount\textdollar
\end{document}
我明白了
> pdflatex discount
This is pdfTeX, Version 3.14159265-2.6-1.40.20 (TeX Live 2019) (preloaded format=pdflatex)
restricted \write18 enabled.
entering extended mode
(./discount.tex
LaTeX2e <2018-12-01>
(/usr/local/texlive/2019/texmf-dist/tex/latex/base/article.cls
Document Class: article 2018/09/03 v1.4i Standard LaTeX document class
(/usr/local/texlive/2019/texmf-dist/tex/latex/base/size10.clo)) (./discount.aux
)
! Undefined control sequence.
l.5 \textdiscount
\textdollar
?
[1{/usr/local/texlive/2019/texmf-var/fonts/map/pdftex/updmap/pdftex.map}]
(./discount.aux) )</usr/local/texlive/2019/texmf-dist/fonts/type1/public/amsfon
ts/cm/cmr10.pfb>
Output written on discount.pdf (1 page, 8924 bytes).
Transcript written on discount.log.
并且输出中有一个“$”。
那里是 \textdiscount
如果您加载该textcomp
包,但它是一个有趣的符号,而不是百分比的标准符号。
类型,更简单,
I'll let you pay just \$80, which means a discount by 10\%.