> For the complete documentation index, see [llms.txt](https://overleaf-pro.ayaka.space/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://overleaf-pro.ayaka.space/latex/zh-cn/wen-da/24-how-do-i-adjust-the-font-size.md).

# 如何调整字号？

## 引言

本文回顾了几种更改字号的方法——使用以下链接跳转到感兴趣的文章部分：

* [使用文档类设置字号](#setting-document-font-sizes)
* [使用 LaTeX 字号命令](#latex-font-size-commands)
* [使用 LaTeX 字号环境](#latex-font-size-environments)
* [使用 `\fontsize` 和 `\selectfont` 命令插入边注](#the-fontsize-and-selectfont-commands)
* [使用宏包更改字号](#other-packages-for-changing-font-size-relsize-and-scalefnt)
* [使用 tex.stackexchange 查找有用示例](#examples-from-texstackexchange)

## 设置文档字号

LaTeX 使用文档类，通过 `\documentclass` 命令来设置若干元素的默认字号，例如脚注和节标题，它们都是文档内容的一部分。文档类还支持选项，用于显式设置主文档正文（以及其他组件）的字号：

```latex
\documentclass[options]{class}
```

例如，article 类支持主文档正文使用 10pt、11pt 和 12pt：

```latex
\documentclass[11pt]{article}
```

正文将设置为 11pt，其他文档元素也会相应采用合适的值。

### extsizes 类

该 [extsizes 类](https://ctan.org/pkg/extsizes?lang=en) 其中 extarticle、extreport、extbook、extletter 和 extproc 支持 8pt、9pt、10pt、11pt、12pt、14pt、17pt 和 20pt 的字号。

#### 示例：使用 extarticle 类

下一个示例使用 `extarticle` 类将文档字号设置为 9pt。

```latex
\documentclass[9pt]{extarticle} % 注意 extarticle 文档类
% 使用 geometry 宏包与较小的
% 页面尺寸来创建文章图形
\usepackage[paperheight=6in,
   paperwidth=5in,
   top=10mm,
   bottom=20mm,
   left=10mm,
   right=10mm]{geometry}
\usepackage{lipsum}
\begin{document}
\section{引言}
\lipsum[1]
\subsection{更多细节}
\lipsum[1]
\end{document}
```

&#x20;[在 Overleaf 中打开此示例](https://www.overleaf.com/docs?engine=pdflatex\&snip_name=Demonstrating+the+extarticle+class\&snip=%5Cdocumentclass%5B9pt%5D%7Bextarticle%7D+%25+Note+the+extarticle+document+class%0A%25+Using+the+geometry+package+with+a+small%0A%25+page+size+to+create+the+article+graphic%0A%5Cusepackage%5Bpaperheight%3D6in%2C%0A+++paperwidth%3D5in%2C%0A+++top%3D10mm%2C%0A+++bottom%3D20mm%2C%0A+++left%3D10mm%2C%0A+++right%3D10mm%5D%7Bgeometry%7D%0A%5Cusepackage%7Blipsum%7D%0A%5Cbegin%7Bdocument%7D%0A%5Csection%7BIntroduction%7D%0A%5Clipsum%5B1%5D%0A%5Csubsection%7BMore+details%7D%0A%5Clipsum%5B1%5D%0A%5Cend%7Bdocument%7D)

此示例生成以下输出：

![extarticle 类演示](/files/6ffaed6b9d5ba00dfafaa5638e8b0382ca2cd23a)

## LaTeX 字号命令

LaTeX 提供了一组 10 个标准（预定义）命令来更改字号——请注意，文档类或 LaTeX 宏包可能会重新定义这些命令以改变实际的磅值。下表列出了这些命令，以及在正文使用 10pt（article 类的默认设置）时对应的磅值：

```latex
\documentclass{article}
```

![标准 LaTeX 字号命令](/files/80c4fa0ae3f54cb8e2e1ee55cd430a8daa93714d)

关于由以下命令生成的对应磅值 `\documentclass[11pt]{article}` 和 `\documentclass[12pt]{article}` 请参见 [字号对照表](https://tug.org/texinfohtml/latex2e.html#Font-sizes) 在 [LaTeX2e：非官方参考](https://tug.org/texinfohtml/latex2e.html#SEC_Overview).

下一张表列出了附加命令 `\HUGE` 和 `\ssmall` ，这些命令由 [`moresize` 宏包](https://ctan.org/pkg/moresize?lang=en)提供。对应字号是与 `moresize` 一起使用 [`extarticle` 文档类](https://ctan.org/pkg/extsizes):

```latex
\documentclass{extarticle}
\usepackage{moresize}
```

![extarticle 类字号命令](/files/3abbcc479fa1e972e32b2458ab8fbc8d8064e2c8)

### 示例：使用字号命令

下一个示例演示如何使用这些命令。

```latex
\documentclass{extarticle} % 注意 extarticle 文档类
% 使用 geometry 宏包与较小的
% 页面尺寸来创建文章图形
\usepackage[paperheight=6in,
   paperwidth=5in,
   top=10mm,
   bottom=20mm,
   left=10mm,
   right=10mm]{geometry}
\usepackage{moresize}
\begin{document}

{这段文本的大小是 \verb=\normalsize=，但现在它是 \tiny tiny
，直到我们通过 moresize 宏包把它变成 \small small 或 \ssmall ``ssmall''。
让我们恢复到 \normalsize 正常大小，然后 {\ttfamily \scriptsize 在组内使用等宽
\verb=\scriptsize= 文本放在一个组中}，然后再回到正常大小。现在，试试
\verb=\large= \large 文本，然后 {\sffamily \Large \verb=\Large= 无衬线文本}
 最后是 {\HUGE 非常大（\verb=\HUGE=）和 {\bfseries 粗体} 文本}
\end{document}
```

&#x20;[在 Overleaf 中打开此示例](https://www.overleaf.com/docs?engine=pdflatex\&snip_name=Demonstrating+font+size+commands\&snip=%5Cdocumentclass%7Bextarticle%7D+%25+Note+the+extarticle+document+class%0A%25+Using+the+geometry+package+with+a+small%0A%25+page+size+to+create+the+article+graphic%0A%5Cusepackage%5Bpaperheight%3D6in%2C%0A+++paperwidth%3D5in%2C%0A+++top%3D10mm%2C%0A+++bottom%3D20mm%2C%0A+++left%3D10mm%2C%0A+++right%3D10mm%5D%7Bgeometry%7D%0A%5Cusepackage%7Bmoresize%7D%0A%5Cbegin%7Bdocument%7D%0A%0A%7BThe+size+of+this+text+is+%5Cverb%3D%5Cnormalsize%3D+but+now+it+is+%5Ctiny+tiny%0Auntil+we+make+it+%5Csmall+small+or+%5Cssmall+%60%60ssmall%27%27+via+the+moresize+package.%0ALet%27s+revert+to+%5Cnormalsize+normal+size+then+%7B%5Cttfamily+%5Cscriptsize+use+monospaced%0A%5Cverb%3D%5Cscriptsize%3D+text+in+a+group%7D+then+back+to+normal.+Now%2C+try+%0A%5Cverb%3D%5Clarge%3D+%5Clarge+text+then+%7B%5Csffamily+%5CLarge+%5Cverb%3D%5CLarge%3D+sans+serif+text%7D%0A+and+finally+%7B%5CHUGE+really+big+%28%5Cverb%3D%5CHUGE%3D%29+and+%7B%5Cbfseries++bold%7D+text%7D%0A%5Cend%7Bdocument%7D)

此示例生成以下输出：

![演示标准 LaTeX 字号命令的示例](/files/0d69515da398c991f55c38306329eb30cea78aa6)

## LaTeX 字号环境

上面列出的字号更改命令名称也可以作为环境使用，用来包住你希望更改字号的文本；例如：

```latex
\begin{Large}
将排版为 \texttt{\string\Large} 的文本
字号放在这里……
\end{Large}%
```

下一个示例展示这些环境如何嵌套使用。

### 示例：使用字号环境

```latex
\documentclass{extarticle} % 注意 extarticle 文档类
% 使用 geometry 宏包与较小的
% 页面尺寸来创建文章图形
\usepackage[paperheight=6in,
   paperwidth=5in,
   top=10mm,
   bottom=20mm,
   left=10mm,
   right=10mm]{geometry}
\usepackage{moresize}
\begin{document}
\noindent 我们将从正常大小的文本开始，然后添加
\begin{tiny}
一些 {\ttfamily \string\tiny} 文本
\begin{Large}
并与 {\ttfamily\string\Large} 以及
\begin{HUGE}\ttfamily \string\HUGE{} 文本
\end{HUGE}%
\end{Large}%
\end{tiny}%
然后回到正常大小的文本。
\end{document}
```

&#x20;[在 Overleaf 中打开此示例](https://www.overleaf.com/docs?engine=pdflatex\&snip_name=Demonstrating+font+size+environments\&snip=%5Cdocumentclass%7Bextarticle%7D+%25+Note+the+extarticle+document+class%0A%25+Using+the+geometry+package+with+a+small%0A%25+page+size+to+create+the+article+graphic%0A%5Cusepackage%5Bpaperheight%3D6in%2C%0A+++paperwidth%3D5in%2C%0A+++top%3D10mm%2C%0A+++bottom%3D20mm%2C%0A+++left%3D10mm%2C%0A+++right%3D10mm%5D%7Bgeometry%7D%0A%5Cusepackage%7Bmoresize%7D%0A%5Cbegin%7Bdocument%7D%0A%5Cnoindent+We%27ll+start+with+normal-sized+text+then+add%0A%5Cbegin%7Btiny%7D%0Asome+%7B%5Cttfamily+%5Cstring%5Ctiny%7D+text%0A%5Cbegin%7BLarge%7D%0Amixed+with+%7B%5Cttfamily%5Cstring%5CLarge%7D+and+%0A%5Cbegin%7BHUGE%7D%5Cttfamily+%5Cstring%5CHUGE%7B%7D+text%0A%5Cend%7BHUGE%7D%25%0A%5Cend%7BLarge%7D%25%0A%5Cend%7Btiny%7D%25%0Athen+back+to+normal-sized+text.%0A%5Cend%7Bdocument%7D)

此示例生成以下输出：

![演示标准 LaTeX 字号环境的示例](/files/685ab362f49df7622fc69681b3f6671964962f70)

## \fontsize 和 \selectfont 命令

上表列出的字号命令 [是使用 LaTeX 命令实现的](#latex-font-size-commands) ，这些命令也可直接用于选择 `\fontsize` 和 `\selectfont` 字号 `以及相应的` 基线间距 `设置：` \fontsize{font-size}{baseline-skip}\selectfont

```latex
值决定了使用
```

该 `设置：` 此值决定了使用 `以及相应的`进行排版的段落中，文本基线之间的距离；它还存储在一个名为 `\baselineskip`的参数命令中——更多细节请参见 Overleaf 文章 [如何在 LaTeX 中更改段落间距](/latex/zh-cn/ge-shi-hua/04-articles-how-to-change-paragraph-spacing-in-latex.md#5cbaselineskip-28tex-primitive29).

### 示例：使用 \fontsize 和 \selectfont

下一个示例演示 `\fontsize` 和 `\selectfont` 针对一系列 `以及相应的` 和 `设置：` 值：

* `\fontsize{6}{8}\selectfont`：使用 6pt 文本，基线间距为 8pt
* `\fontsize{8}{9}\selectfont`：使用 8pt 文本，基线间距为 9pt
* `\fontsize{12}{13.5}\selectfont`：使用 12pt 文本，基线间距为 13.5pt

在美学上令人愉悦的 `以及相应的` 和 `设置：` 间距组合可能取决于所用字体的设计。

```latex
\documentclass{article}
% 使用 geometry 宏包与较小的
% 页面尺寸来创建文章图形
\usepackage[paperheight=6in,
   paperwidth=5in,
   top=8mm,
   bottom=20mm,
   left=10mm,
   right=8mm]{geometry}
\usepackage{blindtext}
\begin{document}

\fontsize{6}{8}\selectfont\blindtext

\fontsize{8}{9}\selectfont\blindtext

\fontsize{12}{13.5}\selectfont\blindtext
\end{document}
```

&#x20;[在 Overleaf 中打开此示例](https://www.overleaf.com/docs?engine=pdflatex\&snip_name=Demonstrating+fontsize+and+selectfont\&snip=%5Cdocumentclass%7Barticle%7D%0A%25+Using+the+geometry+package+with+a+small%0A%25+page+size+to+create+the+article+graphic%0A%5Cusepackage%5Bpaperheight%3D6in%2C%0A+++paperwidth%3D5in%2C%0A+++top%3D8mm%2C%0A+++bottom%3D20mm%2C%0A+++left%3D10mm%2C%0A+++right%3D8mm%5D%7Bgeometry%7D%0A%5Cusepackage%7Bblindtext%7D%0A%5Cbegin%7Bdocument%7D%0A%0A%5Cfontsize%7B6%7D%7B8%7D%5Cselectfont%5Cblindtext%0A%0A%5Cfontsize%7B8%7D%7B9%7D%5Cselectfont%5Cblindtext%0A%0A%5Cfontsize%7B12%7D%7B13.5%7D%5Cselectfont%5Cblindtext%0A%5Cend%7Bdocument%7D)

此示例生成以下输出：

![在 Overleaf 上演示 fontsize 和 selectfont](/files/c49f74486614d937dca34927308c4eee58233946)

## 其他更改字号的宏包：relsize 和 scalefnt

本节简要介绍以下 LaTeX 宏包：

* 该 [`relsize` 宏包](https://ctan.org/pkg/relsize?lang=en) 它提供了命令，用于将字号设置为相对于 *当前* 字号的相对值；
* 该 [`scalefnt` 宏包](https://ctan.org/pkg/scalefnt) 它允许你“将字体按任意大小重新缩放”。

### relsize 宏包

该 `relsize` 宏包提供了命令，用于将字号设置为相对于 *当前* 字号——也就是你想要更改字号的位置所使用的字号；例如，在排版脚注时，当前（字体）字号比正文中的更小。

出于历史原因，我们不展开讨论（但请参见 [这里](https://tex.stackexchange.com/a/24600)），许多 TeX/LaTeX 字号设置/缩放操作都涉及数值 $$\text{1.2}$$；例如， [上表](#latex-font-size-commands) 显示 `\Large` 是 $$\text{14.4pt}$$ ，而下一个更大的字号 `\LARGE`是 $$\text{17.28pt}$$ 因为 $$\text{14.4pt} \times 1.2 = \text{17.28pt}$$。我们还可以看到 $$\texttt{(\LARGE) } \text{17.28pt} \times 1.2 = \text{20.74pt}\texttt{ (\huge)}$$

该 `relsize` 宏包在表中列出的字号之间切换时会使用“steps（步数）”这一说法；例如， [下面显示的代码](#relsizeexample) 演示了从 10pt 文本变为 17.28pt 需要 3 个“steps”，每一步都使用 1.2 的乘数： $$\text{10pt} \times 1.2 \times 1.2 \times 1.2 = \text{17.28pt}$$

* 命令 `\relsize{*n*}` 将尝试使用 `*n*` 个“steps”来缩放当前字体；但是，如果请求的（缩放后）字号太小或太大：
  * 会发出警告信息，并且
  * 缩放后的字号会被限制在由命令 `\RSsmallest` 设置的下限（通常是 `\tiny`）和 `\RSlargest` 设置的下限（通常是 `\Huge`)
* 使用 `\renewcommand` 的新值： `\RSlargest` 和 `\RSsmallest`:

  ```latex
  \renewcommand\RSlargest{75pt}
  \renewcommand\RSsmallest{5pt}
  ```

#### relsize 宏包的其他命令

该 `relsize` 宏包文档列出了以下命令，这些命令专为纯文本设计，不用于数学内容。

| 命令                        | 用途                            |
| ------------------------- | ----------------------------- |
| `\relsize{*n*}`           | 通过以下步数更改字号 `*n*` 。            |
| `\larger[*n*]`            | 将字号增加（可选） `*n*` 个步数（默认是 1 步）。 |
| `\smaller[*n*]`           | 将字号减少（可选） `*n*` 个步数（默认是 1 步）。 |
| `\relscale{*f*}`          | 按缩放因子更改字号 `*f*`.              |
| `\textlarger[*n*]{text}`  | 文本大小增大（可选） `*n*` 。            |
| `\textsmaller[*n*]{text}` | 文本大小减小（可选） `*n*` 。            |
| `\textscale[*f*]{text}`   | 文本按因子缩放 `*f*`.                |

* **注意**： `relsize` 命令插入边注 `\mathsmaller` 和 `\mathlarger` 适用于数学内容——请参见 [包文档](http://mirrors.ctan.org/macros/latex/contrib/relsize/relsize-doc.pdf) 了解更多细节。

#### 示例：使用 relsize 宏包

下一个示例演示由 `relsize` 宏包提供的各种命令。请注意以下几点：

* 使用分组 {...} 将字号更改的影响局部化；
* 通过写入以下内容将最大缩放字号固定为 75pt：

```latex
\renewcommand\RSlargest{75pt}
```

```latex
% article 类以默认 10pt 正文字号加载
\documentclass{article}
% 使用 geometry 宏包与较小的
% 页面尺寸来创建文章图形
\usepackage[paperheight=6in,
   paperwidth=5in,
   top=10mm,
   bottom=20mm,
   left=10mm,
   right=10mm]{geometry}
\usepackage{relsize}
% 定义我们的简单宏
\bgroup
\catcode`@=11
\gdef\getfontsize{\f@size pt}
\egroup
% 将最大缩放字号设为 75pt
\renewcommand\RSlargest{75pt}
\begin{document}
你好，在这段文字中，默认字号是 \getfontsize。
现在用 3 个“steps”缩放当前字体：{\verb=\relsize{3}=\relsize{3}
，它会将当前字号设为 \getfontsize}。在分组之外
字号又一次变为 \getfontsize。

另一段文字，其中有一些{\larger[2] 更大的文本}，以及
{\smaller[1] 更小的文本}——请注意分组 \{...\} 的使用。还使用
\textlarger[3]{较大的文本} 和一些 \textscale{2}{缩放后的文本}。
\vskip12pt
使用更多步数：

\vskip12pt
\textlarger[11]{11 步（\getfontsize）}
\vskip12pt
\textlarger[20]{20 步（\getfontsize）}——已达到大小限制，并给出警告：
\vskip12pt
``Package relsize Warning: Font size 383.35397pt is too large. Using 75pt instead...''
\end{document}
```

&#x20;[在 Overleaf 中打开此示例](https://www.overleaf.com/docs?engine=pdflatex\&snip_name=Demonstrating+the+relsize+package\&snip=%25+article+class+is+loaded+with+default+10pt+text+size%0A%5Cdocumentclass%7Barticle%7D%0A%25+Using+the+geometry+package+with+a+small%0A%25+page+size+to+create+the+article+graphic%0A%5Cusepackage%5Bpaperheight%3D6in%2C%0A+++paperwidth%3D5in%2C%0A+++top%3D10mm%2C%0A+++bottom%3D20mm%2C%0A+++left%3D10mm%2C%0A+++right%3D10mm%5D%7Bgeometry%7D%0A%5Cusepackage%7Brelsize%7D%0A%25+Define+our+simple+macro%0A%5Cbgroup%0A%5Ccatcode%60%40%3D11%0A%5Cgdef%5Cgetfontsize%7B%5Cf%40size+pt%7D%0A%5Cegroup%0A%25+Set+the+maximum+scaled+font+size+to+75pt%0A%5Crenewcommand%5CRSlargest%7B75pt%7D%0A%5Cbegin%7Bdocument%7D%0AHello%2C+in+this+paragraph+the+normal+font+size+is+%5Cgetfontsize.+%0ANow+scale+the+current+font+using+3+%60%60steps%27%27%3A+%7B%5Cverb%3D%5Crelsize%7B3%7D%3D%5Crelsize%7B3%7D%0Awhich+sets+the+current+size+to+%5Cgetfontsize%7D.+Outside+the+group+%0Athe+font+size+is+once+again+%5Cgetfontsize.%0A%0AAnother+paragraph+with+some%7B%5Clarger%5B2%5D+larger+text%7D+and+%0A%7B%5Csmaller%5B1%5D+smaller+text%7D---note+the+use+of+groups+%5C%7B...%5C%7D.+Also+using+%0A%5Ctextlarger%5B3%5D%7Blarge+text%7D+and+some+%5Ctextscale%7B2%7D%7Bscaled+text%7D.%0A%5Cvskip12pt%0AUsing+a+larger+number+of+steps%3A%0A%0A%5Cvskip12pt%0A%5Ctextlarger%5B11%5D%7B11+steps+%28%5Cgetfontsize%29%7D%0A%5Cvskip12pt%0A%5Ctextlarger%5B20%5D%7B20+steps+%28%5Cgetfontsize%29%7D---size+limit+reached+and+a+warning+is+given%3A%0A%5Cvskip12pt%0A%60%60Package+relsize+Warning%3A+Font+size+383.35397pt+is+too+large.+Using+75pt+instead...%27%27%0A%5Cend%7Bdocument%7D)

上面的 LaTeX 代码通过一个名为 `\f@size`的内部 LaTeX 变量访问当前字号，其值可以通过类似 `\getfontsize`的宏来排版，定义如下：

```latex
\bgroup
\catcode`@=11
\gdef\getfontsize{\f@size pt}
\egroup
```

上面的示例产生如下输出：

![演示各种 relsize 宏包命令的示例](/files/f600ec4c345e9fb5316bc7667ed25b545180918f)

### scalefnt 宏包

该 `scalefnt` 宏包定义了 `\scalefont` 命令

```latex
\scalefont{factor}
```

其中 `因子` 会缩放当前字体的大小，以及当前 `\baselineskip`的值——它用于 [计算排版段落中各行文本之间的间距](/latex/zh-cn/ge-shi-hua/04-articles-how-to-change-paragraph-spacing-in-latex.md#5cbaselineskip-28tex-primitive29).

#### 示例：使用 scalefnt 宏包

下一个示例演示 `\scalefont` 命令，并且还使用了我们的 [`\getfontsize` 宏](#getfontsize).

```latex
% article 类以默认 10pt 正文字号加载
\documentclass{article}
% 使用 geometry 宏包与较小的
% 页面尺寸来创建文章图形
\usepackage[paperheight=6in,
   paperwidth=5in,
   top=10mm,
   bottom=20mm,
   left=10mm,
   right=10mm]{geometry}
\usepackage{scalefnt}
% 定义我们的简单宏 \getfontsize
\bgroup
\catcode`@=11
\gdef\getfontsize{\f@size pt}
\egroup
\begin{document}
对于这段文字，当前字号是 \getfontsize{}，而 \verb=\baselineskip= 的值是 \the\baselineskip。

如果我们使用 \verb=\scalefont{1.5}= \scalefont{1.5}，当前字号现在是 \getfontsize{}，而 \verb=\baselineskip= 的值是 \the\baselineskip。
\end{document}
```

&#x20;[在 Overleaf 中打开此示例](https://www.overleaf.com/docs?engine=pdflatex\&snip_name=Demonstrating+the+scalefnt+package\&snip=%25+article+class+is+loaded+with+default+10pt+text+size%0A%5Cdocumentclass%7Barticle%7D%0A%25+Using+the+geometry+package+with+a+small%0A%25+page+size+to+create+the+article+graphic%0A%5Cusepackage%5Bpaperheight%3D6in%2C%0A+++paperwidth%3D5in%2C%0A+++top%3D10mm%2C%0A+++bottom%3D20mm%2C%0A+++left%3D10mm%2C%0A+++right%3D10mm%5D%7Bgeometry%7D%0A%5Cusepackage%7Bscalefnt%7D%0A%25+Define+our+simple+macro+%5Cgetfontsize%0A%5Cbgroup%0A%5Ccatcode%60%40%3D11%0A%5Cgdef%5Cgetfontsize%7B%5Cf%40size+pt%7D%0A%5Cegroup%0A%5Cbegin%7Bdocument%7D%0AFor+this+paragraph%2C+the+current+font+size+is+%5Cgetfontsize%7B%7D+and+the+value+of+%5Cverb%3D%5Cbaselineskip%3D+is+%5Cthe%5Cbaselineskip.%0A%0AIf+we+use+%5Cverb%3D%5Cscalefont%7B1.5%7D%3D+%5Cscalefont%7B1.5%7D+the+font+size+is+now++%5Cgetfontsize%7B%7D+and+%5Cverb%3D%5Cbaselineskip%3D+is+%5Cthe%5Cbaselineskip.%0A%5Cend%7Bdocument%7D)

此示例生成以下输出：

![演示 scalefnt 宏包的示例](/files/21223da90ca146b22f4b3a2a05a750af1abbfc69)

## 来自 tex.stackexchange 的示例

在 tex.stackexchange 上搜索 [带有标签的问题 `fontsize`](https://tex.stackexchange.com/questions/tagged/fontsize) 会得到一长串结果，其中包含与更改字号相关的解释、代码和解决方案。有些问题相当专业，而另一些更为通用；这里列出一小部分你可能会感兴趣的内容：

* [更改图注的字号](https://tex.stackexchange.com/questions/187429/change-font-size-of-labels-in-figures-to-any-font-size)
* [调整所有图注的字号](https://tex.stackexchange.com/questions/527772/adjusting-font-size-of-all-captions-with-prefered-font-size)
* [更改章、节、小节的字号](https://tex.stackexchange.com/questions/234546/chapter-section-subsections-title-font-size)
* [使用 `fontspec` 宏包](https://tex.stackexchange.com/questions/309712/change-font-size-with-fontspec-package)
* [更改字号用于 `\ttfamily`](https://tex.stackexchange.com/questions/158778/all-ttfamily-font-change-font-size)


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://overleaf-pro.ayaka.space/latex/zh-cn/wen-da/24-how-do-i-adjust-the-font-size.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
