Forgot password?
 Create new account
View 1358|Reply 1

波浪~

[Copy link]

700

Threads

110K

Posts

910K

Credits

Credits
94177
QQ

Show all posts

kuing Posted at 2015-1-19 15:34:58 |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

700

Threads

110K

Posts

910K

Credits

Credits
94177
QQ

Show all posts

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

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

手机版Mobile version|Leisure Math Forum

2025-4-21 01:37 GMT+8

Powered by Discuz!

× Quick Reply To Top Return to the list