CTeX-org / forum

A temporarily alternate forum of `bbs.ctex.org`
https://t.me/chinesetex
Apache License 2.0
210 stars 16 forks source link

如何在article中调整所有caption为楷体 #280

Closed Firestar-Reimu closed 1 year ago

Firestar-Reimu commented 1 year ago

OS: Arch Linux TeXLive 2023

想问一下,如何在article/ctexart中调整所有图表的caption为楷体

包括“图1”、“表1”这样的也要是楷体


我的正文用的是宋体,试过\caption{\kaishu{示例}}这样的,但是这样生成的“图1”、“表1”这样的不是楷体

我也试过斜体弄成楷体,然后\captionsetup{font=it},但是这样数字也会变成斜体

note286 commented 1 year ago
\documentclass{ctexart}
\usepackage{caption}
\DeclareCaptionFont{kaiti}{\CJKfontspec{KaiTi}}
\captionsetup{font=kaiti}
\begin{document}
\begin{figure}
\caption{测试ABCabc123}
\end{figure}
\end{document}

image