\documentclass{article}% 也可book,report,letter以及支持中文排版的ctexart / ctexrep / ctexbook(使用这三个类时,可不用调用ctex宏包)。该命令用于引入一个文档类
% 导言区,主要用于全局设置,及调用宏包\usepackage{ctex}% 引用ctex宏包\begin{document}% 字体族设置,罗马字体(衬线字体),无衬线字体,打字机字体(等宽字体)\textrm{Roman Family} \textsf{Sans Serif Family} \texttt{Typewriter Family}% 字体设置命令,设置{}内为指定字体{\rmfamily Roman Family} {\sffamily Sans Serif Family} {\ttfamily Typewriter Family}% 字体声明,声明其后为指定字体,{}限定字体声明作用范围{\rmfamily Chinese lawmakers on Friday voted to pass a new law on wetlands protection, establishing the country's first specialized law on the issue.}{\ttfamily Chinese lawmakers on Friday voted to pass a new law on wetlands protection, establishing the country's first specialized law on the issue.}% 字体系列设置,粗细、宽度(带bf的是粗体)\textmd{Medium Series} \textbf{Bold Face Series}{\mdseries Medium Series} {\bfseries Bold Face 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 宋体} {\heiti 黑体} {\fangsong 仿宋} {\kaishu 楷书}中文字体的\textbf{粗体}与\textit{斜体}%字体大小{\tiny hello}\\{\scriptsize hello}\\{\footnotesize hello}\\{\small hello}\\{\normalsize hello}\\{\large hello}\\{\Large hello}\\{\LARGE hello}\\{\huge hello}\\{\Huge hello}\\%中文字号命令\zihao{4}你好!% 0代表初号,-0代表小初号;1代表一号,-1代表小一号;\end{document}
结果展示: