I am writing a document in Chinese and would like to choose a font for the caption label, different from that is used in the main text. I know it is tricky to work with Chinese font in LaTeX, but I really want to get this straight.
To set caption label to use a font defined readily in ctex
, one could do the following
\documentclass[UTF8]{article}
\usepackage{ctex}
\usepackage{float}
\usepackage{graphicx}
\usepackage{caption}
\DeclareCaptionFont{kai}{\kaishu}
\captionsetup{labelfont = kai}
\begin{document}
正文
\begin{figure}[h]
\centering
\includegraphics[scale = 0.3]{example.png}
\caption{图注}
\end{figure}
\end{document}
However, I have no idea of how to declare a font that is not already defined in ctex
for the caption label. Like the font Weibei SC
, which can be used with package fontspec
for the main text
\documentclass[11pt, a4paper]{article}
\usepackage{fontspec}
\setmainfont{Weibei SC}
\begin{document}
正文
\end{document}
Could someone help me on this issue? Thanks in advance!