2

哇~~~,你太棒了!

This usage of the Chinese tilde ~ needs to look the above: the tilde has the same width as a Chinese character, and is in the center vertically. However, it comes out looking like:

enter image description here

(I'm on Overleaf using XeLaTeX.)

Question: How do I get the Chinese tilde "哇~~~" to look right?


Here's a MWE for my local computer (also using XeLaTeX):

\documentclass{article}

\usepackage{xpinyin}

\begin{document}

hello  哇~~~,你太棒了!
 
\end{document}

enter image description here

(I'm not sure why, but it only displays the Chinese if I use the xpinyin package.)

1
  • Can you share a MWE? I’m not sure what packages you’re using or what commands?
    – Davislor
    May 3, 2022 at 21:59

1 Answer 1

4

My browser used Microsoft YaHei to show your question, so I used the same with xetex:

enter image description here

\documentclass{article}

\usepackage{fontspec}
\setmainfont{Microsoft YaHei}

\begin{document}

哇~~~

\end{document}

On Overleaf the available Chinese fonts are listed here

https://www.overleaf.com/learn/latex/Questions/Which_OTF_or_TTF_fonts_are_supported_via_fontspec%3F#Chinese

so you just need to pick one that you like and has a reasonable full width tilde.

eg this project with Noto Sans CJK

https://www.overleaf.com/read/pyxqhxxtzhdj

enter image description here

1
  • Thanks, changing the font works, although I'd be better off changing it locally. Using 哇{\CJKfontspec{Noto Serif CJK SC:style=Regular}~~~},你太棒了! looks fine. May 3, 2022 at 22:21

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .