% 导言区
\documentclass[10pt]{ctexart}%10pt为字体大小
%使用ctexart后就可以不引用ctex宏包了
\title{\heiti My LaTeX Document}%字体为黑体
\author{\kaishu forever}%字体为楷书
\date{\today}
% 正文区
\begin{document}
\maketitle%用于输出导言信息
%字体族设置
\textrm{字体是罗马字体}
\textsf{字体是无衬线字体}
\texttt{字体是打字机字体}
%还有很多种字体都是\text??格式
\rmfamily 后续字体都是罗马字体
\sffamily 后续字体都是无衬线字体
\ttfamily 后续字体都是打字机字体
可以使用大括号进行限制字体应用范围
如:{\rmfamily 代码括号内为罗马字体}
% 字体粗细、宽度设置
\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 songti
\fangsong fangsong
\textbf{中文粗体}
\textit{中文斜体}
字体大小等命令过于繁琐参见帮助文档
\zihao{5} 字号
\end{document}
LaTeX 学习记录4-字体设置
最新推荐文章于 2023-10-18 11:30:18 发布