\documentclass [10pt]{article} %10pt 是normalsize的大小
\usepackage{ctex}
\newcommand{\myfont}{\textbf{\textsf{Fancy Text}}} % 用newcommand命令设置字体
\begin{document}
% 字体族设置(罗马字体、无衬线字体、打字机字体)
\textrm{Roman Family} % 罗马字体
\textsf{Sans Serif Family}
\texttt{Typewritter Family}
{\rmfamily Roman Family} {\sffamily Sans Serif Family} {\ttfamily Typewritter Family}
% 字体系列设置(粗细、宽度)
\textmd{Medium Series} \textbf{Boldface Series}
{\mdseries Medium Series} {\bfseries Boldface Series}
% 字体形状(直立,斜体,伪斜体,小型大写)
\textup{Upright Shape} \textit{Italic Shape}
\textsl{Slanted shape} \textsc{Small Caps Shape}
{\upshape Upright Shape} {\itshape Italic Shape}
{\slshape Slanted shape} {\scshape Small Caps Shape}
% 中文字体
{\songti 宋体} \quad {\heiti 黑体} \quad {\fangsong 仿宋} \quad {\kaishu 楷书}
中文字体的\textbf{粗体}与\textit{斜体}
%字体大小, 与normalsize相对应的大小
{\tiny Hello}
{\scriptsize Hello} \\
{\footnotesize Hello} \\
{\normalsize Hello}\\
{\large Hello}
{\Large Hello}
{\LARGE Hello}
{\huge Hello}
{\Huge Hello}
%中文字号设置命令
\zihao{-0} 你好!
\myfont
\end{document}
TexStudio/LaTex 进行字体设置
最新推荐文章于 2023-04-27 21:22:41 发布