【LaTeX笔记2】字体族、字体形状、字体大小

1  代码部分

% 导言区,这里还可以设置全局的字体大小一般有 10pt,11pt,12pt
\documentclass[12pt]{article}

\usepackage{ctex}%引入中文包,使得中文可以正常显示

%标题、作者及日期
\title{字体族、字体形状、字体大小}
\author{张三丰}
\date{\today}
%自定义混合命令
\newcommand{\myfont}{\textbf{\textsf{Fancy Text}}}

% 正文区(文稿区)
\begin{document}
	\maketitle
	%1、字体族设置(罗马字体、无衬线字体、打印机字体)
	\textrm{Roman Family} \textsf{Sans Serif Family}  \texttt{Typewriter Family}%使用字体命令作用于命令的参数
	
	\rmfamily Roman Family {\sffamily Sans Serif Family} {\ttfamily Typewriter Family}%用于声明后续字体类型,因为这里设置了三种,所以后面两种需要添加内部作用域
	
	%本段字体会默认继承rmfamily字体类型
	As a general framework, Mask R-CNN is compatible with complementary techniques developed for detection/segmentation.
	
	%还可以像上面一样使用{}分组设置字体类型
	{\ttfamily Thanks to its generality and flexibility.}
	
	%2、字体形状设置(直立、斜体、伪斜体、小型大写)
	\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}
	
	%3、中文字体设置
	{\songti 宋体} \quad {\heiti 黑体} \quad {\fangsong 仿宋} \quad {\kaishu 楷书}
	
	%4、中文字体的粗体与斜体
	中文字体的\textbf{粗体}与\textit{斜体}
	
	%5、字体大小
	{\tiny	hello} \quad {\scriptsize	hello}\quad{\footnotesize	hello}\quad{\small	hello}\quad{\normalsize	hello}\\
	{\large	hello}\quad{\Large	hello}\quad{\LARGE	hello}\quad{\huge	hello}\quad{\Huge	hello}
	
	%6、中文字体大小
	\zihao{2} 你好
	
	%7、调用自定义混合命令
	\myfont
	
\end{document}

2  效果演示部分


评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值