![命令 \textdiscount 在编码 OT1 中不可用。...吨交换膜和 10\textdiscount](https://linux22.com/image/397335/%E5%91%BD%E4%BB%A4%20%5Ctextdiscount%20%E5%9C%A8%E7%BC%96%E7%A0%81%20OT1%20%E4%B8%AD%E4%B8%8D%E5%8F%AF%E7%94%A8%E3%80%82...%E5%90%A8%E4%BA%A4%E6%8D%A2%E8%86%9C%E5%92%8C%2010%5Ctextdiscount.png)
有人能解决上述错误吗?我想在我的论文中表示 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\%.