我在用Xaringan幻灯片。我想用数学表示法写出像$10-5=$5这样的美元值。
我的代码如下:
$ \$10-\$5 = \$5 $.
但是,代码不会像我所希望的那样以数学的方式生成结果。
我知道它适用于双美元签名$$
,但我希望结果保持不变。
我也不想把美元或CAD,而不是$。有小费吗?
发布于 2022-08-08 16:06:22
而不是使用\$
,只需使用胶乳语法\newcommand
定义一个宏
---
output: xaringan::moon_reader
---
# Defining inline math expression containing currency dollar sign
<!---- This is a macro for Mathjax ----->
$$\newcommand\dollars{\$}$$
<!---- --------------------------- ----->
This line conttain inline expression $\dollars10 - \dollars5 = \dollars5$
看起来,
https://stackoverflow.com/questions/73266122
复制相似问题