%导言区
\documentclass[10pt]{article}%文档类参数控制normalsize大小
\usepackage{ctex}
%LaTex思想是格式与内容分离,不建议在文档中使用大量命令
%可使用newcommand命令定义一个新的命令,需要修改时直接修改命令即可
\newcommand{\myfont}{\textit{\textbf{\textsf{Fancy Text}}}}
%正文区
\begin{document}
%字体族设置(罗马字体、无衬线字体、打字机字体)
\textrm{Roman Family}%字体设置命令
\textsf{Sans Serif Family}
\texttt{Typewriter Family}
\rmfamily Roman Family%字体设置声明
\sffamily Sans Serif Family
\ttfamily Typewriter Family
{\sffamily who you are? you find self on everyone ground. take you as the same as the others!}%使用大括号限定声明范围
\ttfamily who you are? you find self on everyone ground. take you as the same as the others!%声明不使用大括号,后续字体全部是一样的字体
%字体系列设置(粗细、宽度)
\textmd{Medium Series}
\textbf{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 楷书}
%字体大小设置
{\tiny hello}\\%\\代表换行
{\scriptsize hello}\\
{\footnotesize hello}\\
{\small hello}\\
{\normalsize hello}\\
{\large hello}\\
{\Large hello}\\
{\LARGE hello}\\
{\huge hello}\\
{\Huge hello}\\
%中文字号设置命令
%命令细节可在命令行窗口用texdoc ctex查看
\zihao{5} 你好!%-0代表小初
\myfont
\end{document}
LaTex字体设置
最新推荐文章于 2024-05-08 10:22:06 发布