LaTeX学习-day02
教程链接:B站
使用环境:
- 系统:Windows 10
- TeX 系统:TeX Live (官网下载)(清华源)
- IDE:Tex Studio
字体格式
- 代码:
% 导言区
\documentclass[10pt]{article} %10pt-12pt
\usepackage{ctex}
%核心思想是:内容与格式分离,建议这里定义命令执行格式,然后引用即可
\newcommand{\myfont}{\textit{\textbf{\textsf{Fancy Text}}}}
% 正文区(文稿区)
\begin{document}
% 字体族设置(罗马字体、无衬线字体、打字机字体)
%注解:方式一使用字体命令,可以看到text-rm,即字体+简写
\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 evryone around. take you as the same as others!
%大括号限定作用范围
{\ttfamily Are you wiser than others? defintely no. in some ways, may it is true. What can you achieve? a luxurious house? a brillilant car? an admirable career? who knows?}
%字体系列设置(粗细、宽度)
\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 宋体} \quad {\heiti 黑体} \quad {\fangsong 仿宋} \quad {\kaishu 楷书}
中文字体的\textbf{粗体}与\textit{斜体}
%字体大小与\documentclass[10pt]{article}中的[10pt]有关,10pt = 10磅
{\tiny Hello}\\
{\scriptsize Hello}\\
{\footnotesize Hello}\\
{\small Hello}\\
{\normalsize Hello}\\
{\large Hello}\\
{\Large Hello}\\
{\LARGE Hello}\\
{\huge Hello}\\
{\Huge Hello}\\
%中文字号设置命令
\zihao{-0} 你好!
\zihao{5} 你好!
\myfont
\end{document}
- 结果