> 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/texlive/zh-tw/ji-neng/jian-li-wu-zhang-ai-pdf.md).

# 建立無障礙 PDF

隨著時間推移，PDF 建立功能的更新已使 PDF 無障礙成為可能。包括以下在內的進展 [LaTeX 標註專案](https://latex3.github.io/tagging-project/documentation/) 也讓以 LaTeX 為基礎的 PDF 同樣能夠具有無障礙性，而且改進仍在持續進行。

{% hint style="success" %}
隨著 [TeX Live 2025](https://www.overleaf.com/blog/tex-live-2025-is-now-available)的發布，特別是，這使得 Overleaf 中的這項流程成為可能。請注意， **LuaLaTeX** 是在使用 MathML 時建議的編譯器。

你可以透過學習如何 [變更編譯器和 TeX Live 版本](https://docs.overleaf.com/getting-started/recompiling-your-project/selecting-a-tex-live-version-and-latex-compiler).
{% endhint %}

我們的方法在很大程度上受到 LaTeX Project 的 [可及性 PDF 指引](https://latex3.github.io/tagging-project/documentation/usage-instructions)所啟發，你可以參考其中以了解以下主題的更多細節。

{% hint style="warning" %}
請注意，實作這些做法並不保證你專案中的每個元素都具有無障礙性——請參閱本頁的常見問題區段以取得更多資訊。
{% endhint %}

### <i class="fa-tag">:tag:</i> 標註

本質上，PDF 標註是一個自動建立「結構」的流程，這個結構能被螢幕閱讀器輕易識別，而且無論現在或未來都更容易搜尋。它利用你的 LaTeX 程式碼所定義的現有結構，讓螢幕閱讀器能區分標題、內文、圖形和方程式等元素。

TeX Live 2025 完全支援透過 `\DocumentMetaData` 宣告來自動加入 PDF 標註。請在 `\documentclass`之前加入此宣告。這個宣告有兩個會影響標註功能的重要鍵值： `tagging` 和 `tagging-setup` .

#### **`tagging`**

請將 `tagging` 鍵設定為 `on`.

<pre class="language-latex" data-overflow="wrap" data-expandable="true"><code class="lang-latex">\DocumentMetadata{<a data-footnote-ref href="#user-content-fn-1">tagging=on</a>}
</code></pre>

#### **`tagging-setup`**

透過變更 `tagging-setup` 鍵的值來設定文件的標註方式。

<pre class="language-latex" data-overflow="wrap" data-expandable="true"><code class="lang-latex">\DocumentMetadata{<a data-footnote-ref href="#user-content-fn-1">tagging=on</a>,<a data-footnote-ref href="#user-content-fn-2">tagging-setup={math/setup=mathml-SE}</a>}
</code></pre>

{% hint style="info" %}
在這個範例中，我們使用 \`math/setup=mathml-SE\` 進行 MathML 結構元素標註，但它可以設定為 \[\`\tagpdfsetup\`]\(<https://ctan.math.washington.edu/tex-archive/macros/latex/contrib/tagpdf/tagpdf.pdf>) 所支援的任何值。
{% endhint %}

### <i class="fa-text-size">:text-size:</i> 描述

除了自動標註之外，你還可能需要為元素內容新增描述，特別是當文件包含圖片和/或表格時。

#### <i class="fa-image">:image:</i> 圖片

在 Overleaf 中為圖片加入重要描述非常簡單，這也有助於在參照 LaTeX 程式碼時理解某些圖片的上下文。你只需要在每個 `\includegraphics`實例中加入相關的圖片描述選項即可。為了無障礙性，需要區分三種主要圖片類型：需要替代（alt）文字的圖片、工件，以及會轉換成實際文字的圖片。

**替代文字**

為圖片加入替代文字可確保這張圖片具有可作為視覺內容文字替代的描述。請使用 `alt` 鍵，並輸入文字值。

<pre class="language-latex" data-title="替代文字範例" data-overflow="wrap"><code class="lang-latex">\includegraphics[width=0.25\linewidth,<a data-footnote-ref href="#user-content-fn-3">alt={一隻綠色青蛙的頭與手的微距照片}</a>]{frog.jpg}
</code></pre>

**工件**

如果某張圖片不需要被螢幕閱讀器讀取（也就是說，如果它純粹只是裝飾），那就將此圖片標記為工件。請使用 `artifact` 鍵，但不需指派值。

<pre class="language-latex" data-title="工件範例" data-overflow="wrap"><code class="lang-latex">\includegraphics[<a data-footnote-ref href="#user-content-fn-4">artifact</a>]{.jpg}
</code></pre>

**實際文字**

如果圖片只是一個 Unicode 字元的圖像，那就包含文字形式的字元。請使用 `actualtext` 鍵，並為其指派一個單一字元（不含括號）。

<pre class="language-latex" data-title="實際文字範例" data-overflow="wrap"><code class="lang-latex">\includegraphics[<a data-footnote-ref href="#user-content-fn-5">actualtext=B</a>]{.jpg}
</code></pre>

#### <i class="fa-table">:table:</i> 表格

雖然表格通常會有相關文字，但仍然很重要的是，這些文字要與表格的正確部分相連結。請在你的 `\tagpdfsetup` 之前加入 `tabular` 或在前言區開始設定 Overleaf 專案表格。為了無障礙性，需要區分兩種主要表格類型：資料表和呈現表。

**資料表**

如果表格至少有一個表頭列，那麼請指定哪些列是表頭列。請使用 `table/header-rows` 鍵，並輸入對應表頭列位置的一系列數字。

<pre class="language-latex" data-title="資料表範例"><code class="lang-latex">\tagpdfsetup{<a data-footnote-ref href="#user-content-fn-6">table/header-rows={1}</a>}
\begin{tabular}{l|r}
Item &#x26; Quantity \\\hline
Widgets &#x26; 42 \\
Gadgets &#x26; 13
\end{tabular}
</code></pre>

**呈現表**

如果表格不打算被螢幕閱讀器當作表格來解讀，那就將它標記為呈現表。請使用 `table/tagging=presentation` 鍵的值來設定文件的標註方式。

<pre class="language-latex" data-title="呈現表範例"><code class="lang-latex">\tagpdfsetup{<a data-footnote-ref href="#user-content-fn-7">table/tagging=presentation</a>}
\begin{tabular}{cc}
\textbullet &#x26; \textbullet \\
''' &#x26; '''
\end{tabular}
</code></pre>

### <i class="fa-comments-question">:comments-question:</i> 常見問題 <a href="#faqs" id="faqs"></a>

<details>

<summary>有沒有什麼工具可以幫助驗證我的文件是否具有無障礙性？</summary>

有，有幾個外部工具，包括 [veraPDF](https://verapdf.org/)，可以驗證 PDF/A 的部分與相容等級。此外，你也可以使用像 [WebAIM](https://webaim.org/) 這樣的工具來計算兩種顏色之間的對比度。

</details>

<details>

<summary>我 Overleaf 專案中的套件與這些功能相容嗎？</summary>

你可以參考 LaTeX Tagging Project 的 [套件狀態清單](https://latex3.github.io/tagging-project/tagging-status/).

</details>

<details>

<summary>我還可以使用 <code>beamer</code>嗎？還有其他可用於簡報的套件嗎？</summary>

使用 `beamer`會有一些限制；請查看實驗性的 [`ltx-talk` 類別](https://ctan.org/pkg/ltx-talk).

</details>

<details>

<summary>Overleaf 編輯器具有無障礙性嗎？</summary>

是的。作為一個網頁應用程式，Overleaf 會利用現代網頁瀏覽器的無障礙功能與特性，這些瀏覽器也會定期接受無障礙專家的評估。我們最新完成的 [自願性產品無障礙範本（VPAT）](https://www.overleaf.com/for/customers/vpat) 顯示符合《網頁內容無障礙指引》（WCAG）2.2 AA 級。

</details>

<details>

<summary>Overleaf 產生的 PDF 能否符合《美國身心障礙法》（ADA）第二篇，以及統一歐洲無障礙標準（EN 301 549）的要求？</summary>

可以。美國與歐洲的法規要求 PDF 必須符合 WCAG 2.1 AA。要符合 WCAG 2.1 AA，PDF 必須是已標註 PDF。TeX Live 2025 提供了 PDF 標註支援。

</details>

<details>

<summary>Overleaf 產生的 PDF 能否符合 PDF/UA-1 標準？</summary>

可以。LaTeX Project 的標註專案是專門設計來產生 PDF/UA-1（以及即將推出的 PDF/UA-2）所需結構標籤的。如果使用者遵循 LaTeX Project 目前的標註建議，他們實際上就是在建立一份「可直接符合 PDF/UA 的」文件，而這也是符合美國與歐洲法規所要求 WCAG 2.1 AA 法定義務的最強方式。

</details>

<details>

<summary>我要如何把編譯器切換成 LuaLaTeX？</summary>

切換到使用 LuaLaTeX 很容易；這是 LaTeX 標註專案團隊建議使用的 LaTeX 編譯引擎。雖然 Overleaf 的預設編譯器是 PDFLaTeX，但你可以 [在專案設定中切換成 LuaLaTeX](https://docs.overleaf.com/getting-started/recompiling-your-project/selecting-a-tex-live-version-and-latex-compiler).

</details>

<details>

<summary>我可以在哪裡選擇最新版本的 TeX Live？</summary>

你可以在 [Overleaf Labs](https://www.overleaf.com/labs/participate)取得最新內容，這提供了在 Overleaf 中存取「rolling TeX Live」映像檔的方式，包括最新的 PDF 標註支援。這個實驗性的 TeX Live 版本主要用於在將變更編譯進我們的年度 TeX Live 發行版之前，測試 TeX Live、套件以及預覽新的無障礙功能。

大多數 PDF 標註功能都可在標準 [TeX Live 2025](https://www.overleaf.com/blog/tex-live-2025-is-now-available) 映像檔中使用。

</details>

[^1]: 已啟用自動標註。

[^2]: 標註設定已設定。

[^3]: 圖片具有替代文字。

[^4]: 圖片是一個工件。

[^5]: 圖片是一個字元。

[^6]: 表格有一個表頭列。

[^7]: 表格是呈現表。


---

# 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/texlive/zh-tw/ji-neng/jian-li-wu-zhang-ai-pdf.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.
