LaTeX基础教程之字体篇(样式及大小)

\documentclass{article}% 也可book,report,letter以及支持中文排版的ctexart / ctexrep / ctexbook(使用这三个类时,可不用调用ctex宏包)。该命令用于引入一个文档类
% 导言区,主要用于全局设置,及调用宏包

\usepackage{ctex}% 引用ctex宏包

\begin{document}
	% 字体族设置,罗马字体(衬线字体),无衬线字体,打字机字体(等宽字体)
	\textrm{Roman Family} \textsf{Sans Serif Family} \texttt{Typewriter Family}% 字体设置命令,设置{}内为指定字体
	
	{\rmfamily Roman Family} {\sffamily Sans Serif Family} {\ttfamily Typewriter Family}% 字体声明,声明其后为指定字体,{}限定字体声明作用范围
	
	{\rmfamily Chinese lawmakers on Friday voted to pass a new law on wetlands protection, establishing the country's first specialized law on the issue.}
	
	{\ttfamily Chinese lawmakers on Friday voted to pass a new law on wetlands protection, establishing the country's first specialized law on the issue.}
	
	% 字体系列设置,粗细、宽度(带bf的是粗体)
	\textmd{Medium Series} \textbf{Bold Face Series}
	
	{\mdseries Medium Series} {\bfseries Bold Face 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 宋体} {\heiti 黑体} {\fangsong 仿宋} {\kaishu 楷书}
	
	中文字体的\textbf{粗体}与\textit{斜体}
	
	%字体大小
	{\tiny hello}\\
	{\scriptsize hello}\\
	{\footnotesize hello}\\
	{\small hello}\\
	{\normalsize hello}\\
	{\large hello}\\
	{\Large hello}\\
	{\LARGE hello}\\
	{\huge hello}\\
	{\Huge hello}\\
	
	%中文字号命令
	\zihao{4}你好!% 0代表初号,-0代表小初号;1代表一号,-1代表小一号;
	
\end{document}

 结果展示:

  • 1
    点赞
  • 21
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值