本博文源于Latex的字体输入进行学习,包含字体输入中的粗细、形状、字体名、字体大小。
实验效果
字体大小:
实验内容
Latex格式中每种样式大概有两种方式进行修改,大家选择一种即可。我看好的是两者的混用,每一种你都看得懂。比如说
\textrm{
Roman Family Hello Latex!} \\
{
\rmfamily Roman Family Hello Latex!}\\
这是一种对字体样式进行设置,大家可能会发现:单独使用时,第一种更规整,如果要套用第二种格式的时候,就可以在学到更多样式后进行套用。
字体粗细
\textmd{
Medium Series Hello}\\
\textbf{
Boldface Series Hello}\\
\\
{
\mdseries Medium Series Hello}\\
{
\bfseries Boldface Series Hello} \\ \\
md按照字面意思来看就是中等,bf加粗字体
字体形状
字体形状主要有直立、伪斜体和小型大写。
\textup{
Upright Shape Hello!} \\
\textit{
Italic Shape Hello!} \\
\textsl{
Slanted Shape Hello!}\\
\textsc{
Small Caps Shape}\\
{
\upshape Upright Shape Shape Hello!}\\
{
\itshape Italic Shape Shape Hello!}\\
{
\slshape Slanted Shape Hello!} \\
{
\scshape Small Caps Shape Shape Hello!}\\
up是直立,it是斜体,sl伪斜体,小型大写是sc
字体样式
包括三种,有罗马字体、无衬线字体、打字机字体。
- 罗马字体,Roman Family,字体起始有装饰
- 无衬线字体:Sans Serif 字体起始无装饰
- 打字机字体:Typewriter Family字体宽度都相同
\textrm{
Roman Family Hello Latex!} \\
\textsf{
Sans Serif Family Hello Latex!} \\
\texttt{
Typewriter Family Hello Latex!} \\
{
\rmfamily Roman Family Hello Latex!}\\
{
\sffamily Sans Serif Family Hello Latex!}\\
{
\ttfamily Typewriter Family Hello Latex!}\\ \\
字体大小
就是按照英文的单词进行设置比如你想大那就large,如果你想小那就tiny
\tiny{
Hello!}\\
\scriptsize{
Hello!}\\
\footnotesize{
Hello!}\\
\small{
Hello!}\\
\normalsize{
Hello!}\\
\large{
Hello!}\\
\Large{
Hello!}\\
\LARGE{
Hello!}\\
\huge{
Hello!}\\
\Huge{
Hello!}\\
实验完整源码
已在TeXworks运行成功!
\documentclass[UTF8]{
ctexart}
\begin{
document}
\textrm{
Roman Family
Hello Latex!} \\
Hello Latex!
\textsf{
Sans Serif Family
Hello Latex!} \\
Hello Latex!
\texttt{
Typewriter Family
Hello Latex!} \\
{
\rmfamily Roman Family Hello Latex!}\\
{
\sffamily Sans Serif Family Hello Latex!}\\
{
\ttfamily Typewriter Family Hello Latex!}\\ \\
% 字体系列,根据字体粗度和宽度来划分
\textmd{
Medium Series Hello}\\
\textbf{
Boldface Series Hello}\\
\\
{
\mdseries Medium Series Hello}\\
{
\bfseries Boldface Series Hello} \\ \\
% 字体形状学习
\textup{
Upright Shape Hello!} \\
\textit{
Italic Shape Hello!} \\
\textsl{
Slanted Shape Hello!}\\
\textsc{
Small Caps Shape}\\
{
\upshape Upright Shape Shape Hello!}\\
{
\itshape Italic Shape Shape Hello!}\\
{
\slshape Slanted Shape Hello!} \\
{
\scshape Small Caps Shape Shape Hello!}\\
%对字体族名、系列和形状都修改后进行学习
\textit{
\textbf{
\textsf{
Fancy Text}}}\\
\textnormal{
Normal Text}\\
\\
{
\itshape\bfseries\sffamily Fancy Text}\\
{
\normalfont Normal Text}\\
%对字体大小进行学习
\tiny{
Hello!}\\
\scriptsize{
Hello!}\\
\footnotesize{
Hello!}\\
\small{
Hello!}\\
\normalsize{
Hello!}\\
\large{
Hello!}\\
\Large{
Hello!}\\
\LARGE{
Hello!}\\
\huge{
Hello!}\\
\Huge{
Hello!}\\
\end{
document}
实验心得
学习这个的时候完全凭借,贫瘠的英语知识进行学习,只需要了解相应的中文即可。