楼主: oliyiyi
1355 0

Changing the font size in LaTeX [推广有奖]

版主

已卖:2998份资源

泰斗

1%

还不是VIP/贵宾

-

TA的文库  其他...

计量文库

威望
7
论坛币
6325 个
通用积分
31675.1336
学术水平
1454 点
热心指数
1573 点
信用等级
1364 点
经验
384134 点
帖子
9629
精华
66
在线时间
5508 小时
注册时间
2007-5-21
最后登录
2025-7-8

初级学术勋章 初级热心勋章 初级信用勋章 中级信用勋章 中级学术勋章 中级热心勋章 高级热心勋章 高级学术勋章 高级信用勋章 特级热心勋章 特级学术勋章 特级信用勋章

楼主
oliyiyi 发表于 2016-2-6 20:57:38 |AI写论文

+2 论坛币
k人 参与回答

经管之家送您一份

应届毕业生专属福利!

求职就业群
赵安豆老师微信:zhaoandou666

经管之家联合CDA

送您一个全额奖学金名额~ !

感谢您参与论坛问题回答

经管之家送您两个论坛币!

+2 论坛币

Changing the font size in LaTeX can be done on two levels, either affecting the whole document or parts/elements of it. Using a different font size on a global level will affect all normal-sized text as well as the size of headings, footnotes, etc. By changing the font size locally, however, a single word, a few lines of text, a large table or a heading throughout the document may be modified.


Changing the font size on a document-wide level

The standard classes, article, report and book support 3 different font sizes, 10pt, 11pt, 12pt (by default 10pt). The font size is set through the optional argument, e.g.:



  1. 1\documentclass[12pt]{report}
复制代码


In most cases, the available font sizes for the standard classes are sufficient.


Other font sizes

Should you require a different font size for your document, use the extsizes package. It allows for the following font sizes: 8pt, 9pt, 10pt, 11pt, 12pt, 14pt, 17pt, 20pt.

The documentclass names are slightly different from the standard classes:



  1. 1234%Article\documentclass[9pt]{extarticle}%Report\documentclass[14pt]{extreport}
复制代码



The KOMA-script and memoir class

The KOMA-script and memoir classes are more flexible when it comes to font sizes. Please see the documentation for more details.


Changing the font size locally

LaTeX knows several font size modifier-commands (from biggest to smallest):

[size=1em]

[size=1em]1


[size=1em]2


[size=1em]3


[size=1em]4


[size=1em]5


[size=1em]6


[size=1em]7


[size=1em]8


[size=1em]9


[size=1em]10


[size=1em][size=1em]

  1. \Huge\huge\LARGE\Large\large\normalsize (default)\small\footnotesize\scriptsize\tiny
复制代码





A table of the exact font sizes in points can be found on wikibooks.

A good rule of thumb is don’t use too many different sizes and don’t make things too small/big.

There are two possible ways to use these font size modifier commands, inline or as environment:

[size=1em]

[size=1em]1


[size=1em]2


[size=1em]3


[size=1em]4


[size=1em]5


[size=1em]6


[size=1em]7


[size=1em][size=1em]

  1. % inline{\Large This is some large text\par} % environment\begin{footnotesize}...\end{footnotesize}
复制代码





The \par at the end of the inline example adjusts baselineskip, the minimum space between the bottom of two successive lines. See the example in Rob’s comment below.


A few more options

The moresize package adds two more to the list above, \HUGE and \ssmall. The latter fills the gap between \scriptsize and \tiny.

While using \HUGE, LaTeX displays a warning saying the font size is not available for the standard font and that it was replaced by the next smaller (\Huge). When using another font type, such as the Adobe Times Roman equivalent available in thePSNFSS package (see example below), however, you can benefit from that font size.

[size=1em]

[size=1em]1


[size=1em]2


[size=1em]3


[size=1em]4


[size=1em]5


[size=1em]6


[size=1em]7


[size=1em][size=1em]

  1. \documentclass[11pt]{report}\usepackage{mathptmx}\usepackage[11pt]{moresize}...{\HUGE A huge text} {\ssmall Can you still read this ``ssmall'' text?}
复制代码





Note: The figure is scaled and therefore does not show the actual font size. It illustrates the difference between the font sizes.

Still not enough?

Here is alternative, more flexible approach. The anyfontsize package scales the next bigger/smaller font size available to whatever size you like.

The two arguments to \fontsize are the actual font size and the size of the baseline-skip. The baseline-skip should be set to roughly 1.2x the font size.



  1. \fontsize{size}{baselineskip}
复制代码


The following example shows font size 50pt/5pt and compares them with \Huge and\tiny.

[size=1em]

[size=1em]1


[size=1em]2


[size=1em]3


[size=1em]4


[size=1em]5


[size=1em]6


[size=1em]7


[size=1em][size=1em]

  1. \documentclass[11pt]{report}\usepackage{mathptmx}\usepackage{anyfontsize}\usepackage{t1enc}...{\fontsize{50}{60}\selectfont Foo}{\fontsize{5}{6}\selectfont bar!}{\Huge Foo}{\tiny bar!}
复制代码






二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

关键词:Changing LaTeX CHAN Hang atex different document elements standard article

缺少币币的网友请访问有奖回帖集合
https://bbs.pinggu.org/thread-3990750-1-1.html

您需要登录后才可以回帖 登录 | 我要注册

本版微信群
加好友,备注jltj
拉您入交流群
GMT+8, 2026-2-5 14:11