Forgot password?
 Register account
View 1492|Reply 1

波浪~

[Copy link]

682

Threads

110K

Posts

910K

Credits

Credits
90973
QQ

Show all posts

kuing Posted 2015-1-19 15:34 |Read mode
懒得废话,直接上代码
  1. \documentclass{article}
  2. \usepackage{xeCJK}
  3. \let\oldtilde=\~
  4. \renewcommand\~{\textasciitilde}
  5. \begin {document}
  6. 1\$\sim\$2 1\~2 1\oldtilde{}2
  7. \end {document}
Copy the Code
用 xelatex 编译,结果 QQ截图20150119153435.gif

682

Threads

110K

Posts

910K

Credits

Credits
90973
QQ

Show all posts

 Author| kuing Posted 2015-1-19 15:53
实际上,应该是 fontspec 宏包起了作用,所以其实将 \usepackage{xeCJK} 换成 \usepackage{fontspec} 也行。

还有,如果用 hyperref 宏包的话,用 \url{~} 也可以产生居中的波浪,但是就会产生链接,如果链接有颜色或者有框的话就不能那样用了。

Mobile version|Discuz Math Forum

2025-6-5 08:02 GMT+8

Powered by Discuz!

× Quick Reply To Top Edit