[TOC]html
本系列是有关LaTeX的学习系列,共计19篇,本章节是第9篇。 前一篇:08 LaTeX学习系列之---Latex 的中文操做 后一篇:10LaTeX学习系列之---Latex的文档结构 总目录:19LaTeX学习系列之---LaTeX的总结编程
1.字体族的设置函数
2.字体系列的设置学习
3.字体形状的设置字体
4.字体大小的设置spa
5.函数式编写文档code
(1)字体命令:
\textrm{Roman Family} 在花括号内的字体都是Roman Family 字体orm
(2)字体声明:
\rmfamily Roman Family 该命令下面的字体都是是Roman Family字体,直到新的声明出现覆盖该声明。htm
% 导言区 \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}
% 导言区 \documentclass{article} \usepackage{ctex} % 正文区 \begin{document} % 字体系列的设置(粗细,宽度) % 字体命令 \textmd{Medium Series} \textbf{Boldface Series} %字系列 \textbf{粗体} \textit{斜体} % 字体声明 \mdseries{Medium Series} \bfseries{Boldface Series} \end{document}
% 导言区 \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}
在\documentclass[可选项]{article} 可选项:10pt, 11pt,12ptblog
% 导言区 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}
在latex文档里,咱们不可能满篇文章的设置字体,咱们能够用:
\newcommand{cmd}{def} 来定义一个新的命令,把字体的总体设置
放在def里,减小代码量,也利于更改。
% 导言区 \documentclass{article} \usepackage{ctex} % 模块式编程 \newcommand{\myfont}{\textit{\textbf{\textsf{Fancy Family}}}} % 正文区 \begin{document} % 调用本身的函数 \myfont{Fancy Family} \end{document}
本系列是有关LaTeX的学习系列,共计19篇,本章节是第9篇。 前一篇:08 LaTeX学习系列之---Latex 的中文操做 后一篇:10LaTeX学习系列之---Latex的文档结构 总目录:19LaTeX学习系列之---LaTeX的总结