> 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/geng-duo-zhu-ti/06-bold-italics-and-underlining-es.md).

# 粗體、斜體與底線 es

透過將文字套用特定格式，可以幫助突顯文件中的重要概念，並使其更易讀。使用斜體、粗體或底線，可以改變讀者對某個字詞的感受。

## 簡介

本文將說明三種為文件套用格式的基本工具：斜體、粗體和底線。先從一個範例開始：

```latex
其中一些 \textbf{最偉大的}
在 \underline{科學} 中的發現
是因 \textbf{\textit{意外}} 而發現的。
```

![Biu1.png](/files/3d9bd7fc04369599c5375aed67f81249881cb9e5)

如你所見，可以巢狀使用三個基本指令來結合它們的效果。

注意： *指令 **\it** 和 **\bf** 也可用來將文字轉成斜體或粗體，但不建議使用，因為它們無法保留先前的樣式。例如，使用這些指令無法建立同時為粗體又為斜體的文字*

[在 Overleaf 中開啟範例](https://www.sharelatex.com/project/new/template?zipUrl=/project/52e2cf6fcd3ae4400500066d/download/zip\&templateName=BoldItalicsUnderline\&compiler=pdflatex)

## 斜體文字

要將文字寫成斜體（也稱為 italic 或斜體字）非常簡單，只要使用指令 **\textit**:

```latex
其中一些最偉大的
科學中的發現
是因 \textit{意外} 而發現的。
```

![Biu2.png](/files/807fd656fa5d6307cba32646f64e1c3ec4bc0e69)

[在 Overleaf 中開啟範例](https://www.sharelatex.com/project/new/template?zipUrl=/project/52e2cf6fcd3ae4400500066d/download/zip\&templateName=Bold_Italics_Underline\&compiler=pdflatex)

## 粗體文字

要將文字寫成粗體，必須使用指令 **\textbf**:

```latex
其中一些 \textbf{最偉大的}
科學中的發現
是因意外而發現的。
```

![Biu3.png](/files/63485c3154ce4a2018074ebc2d30437a88d32892)

[在 Overleaf 中開啟範例](https://www.sharelatex.com/project/new/template?zipUrl=/project/52e2cf6fcd3ae4400500066d/download/zip\&templateName=Bold_Italics_Underline\&compiler=pdflatex)

## 底線文字

為文字加底線也非常簡單，要使用的指令是 **\underline**:

```latex
其中一些最偉大的
在 \underline{科學} 中的發現
是因意外而發現的。
```

![Biu4.png](/files/4613593c10600e4f8b5fc249372b920190d669ec)

[在 Overleaf 中開啟範例](https://www.sharelatex.com/project/new/template?zipUrl=/project/52e2cf6fcd3ae4400500066d/download/zip\&templateName=Bold_Italics_Underline\&compiler=pdflatex)

## 強調文字

文字可以透過指令 **\emph**。有時這個指令的行為與 **\textit** 但並不完全相同。

```latex
其中一些最偉大的 \emph{發現}
在科學中
是因意外而發現的。

\textit{其中一些最偉大的 \emph{發現}
在科學中
是因意外而發現的。}

\textbf{其中一些最偉大的 \emph{發現}
在科學中
是因意外而發現的。}
```

![Biu5.png](/files/1e5171b53016a3162f63ebe51ffe91b8db58d9cd)

這個指令實際上所做的是 **\emph** 取決於上下文。在一般文字中，強調文字會以斜體印出，但當將該指令用於已經是斜體的文字時，其行為會反過來。請參見前面的範例來了解這是什麼意思。

此外，有些套件，例如 [Beamer](/latex/zh-tw/jian-bao/01-beamer.md)，會改變指令的行為 **\emph**.

[在 Overleaf 中開啟範例](https://www.sharelatex.com/project/new/template?zipUrl=/project/52e2cf6fcd3ae4400500066d/download/zip\&templateName=Bold_Italics_Underline\&compiler=pdflatex)

## 延伸閱讀

更多資訊請參閱：

* [段落與換行](/latex/zh-tw/latex-ji-chu/02-paragraphs-and-new-lines.md)
* [清單](/latex/zh-tw/latex-ji-chu/04-lists.md)
* [段落格式設定](/latex/zh-tw/ge-shi-hua/04-articles-how-to-change-paragraph-spacing-in-latex.md)
* [換行與空白](/latex/zh-tw/ge-shi-hua/05-line-breaks-and-blank-spaces.md)
* [LaTeX2ε 不那麼簡短的入門介紹](http://www.ctan.org/tex-archive/info/lshort/)


---

# 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/geng-duo-zhu-ti/06-bold-italics-and-underlining-es.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.
