(A) font family settings
1. Description:
(1) Font command:
\ Textrm {Roman Family} fonts in braces are Roman Family font
(2) Font statement:
\ Rmfamily Roman Family command following fonts are fonts are Roman Family, until a new declaration covering the declaration appear.
2. Source:
% 导言区
\documentclass{article}
\usepackage{ctex}
% 正文区
\begin{document}
% 字体族的设置:罗马字体, 无衬线字体 打字机字体 中文(黑体,宋体,仿宋,楷书)
% 字体命令
\textrm{Roman Family 罗马字体 }
\textsf{Sans Serif Family 无衬线字体}
\texttt{Typewriter Family 打字机字体 }
% 字体
{\songti 宋体}
{\heiti 黑体}
{\fangsong 仿宋}
{\kaishu 楷书}
% 字体声明
\rmfamily Roman Family 罗马字体
罗马字体
\sffamily Sans Serif Family 无衬线字体
\ttfamily Typewriter Family 打字机字体
\end{document}
3. Output:
(B) the font family settings
1. Source:
% 导言区
\documentclass{article}
\usepackage{ctex}
% 正文区
\begin{document}
% 字体系列的设置(粗细,宽度)
% 字体命令
\textmd{Medium Series}
\textbf{Boldface Series}
%字系列
\textbf{粗体}
\textit{斜体}
% 字体声明
\mdseries{Medium Series}
\bfseries{Boldface Series}
\end{document}
2. The output effect:
(Iii) font shapes provided
1. Source:
% 导言区
\documentclass{article}
\usepackage{ctex}
% 正文区
\begin{document}
% 字体形状设置(直立,斜体,伪斜体 ,小型大写)
% 字体命令
\textup{Upright Shape 直立}
\textit{Italic Shape 斜体}
\textsl{Slanted Shape 伪斜体}
\textsc{Small Caps Shape 小型大写}
% 字体声明
\upshape{Upright Shape}
\itshape{Slanted Shape}
\slshape{Slanted Shape}
\scshape{Small Caps Shape}
\end{document}
2. The output effect:
(D) the font size settings
1. Description:
In \ DocumentClass [options] {article} options: 10pt, 11pt, 12pt
(1) Standard font:
\ zihao { < size > }Used to adjust the font size. Where < size > of total RMS 16 th, as shown in Table below. Use \ zihao command to adjustWhen the font size, the text number West and Chinese font size is always consistent.
(2) Chinese Font Size:
2. Source:
% 导言区 10pt, 11pt, 12pt
\documentclass[12pt]{article}
\usepackage{ctex}
% 正文区
\begin{document}
% 字体大小
% 字体的大小
{\tiny Hello}\\
{\scriptsize Hello}\\
{\footnotesize Hello}\\
{\small Hello}\\
{\normalsize Hello}\\
{\large Hello}\\
{\Large Hello}\\
{\LARGE Hello}\\
{\huge Hello}\\
{\Huge Hello}\\
% 中文的字号
\zihao{0} 你好\\
\zihao{-0} 你好\\
\zihao{1} 你好\\
\zihao{-1} 你好\\
\zihao{2} 你好\\
\zihao{-2} 你好\\
\zihao{3} 你好\\
\zihao{-3} 你好\\
\zihao{4} 你好\\
\zihao{-4} 你好\\
\zihao{5} 你好\\
\zihao{-5} 你好\\
\zihao{6} 你好\\
\zihao{-6} 你好\\
\zihao{7} 你好\\
\zihao{8} 你好\\
\end{document}
3. The output effect:
(E) Functional writing documentation
1. Description:
In latex document, we can not set the font full of articles, we can use:
\ Newcommand {cmd} {def} to define a new command, the entire font set
Def put in to reduce the amount of code, but also conducive to change.
2. Source:
% 导言区
\documentclass{article}
\usepackage{ctex}
% 模块式编程
\newcommand{\myfont}{\textit{\textbf{\textsf{Fancy Family}}}}
% 正文区
\begin{document}
% 调用自己的函数
\myfont{Fancy Family}
\end{document}
3. The output effect: