3

code:

%!TeX program = pdfLaTeX
\documentclass{article}
\usepackage{CJKutf8,pinyin}
\usepackage[overlap,CJK]{ruby}
\usepackage{setspace}
\usepackage{xpinyin}

% Start Editing Document
\begin{document}

\begin{CJK}{UTF8}{bkai}
\begin{spacing}{2}
\ruby{帀}{Za}
\end{spacing}
\end{CJK}

\begin{CJK}{UTF8}{bkai}
\begin{spacing}{2}
\ruby{體}{Ti}
\end{spacing}
\end{CJK}

\end{document}

The first character 帀 can't be displayed and the second one 體 works.

Any suggestions are appreciated.

Mico
  • 506,678
  • Welcome to tex.se! This question (https://tex.stackexchange.com/questions/223893/how-do-i-find-out-what-chinese-fonts-are-installed-with-my-mactex-installation) may help. And also this one (https://tex.stackexchange.com/questions/200449/how-to-input-traditional-chinese-in-pdflatex). – Cicada Dec 30 '19 at 02:28
  • 1
    Please consider switching to XeLaTeX or LuaLaTeX. Also, see https://ctan.org/pkg/ctex – Ruixi Zhang Dec 30 '19 at 03:54

1 Answers1

3

I expect that 帀 is not in the font bkai. It is not in bsmi or gbsn either.

Instead of using pdflatex and 8-bit fonts, it is easier to use xelatex and Unicode system fonts.

za ti

MWE

%!TeX program = XeLaTeX
\documentclass[varwidth,border=6pt]{standalone}
\usepackage{xeCJK}
\setCJKmainfont{Noto Sans CJK SC}
\usepackage[overlap,CJK]{ruby}
\usepackage{setspace}
\usepackage{xpinyin}

% Start Editing Document
\begin{document}
\Large
%\begin{CJK}{UTF8}{bkai}
\begin{spacing}{2}
\ruby{帀}{Za}
\end{spacing}
%\end{CJK}

%\begin{CJK}{UTF8}{bkai}
\begin{spacing}{2}
\ruby{體}{Ti}
\end{spacing}
%\end{CJK}

\end{document}

Edited to add:

Note that CJKutf8 under pdflatex selects missing characters from the specified (unicode) font, so that:

\begin{CJK}{UTF8}{Noto Serif CJK TC}
\begin{spacing}{2}
\ruby{帀}{Za}
\end{spacing}
\end{CJK}

produces

za


Edit2:

ruby is not really required if you have xpinyin.

\xpinyin*{帀}

produces

za pinyin

with the tone mark.

It works in both xelatex and pdflatex, but in pdflatex you will have to load a nice-looking font for the Latin of the pinyin using \usepackage{...} (see the manual: do texdoc xpinyin).


Sample

5e00

MWE

\documentclass{article}%[12pt,varwidth,border=6pt]{standalone}
\usepackage{xcolor}
\pagecolor{red!3}

\usepackage{fontspec}
\newfontface\ffa{BabelStone Han}[Colour=blue]
\newfontface\ffb{CloudSongDaGBK}
\newfontface\ffc{\detokenize{DFKai-SB}}
\newfontface\ffd{GenEi Koburi Mincho TTF}
\newfontface\ffe{Heiti TC}
\newfontface\fff{IPAexMincho}
\newfontface\ffg{KaiTi}
\newfontface\ffh{Kochi Mincho}
\newfontface\ffi{KouzanBrushFont}

\newfontface\fga{MingLiU}
\newfontface\fgb{NemukeMedium}
\newfontface\fgc{Noto Serif JP}
\newfontface\fgd{Noto Serif JP Black}
\newfontface\fge{Noto Serif JP ExtraLight}
\newfontface\fgf{SentyTang}
\newfontface\fgg{SentyWen}
\newfontface\fgh{Source Han Serif}
\newfontface\fgi{Togoshi Mincho}

\setmainfont{Noto Serif}
\newcommand\mfsize{\huge}
\newcommand\theegsym{帀}
\begin{document}
\section*{Sampling {\mfsize\ffa \theegsym }}

\vspace{24pt}

\begin{tabular}{rccl}
BabelStone Han & \mfsize\ffa \theegsym & \mfsize \fga \theegsym &MingLiU \\
\ &\ & \ & \ \\ 
CloudSongDaGBK & \mfsize\ffb \theegsym & \mfsize \fgb \theegsym &NemukeMedium \\
\ &\ & \ & \ \\ 
DFKai-SB & \mfsize\ffc \theegsym & \mfsize \fgc \theegsym &Noto Serif JP \\
\ &\ & \ & \ \\ 
GenEi Koburi Mincho TTF & \mfsize\ffd \theegsym & \mfsize \fgd \theegsym &Noto Serif JP Black \\
\ &\ & \ & \ \\ 
Heiti TC & \mfsize\ffe \theegsym & \mfsize \fge \theegsym &Noto Serif JP ExtraLight \\
\ &\ & \ & \ \\ 
IPAexMincho & \mfsize\fff \theegsym & \mfsize \fgf \theegsym &SentyTang \\
\ &\ & \ & \ \\ 
KaiTi & \mfsize\ffg \theegsym & \mfsize \fgg \theegsym &SentyWen \\
\ &\ & \ & \ \\ 
Kochi Mincho & \mfsize\ffh \theegsym & \mfsize \fgh \theegsym &Source Han Serif \\
\ &\ & \ & \ \\ 
KouzanBrushFont & \mfsize\ffi \theegsym & \mfsize \fgi \theegsym &Togoshi Mincho \\

\end{tabular}


\end{document}
Cicada
  • 10,129
  • Thank you, the solution works out greatly. The following question, is there a way to get the bkai-ish style font with the 帀 displayed? Here is a example font list from overleaf, however, bkai-ish style for 帀 is not one of them – Zhenshan Jin Feb 09 '20 at 15:44
  • @ZhenshanJin I don't know Overleaf. For font questions, https://graphicdesign.stackexchange.com/questions/tagged/fonts may be of help. Or else you can look: a utility like BabelPad will list which system fonts have a specified character. See edited answer for example of a random sample of some fonts with U+5E00. – Cicada Feb 12 '20 at 12:11