Getting Started with latex (b) the font size settings
1. Set font family
(1) Font command:
\ textrm Roman Family {font} 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.
%导言区
\documentclass{article}
\usepackage{ctex}
%正文区
\begin{document}
% 字体族的设置:罗马字体, 无衬线字体 打字机字体 中文(黑体,宋体,仿宋,楷书)
%字体命令
\textrm{Roman Family}
\textsf{Sans Serif Family}
\texttt{Typewritter Family}
%字体
{\songti 宋体}
{\heiti 黑体}
{\fangsong 仿宋}
{\kaishu 楷书}
%字体声明
\rmfamily Roman Family
\sffamily Sans Serif Family
\ttfamily Typewritter Family
\end{document}
2. font family settings
%导言区
\documentclass{article}
\usepackage{ctex}
%正文区
\begin{document}
%字体系列的设置(粗细,宽度)
%字体命令
\textmd{Medium Series}
\textbf{Boldface Series}
%字系列
\textbf{粗体}
\textit{斜体}
%字体声明
\mdseries{Medium Series}
\bfseries{Boldface Series}
\end{document}
3. Font Size
Explanation: \ DocumentClass [options] {article} options: 10pt, 11pt, 12pt
. 1) Standard Font
2) Chinese font
% 导言区 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}
4. Functional writing documentation
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 whole set of fonts
on the def, the reduction in the amount of code, but also conducive to change.
% 导言区
\documentclass{article}
\usepackage{ctex}
\usepackage{xcolor}
% 模块式编程
\newcommand{\red}{\textcolor{red}}
\newcommand{\myfont}{\textbf}
% 正文区
\begin{document}
% 调用自己的函数
\red{hello}
\myfont {hello}
\end{document}