1

I am trying to write in Chinese this character 爫 using latex. But I only get a square 􀀀

I am sure the character is on the font, as I have used it in excel for example.

This is my code:

%!TeX program = XeLaTeX

\documentclass{article}

\usepackage{xeCJK}

\setCJKmainfont{清松手寫體1}

\begin{document}

    爫


\end{document}

I am using TEXstudio And XeLaTex to compile.

Thanks

2
  • 3
    quite probably it is not in the font and excel is using some fallback font. Dec 2, 2023 at 21:30
  • Welcome to TeX.SE.
    – Mico
    Dec 2, 2023 at 21:58

1 Answer 1

1

(too long for a comment, hence posted as an answer)

How attached are you to the xeCJK machinery and the Qingsong Handwriting font package? If your answer is "I'm not closely attached", you could consider loading the fontspec package along with a suitable Opentype font. For instance, both Noto Serif SC and Noto Serif TC feature the needed glyph.

Incidentally, fontspec is usable by both XeLaTeX and LuaLaTeX.

enter image description here

%!TeX program = XeLaTeX
\documentclass{article}

\usepackage{fontspec}
\setmainfont{Noto Serif SC} % https://fonts.google.com/noto/specimen/Noto+Serif+SC
   % or should it be 'Noto Serif TC'?
\begin{document}
    爫
\end{document}
7
  • 1
    Thanks for your help, this solved the problem.
    – ManuTen
    Dec 3, 2023 at 1:06
  • @ManuTen - Thanks. If you feel that your typeseting problem has been fully solved by my answer, feel free to click on the "accept" check-mark symbol. ;-)
    – Mico
    Dec 3, 2023 at 16:52
  • Hi, it was working, but then I began to game this error: Undefined control sequence. \setmainfont Missing \begin{document}. \setmainfont{N I am using the same program above. It compiles and makes a pdf with the name of the font.
    – ManuTen
    Jan 7 at 0:45
  • @ManuTen - If \setmainfont is throwing an "Undefined control sequence" error, your document isn't loading the fontspec package. (This package defines the \setmainfont macro.)
    – Mico
    Jan 7 at 1:18
  • 1
    I solved it, I unistalled mixtex and deleted its c drive files and reinstalled
    – ManuTen
    Jan 8 at 2:00

You must log in to answer this question.

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