Forgot password
 Register account
View 1498|Reply 1

波浪~

[Copy link]

673

Threads

110K

Posts

218

Reputation

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

673

Threads

110K

Posts

218

Reputation

Show all posts

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

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

Quick Reply

Advanced Mode
B Color Image Link Quote Code Smilies
You have to log in before you can reply Login | Register account

$\LaTeX$ formula tutorial

Mobile version

2025-7-20 13:56 GMT+8

Powered by Discuz!

Processed in 0.022560 seconds, 25 queries