> 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-tw/wen-yu-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}
```

[在 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/a8b3aa5791f36305e6a951fffa260ed09ed161c2)

## LaTeX 字型大小命令

LaTeX 提供一組 10 個標準（預先定義）的命令來變更字型大小——請注意，文件類別或 LaTeX 套件可能會重新定義這些命令，以改變實際的點數大小。下表列出這些命令，以及在主文字字型使用 10pt（article 類別的預設設定）時對應的點數大小值：

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

![標準 LaTeX 字型大小命令](/files/b4af029299852e96093255278850813c39b94f89)

若要查看由 `\documentclass[11pt]{article}` 和 `\documentclass[12pt]{article}` 所產生的對應點數大小， [請參考](https://tug.org/texinfohtml/latex2e.html#Font-sizes) 中插入一個 [字型大小圖表](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/c48377d1945101dfda511bc34e3612aa75357213)

### 範例：使用字型大小命令

下一個範例示範如何使用這些命令。

```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 極小
，直到我們透過 moresize 套件把它改成 \small 小字或 \ssmall「ssmall」為止。
讓我們先回復為 \normalsize 正常大小，然後 {\ttfamily \scriptsize 在群組中使用等寬字體
\verb=\scriptsize= 文字}，再回到正常。接著，試試
\verb=\large= \large 文字，然後是 {\sffamily \Large \verb=\Large= 無襯線文字}
 最後是 {\HUGE 非常大（\verb=\HUGE=）以及 {\bfseries 粗體} 文字}
\end{document}
```

[在 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/a98863dcbd82db9e1f0c7fcf1d159578e979ecd9)

## 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}
```

[在 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/85fce695a6bc19bccea141ef6c87529edd558396)

## \fontsize 和 \selectfont 命令

上表中列出的字型大小命令 [是以 LaTeX 命令實作的](#latex-font-size-commands) ，而這些命令也可直接用來選擇 `\fontsize` 和 `\selectfont` 字型大小 `與對應的` 基線間距 `設定：` \fontsize{font-size}{baseline-skip}\selectfont

```latex
值決定了使用
```

該 `設定：` 排版段落中的文字基線之間距離；它也會儲存在一個名為 `與對應的`的參數命令中；更多細節請參見 Overleaf 文章 `\baselineskip`—— [如何在 LaTeX 中變更段落間距](/latex/zh-tw/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}
```

[在 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/017562ce76d39005f2f236ab5086c8d4a1802eb7)

## 其他變更字型大小的套件：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` 套件在表中列出的字型大小之間移動時，會提到「步階」；例如， [下面的程式碼](#relsizeexample) 示範從 10pt 文字變到 17.28pt 需要 3 個「步階」，每一步都使用 1.2 的乘數： $$\text{10pt} \times 1.2 \times 1.2 \times 1.2 = \text{17.28pt}$$

* 命令 `\relsize{*n*}` 將嘗試使用 `*n*` 個「步階」來縮放目前字型；但是，如果要求的（縮放後）大小太小或太大：
  * 會發出警告訊息，而且
  * 縮放後的大小會受限於命令 `\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 個「步階」來縮放目前字型：{\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}
```

[在 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/edae0899813d85c9a205d67b73562f19c4f62531)

### scalefnt 套件

該 `scalefnt` 套件定義了 `\scalefont` 指令

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

其中 `係數` 會縮放目前字型的大小，以及 `\baselineskip`的目前值 [——它用來](/latex/zh-tw/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}
```

[在 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/32fcfbaa984aad62920d6f06926488f7dac5c199)

## 來自 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-tw/wen-yu-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.
