2

I'm trying to type the Cantonese character 哋 in Latex, but the usual methods for typing Chinese don't seem to be working. How can I type 哋 (and other characters used in Cantonese)?

7
  • Sorry for the lack of information. I didn't get any error message. The character simply didn't show up. I'm trying to type 我哋語言學家, but only 我語言學家 shows up. I'm using Overleaf. Here are the relevant packages, etc. I'm using: \documentclass[11pt]{book} \usepackage[utf8]{inputenc} \usepackage[T1]{fontenc} I tried using \usepackage{xeCJK}, but it had no effect Dec 18, 2020 at 13:35
  • You are probably using a font that does not contain this character. Adding the command \tracinglostchars=2 near the top of the document will give you a warning message whenever this happens. By default, TeX silently logs the warning to your .log file.
    – Davislor
    Dec 18, 2020 at 14:27
  • 1
    you will find it much easier to use xelatex or luatex . On Overleaf my answer works with \newfontfamily{\cfont}{WenQuanYi Micro Hei} Dec 18, 2020 at 14:29
  • 2
    You need to pick one of these that has all the characters that you need overleaf.com/learn/latex/Questions/… Dec 18, 2020 at 14:31
  • Thanks! I managed to incorporate the code you gave into my document and got it to work. - specifically it was \usepackage{fontspec} that worked Dec 18, 2020 at 14:42

1 Answer 1

2

You gave no clues as to what you tried or what error you got, but my Browser used Microsoft YaHei font to display your question, so I did same here (with xelatex)

enter image description here

\documentclass{article}

\usepackage{fontspec}

\newfontfamily{\cfont}{Microsoft YaHei}

\begin{document}





I'm trying to type the Cantonese character {\cfont 哋} in Latex, but the usual
methods for typing Chinese don't seem to be working. How can I
type {\cfont 哋} (and other characters used in Cantonese)


\end{document}

Or on Overleaf with the font WenQuanYi Micro Hei (picked at random from Overleaf's Chinese fonts page)

enter image description here

1
  • Sorry for the late reply, but thanks! Despite the fact my question lacked the necessary information to answer the question, I was able to figure it out from the code you provided. Jan 28, 2021 at 3:28

You must log in to answer this question.

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