<?xml version="1.0" encoding="UTF-8"?>
<rss  xmlns:atom="http://www.w3.org/2005/Atom" 
      xmlns:media="http://search.yahoo.com/mrss/" 
      xmlns:content="http://purl.org/rss/1.0/modules/content/" 
      xmlns:dc="http://purl.org/dc/elements/1.1/" 
      version="2.0">
<channel>
<title>Yueswater Blog</title>
<link>https://your-domain.com/articles/</link>
<atom:link href="https://your-domain.com/articles/index.xml" rel="self" type="application/rss+xml"/>
<description></description>
<image>
<url>https://your-domain.com/images/logo.png</url>
<title>Yueswater Blog</title>
<link>https://your-domain.com/articles/</link>
<height>82</height>
<width>144</width>
</image>
<generator>quarto-1.8.24</generator>
<lastBuildDate>Mon, 13 Apr 2026 00:00:00 GMT</lastBuildDate>
<item>
  <title>Python 教學系列: Python 簡介與安裝</title>
  <dc:creator>Anthony </dc:creator>
  <link>https://your-domain.com/articles/posts/2026/04/13/python-intro.html</link>
  <description><![CDATA[ 




<p>在撰寫此篇文章的 2026，Python 依舊是全球最受歡迎、最廣受使用的語言。根據 <a href="https://spectrum.ieee.org/top-programming-languages-2025">IEEE 科技縱覽</a> 在 2025 年的統計，無論從綜合排名、長期趨勢以及職缺的角度，Python 都位居第一，緊追其後的則是老語言 C/C++ 與 Java。</p>
<details>
<summary>
2025 程式語言排名（IEEE Spectrum）
</summary>
<div style="display: flex; justify-content: center;">
<iframe scrolling="no" frameborder="0" title="Interactive or visual content" sandbox="allow-same-origin allow-forms allow-scripts allow-downloads allow-popups allow-popups-to-escape-sandbox allow-top-navigation-by-user-activation" style="width: 70%; height: 1776.58px;" src="https://flo.uri.sh/visualisation/24825595/embed?auto=1">
</iframe>
</div>
</details>
<p>從資料分析、人工智慧、自動化腳本到後端網頁開發，Python 可謂無處不在。然而，網路上的教學資源雖然豐富，卻存在一個巨大的斷層：<strong>基礎語法與工程實戰之間的距離</strong>。許多人學會了流程控制，甚至可以自己寫一個小程式在本地運行，但當他們打開一個專業的開源專案時，卻被滿屏的型別標注、裝飾器或是複雜的專案管理套件搞得一頭霧水。這就是為什麼我決定寫這個系列——不只教你寫出能跑的程式，更要教你寫出專業、優雅且可維護的程式碼，以及分享我曾經踩過的坑。</p>
<section id="系列介紹" class="level2">
<h2 class="anchored" data-anchor-id="系列介紹">系列介紹</h2>
<p><strong>Python 教學系列</strong>並非一套傳統的語法字典。在規劃這個系列時，我設定了幾個核心準則，並貫穿未來所有的文章：</p>
<ol type="1">
<li><p>以<strong>工程化</strong>為起點：本系列所有的範例與專案，都會建立在專案結構之上。在學校或是外面的課程，你可能都聽過虛擬環境管理，但並不知道虛擬環境的用途，甚至不太了解它的重要性。因此本系列會從建立虛擬環境開始，一步步奠定基礎。</p></li>
<li><p>全面擁抱<strong>型別標註</strong>：Python 雖然是動態型別語言，但在現代開發中，沒有型別標註的程式碼被視為一種技術債。從第一章開始，我們就會強制引入型別宣告。這不僅能大幅減少 Bug，還能讓你的編輯器提供神級的自動補完與錯誤偵測。</p></li>
<li><p>深入 Python 內建標準庫：許多 Python 遇到問題的第一反應是安裝第三方套件，但其實 Python 內建的標準庫已經強大到令人折服。我們會深入探討 Python 內建的工具，教你如何用最少的依賴完成最多的任務。</p></li>
</ol>
</section>
<section id="系列緣起" class="level2">
<h2 class="anchored" data-anchor-id="系列緣起">系列緣起</h2>
<p>實不相瞞，這套系列也是寫給我自己的。</p>
<p>程式開發是一個不進則退的領域。隨著 Python 版本不斷更新<sup>1</sup>，許多舊習慣已經被更安全、更高效的新語法取代。透過整理這些內容，在教學時也幫自己進行一次全面的知識體系複習。</p>
</section>
<section id="給讀者的建議" class="level2">
<h2 class="anchored" data-anchor-id="給讀者的建議">給讀者的建議</h2>
<p>如果你是初學者，請不要只看程式碼，一定要動手跟著寫。</p>
<p>Python 的哲學之一是<sup>2</sup>：</p>
<blockquote class="blockquote">
<p><em>There should be one– and preferably only one –obvious way to do it.</em></p>
</blockquote>
<p>這個系列的目的，就是帶你找到那種「最明顯、最正確、最優雅」的方法。</p>


</section>


<a onclick="window.scrollTo(0, 0); return false;" id="quarto-back-to-top"><i class="bi bi-arrow-up"></i> 回到頂端</a><div id="quarto-appendix" class="default"><section id="footnotes" class="footnotes footnotes-end-of-document"><h2 class="anchored quarto-appendix-heading">腳註</h2>

<ol>
<li id="fn1"><p>撰文時間為 2026/04/13，最新版本為 <code>3.14.4</code>，請以<a href="https://www.python.org/downloads/">官方</a>發佈為主。↩︎</p></li>
<li id="fn2"><p>詳見 <a href="https://peps.python.org/pep-0020/#the-zen-of-python">Python 之禪 (The Zen of Python)</a>。只要在 Python 解釋器（互動式環境）中輸入以下指令：</p>
<div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb1" style="background: #f1f3f5;"><pre class="sourceCode python code-with-copy"><code class="sourceCode python"><span id="cb1-1"><span class="im" style="color: #00769E;
background-color: null;
font-style: inherit;">import</span> this</span></code></pre></div></div>
<p>程式碼會輸出由 <a href="https://en.wikipedia.org/wiki/Tim_Peters_(software_engineer)">Tim Peters</a> (Python 程式語言的核心貢獻者) 編寫的 19 條核心 Python 設計原則，強調簡單、清晰和可讀性↩︎</p></li>
</ol>
</section></div> ]]></description>
  <category>Python</category>
  <category>程式設計</category>
  <guid>https://your-domain.com/articles/posts/2026/04/13/python-intro.html</guid>
  <pubDate>Mon, 13 Apr 2026 00:00:00 GMT</pubDate>
  <media:content url="https://your-domain.com/articles/posts/2026/04/13/images/Python_logo_and_wordmark.png" medium="image" type="image/png" height="81" width="144"/>
</item>
<item>
  <title>LaTeX 教學系列: LaTeX 簡介</title>
  <dc:creator>Anthony </dc:creator>
  <link>https://your-domain.com/articles/posts/2026/04/12/latex-intro.html</link>
  <description><![CDATA[ 




<p>相信一定不少人在學生時期或出社會工作之後，都面臨著撰寫報告的地獄需求。不過，經常使用 Microsoft Word、PowerPoint 的人一定會發現，插入圖片並且讓它在正確的位置上似乎是一件很費時的任務，一方面是因為將圖片導入文件後，還要調整大小，且每一張圖片的大小都不相同；另一方面是 Word、PPT 在文字與圖片排列稍顯的不聰明<sup>1</sup>一點。</p>
<section id="latex-的前世今生" class="level2">
<h2 class="anchored" data-anchor-id="latex-的前世今生">LaTeX 的前世今生</h2>
<p>LaTeX 是一種強大的排版系統，廣泛應用於科學、技術、工程及數學領域的文件編輯。LaTeX 的前身是 <a href="https://www-cs-faculty.stanford.edu/~knuth/">Donald Knuth</a> 於 1978 年發明的 <a href="https://svn.tug.org:8369/texlive/">TeX 系統</a>。Knuth 是一位著名的計算機科學家，為了解決當時排版系統的不足，親自設計了 TeX，以便創作高品質的文件和書籍。</p>
<p>然而，TeX 雖然功能強大，但對於一般用戶來說並不友好（必須撰寫許多程式碼、前置設定等）。因此，為了解決這個問題，<a href="https://lamport.org/">Leslie Lamport</a> 於 1984 年在 TeX 的基礎上開發了 <a href="https://latex-project.org/">LaTeX</a>。LaTeX 簡化了文件編寫的流程，使用者只需關注所輸入的內容，而不必操心具體的排版細節，這正是 LaTeX 最引以為傲的功能：所得及所見 (<em>What You See Is What You Get</em>)。</p>
</section>
<section id="前置作業編譯器與編輯器" class="level2">
<h2 class="anchored" data-anchor-id="前置作業編譯器與編輯器">前置作業：編譯器與編輯器</h2>
<blockquote class="blockquote">
<p>「工欲善其事、必先利其器。」</p>
</blockquote>
<p>從學生時期撰寫撰寫作文，到出社會撰寫公司業務報告，都需要一些硬體工具 (例如紙筆、電腦、平板等)，以及既有的知識。LaTeX 的轉寫也是一樣，編輯一份 LaTeX 文件需要兩個重要的工具：<strong>編譯器</strong>和<strong>編輯器</strong><sup>2</sup>。</p>
<div class="quarto-figure quarto-figure-center">
<figure class="figure">
<p><img src="https://your-domain.com/articles/posts/2026/04/12/images/latex-file-flow.png" class="img-fluid figure-img"></p>
<figcaption>LaTeX 編譯流程<sup>3</sup></figcaption>
</figure>
</div>
<section id="編譯器" class="level3">
<h3 class="anchored" data-anchor-id="編譯器">編譯器</h3>
<p>在進入 LaTeX 的世界之前，最重要的一步就是建置環境。請務必遵守一個黃金原則：<strong>先安裝編譯器，再安裝編輯器！</strong>這是因為編輯器只是打字的地方，它需要後端的編譯器引擎來處理排版邏輯。若順序顛倒，你可能會遇到路徑偵測不到的麻煩。</p>
<table class="caption-top table">
<thead>
<tr class="header">
<th style="text-align: left;">作業系統</th>
<th style="text-align: left;">建議編譯器</th>
<th style="text-align: left;">特色與優點</th>
<th style="text-align: left;">適合對象</th>
</tr>
</thead>
<tbody>
<tr class="odd">
<td style="text-align: left;"><strong>Windows</strong></td>
<td style="text-align: left;"><a href="https://miktex.org/">MiKTeX</a></td>
<td style="text-align: left;">體積精簡，具備「自動安裝缺失套件」功能，用到什麼才裝什麼。</td>
<td style="text-align: left;">硬碟空間有限、喜歡介面簡潔的入門者。</td>
</tr>
<tr class="even">
<td style="text-align: left;"></td>
<td style="text-align: left;"><a href="https://tug.org/texlive/">TeX Live</a></td>
<td style="text-align: left;">國際標準版，採一次性完整安裝，相容性與穩定性最高。</td>
<td style="text-align: left;">追求一勞永逸、硬碟空間充裕的專業使用者。</td>
</tr>
<tr class="odd">
<td style="text-align: left;"><strong>macOS</strong></td>
<td style="text-align: left;"><a href="https://www.tug.org/mactex/">MacTeX</a></td>
<td style="text-align: left;">專為 macOS 優化的 TeX Live 版本，整合了 Mac 專用的字體與路徑管理工具。</td>
<td style="text-align: left;">所有 macOS 使用者（避免系統路徑排擠的首選）。</td>
</tr>
<tr class="even">
<td style="text-align: left;"><strong>Linux</strong></td>
<td style="text-align: left;"><strong>TeX Live</strong></td>
<td style="text-align: left;">大多數發行版的官方倉庫均有收錄，與系統內核結合緊密。</td>
<td style="text-align: left;">開源愛好者、需要高度自訂環境的開發者。</td>
</tr>
</tbody>
</table>
<p>如果你不想在本地端安裝龐大的軟體包，或者需要多人協作，那麼推薦使用 <a href="https://www.overleaf.com/">Overleaf</a>。Overleaf 是一個強大的 Web 端平台，直接在瀏覽器執行，並且內建了最新的 TeX Live 環境，不需要任何安裝步驟，是懶人與輕量使用者的福音。不過 Overleaf 時不時就會維修，所以還是要了解如何在本機安裝編譯器與編輯器。</p>
</section>
<section id="編輯器" class="level3">
<h3 class="anchored" data-anchor-id="編輯器">編輯器</h3>
<p>相較於編譯器有嚴格的系統建議，編輯器的選擇就顯得自由許多。編輯器本質上就是一個「文字處理介面」，只要能產生 <code>.tex</code> 檔案，甚至連電腦預設的<strong>記事本</strong>都能成為你的 LaTeX 工具。</p>
<p>不過，為了提升撰寫效率，選擇具備語法高亮、自動補全與即時預覽功能的專業編輯器會讓你事半功倍。</p>
<table class="caption-top table">
<thead>
<tr class="header">
<th style="text-align: left;">編輯器名稱</th>
<th style="text-align: left;">優點與特色</th>
<th style="text-align: left;">適合對象</th>
</tr>
</thead>
<tbody>
<tr class="odd">
<td style="text-align: left;"><a href="https://www.texstudio.org/">TeXstudio</a></td>
<td style="text-align: left;">功能最完備的整合開發環境 (IDE)，內建大量的數學符號面板與即時語法檢查。</td>
<td style="text-align: left;">剛從 Word 轉過來，需要視覺化工具輔助的使用者。</td>
</tr>
<tr class="even">
<td style="text-align: left;"><a href="https://www.xm1math.net/texmaker/">TeXmaker</a></td>
<td style="text-align: left;">介面簡潔、跨平台支援良好，配置非常直覺，是許多老手的經典選擇。</td>
<td style="text-align: left;">追求穩定、不希望功能太過複雜的使用者。</td>
</tr>
<tr class="odd">
<td style="text-align: left;"><a href="https://code.visualstudio.com/">Visual Studio Code</a></td>
<td style="text-align: left;">透過安裝 <a href="https://marketplace.visualstudio.com/items?itemName=James-Yu.latex-workshop">LaTeX Workshop</a> 擴充功能，能提供極強的代碼補全、斷點跳轉與極美觀的 UI。</td>
<td style="text-align: left;">已經在使用 VS Code 開發、喜歡現代感介面與高度自定義的開發者。</td>
</tr>
</tbody>
</table>
<div class="callout callout-style-default callout-tip callout-titled">
<div class="callout-header d-flex align-content-center">
<div class="callout-icon-container">
<i class="callout-icon"></i>
</div>
<div class="callout-title-container flex-fill">
<span class="screen-reader-only">提示</span>小叮嚀
</div>
</div>
<div class="callout-body-container callout-body">
<p>不論你選擇哪一個，請記得先確認你的<strong>編譯器</strong> (MikTeX / TeX Live / MacTeX) 已經安裝完成，編輯器才能順利幫你把代碼轉成漂亮的 PDF 喔！</p>
</div>
</div>
</section>
</section>
<section id="latex-語法概說" class="level2">
<h2 class="anchored" data-anchor-id="latex-語法概說">LaTeX 語法概說</h2>
<p>在正式進入語法教學之前，我們先透過一個簡單的範例，觀察 LaTeX 文件的基本結構：</p>
<div class="latex-runner" data-engine="pdflatex"><pre class="latex-source">\documentclass[12pt]{article}  % 定義文件類型與字體大小

\title{My First Document}      % 標題
\author{Author}                % 作者
\date{\today}                  % 日期

\begin{document}               % 正文開始
\maketitle                     % 產生標題區塊

This is my first \LaTeX\ document!

\end{document}                 % 正文結束</pre></div>
<p>細心的你肯定有發現，LaTeX 的指令是以反斜線 (backslash) <code>\</code> 開頭的。如果你需要使用一些指令，那麼就必須用 <code>\</code> 告訴 LaTeX 編譯器需要使用該指令，否則電腦無法判讀，僅會將其視為一般字母顯示。</p>
<p>除了反斜線，LaTeX 中還有許多具有特定功能的<strong>保留字元</strong>。若要在文中使用這些功能，必須正確使用：</p>
<table class="caption-top table">
<caption>常見的 LaTeX 特殊符號表</caption>
<colgroup>
<col style="width: 33%">
<col style="width: 33%">
<col style="width: 33%">
</colgroup>
<thead>
<tr class="header">
<th style="text-align: left;">符號</th>
<th style="text-align: left;">功能名稱</th>
<th style="text-align: left;">詳細說明</th>
</tr>
</thead>
<tbody>
<tr class="odd">
<td style="text-align: left;"><code>\</code></td>
<td style="text-align: left;">下排版命令</td>
<td style="text-align: left;">所有 LaTeX 指令的啟始點，用於調用格式或功能。</td>
</tr>
<tr class="even">
<td style="text-align: left;"><code>%</code></td>
<td style="text-align: left;">註解</td>
<td style="text-align: left;">在此符號後方輸入的文字，編譯器會自動忽略，常用於寫備忘錄。</td>
</tr>
<tr class="odd">
<td style="text-align: left;"><code>#</code></td>
<td style="text-align: left;">參數定義</td>
<td style="text-align: left;">用於定義巨集或自定義指令時，指定參數的代號（如 #1, #2）。</td>
</tr>
<tr class="even">
<td style="text-align: left;"><code>~</code></td>
<td style="text-align: left;">硬空白</td>
<td style="text-align: left;">產生一個不會被自動換行（Non-breaking space）切斷的空格。</td>
</tr>
<tr class="odd">
<td style="text-align: left;"><code>$</code></td>
<td style="text-align: left;">數學模式切換</td>
<td style="text-align: left;">夾在兩個 <code>$</code> 之間的文字會進入數學環境（Math Mode）。</td>
</tr>
<tr class="even">
<td style="text-align: left;"><code>^</code></td>
<td style="text-align: left;">上標</td>
<td style="text-align: left;">在數學模式中將後方字元變為上標（如：<img src="https://latex.codecogs.com/png.latex?x%5E2">）。</td>
</tr>
<tr class="odd">
<td style="text-align: left;"><code>_</code></td>
<td style="text-align: left;">下標</td>
<td style="text-align: left;">在數學模式中將後方字元變為下標（如：<img src="https://latex.codecogs.com/png.latex?a_n">）。</td>
</tr>
<tr class="even">
<td style="text-align: left;"><code>&amp;</code></td>
<td style="text-align: left;">分隔符號</td>
<td style="text-align: left;">主要用於製作表格或對齊方程式，用來區隔欄位。</td>
</tr>
<tr class="odd">
<td style="text-align: left;"><code>{ }</code></td>
<td style="text-align: left;">分組與參數</td>
<td style="text-align: left;">用來界定指令的影響範圍，或包裹指令所需的必要參數。</td>
</tr>
</tbody>
</table>
<p>如果你想在文章中直接顯示上述的符號，例如 50% 或 $，不能直接輸入。大部分的符號需要在前面多加一個反斜線來「轉義」，例如：</p>
<ul>
<li>輸入 <code>\%</code> 才會顯示 <code>%</code></li>
<li>輸入 <code>\$</code> 才會顯示 <code>$</code></li>
<li>輸入 <code>\_</code> 才會顯示 <code>_</code></li>
</ul>
<section id="使用參數" class="level3">
<h3 class="anchored" data-anchor-id="使用參數">使用參數</h3>
<p>在 <code>\documentclass[12pt]{article}</code> 中，我們可以看到兩種不同外型的括號，它們在 LaTeX 中各司其職：</p>
<ul>
<li><strong>選擇參數 (optional argument) <code>[...]</code></strong>： 通常用於調整設定 (如字體大小 <code>12pt</code>)。這類參數是可以留空的，若不輸入，系統會直接套用預設值。</li>
<li><strong>必要參數 (mandatory argument) <code>{...}</code></strong>： 定義指令的核心內容 (如文件類別 <code>article</code>)。如果留空或不輸入，編譯器會因為不知道具體對象而噴出錯誤。</li>
</ul>
<div class="callout callout-style-default callout-tip callout-titled">
<div class="callout-header d-flex align-content-center">
<div class="callout-icon-container">
<i class="callout-icon"></i>
</div>
<div class="callout-title-container flex-fill">
<span class="screen-reader-only">提示</span>小叮嚀
</div>
</div>
<div class="callout-body-container callout-body">
<p>在開始打字前，請先建立這兩個與 Word 大不相同的認知：</p>
<ol type="1">
<li><strong>空格的意義</strong>： 在 LaTeX 文件中，<strong>空一個格與空十個格的效果是一樣的</strong>，編譯器一律認作「一個空白」。</li>
<li><strong>換行的邏輯</strong>： 直接按 <code>Enter</code> 鍵並不代表 PDF 會換行。若要強迫換行，請使用：
<ul>
<li>指令：<code>\\</code>、<code>\newline</code> 或 <code>\linebreak</code>。</li>
<li>快捷鍵：<strong>Windows</strong> 使用者可按 <code>Ctrl + Enter</code>；<strong>macOS</strong> 使用者可按 <code>⌘ + ↩︎</code>。</li>
</ul></li>
</ol>
</div>
</div>
</section>
<section id="使用指令" class="level3">
<h3 class="anchored" data-anchor-id="使用指令">使用指令</h3>
<p>LaTeX 的指令通常從反斜線 <code>\</code> 開始，直到第一個「非字母」符號 (如空白、標點或數字) 為止。這會導致一個常見問題：</p>
<div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb1" style="background: #f1f3f5;"><pre class="sourceCode latex code-with-copy"><code class="sourceCode latex"><span id="cb1-1">This is my first <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">\LaTeX</span> typesetting example.</span></code></pre></div></div>
<p>由於 <code>\LaTeX</code> 後面的空白會被當成指令的結束符號而被「吃掉」，輸出結果會變成：<code>This is my first LaTeXtypesetting example.</code>，字會全部擠在一起！</p>
<p>若要避免這種情況，可以使用以下三種標準寫法：</p>
<ol type="1">
<li><code>{\LaTeX}</code>：用花括號將指令隔離。</li>
<li><code>\LaTeX{}</code>：在指令後加空的花括號。</li>
<li><code>\LaTeX\</code>：在指令後加一個反斜線與空白，強迫輸出一個空格。</li>
</ol>
<div class="latex-runner" data-engine="pdflatex"><pre class="latex-source">\documentclass[12pt]{article}

\title{My First Document}
\author{Author}
\date{\today}

\begin{document}
\maketitle

This is my first \LaTeX typesetting example.    % 會擠在一起

This is my first {\LaTeX} typesetting example.  % 方法一：用花括號隔離

This is my first \LaTeX{} typesetting example.  % 方法二：在指令後加入空的花括號

This is my first \LaTeX\ typesetting example.   % 方法三：加入反斜線與空白強迫輸出空格

\end{document}</pre></div>
</section>
<section id="使用註解" class="level3">
<h3 class="anchored" data-anchor-id="使用註解">使用註解</h3>
<p>註解符號 <code>%</code> 可以放在任何地方。<code>%</code> 之後的文字會被編譯器無視，通常在編輯器中會變色。註解的用途除了寫備忘錄，最常用於「實驗」──當你想測試某個設定好不好看時，可以先把舊的設定「註解掉」而不是刪掉，方便隨時切換回來對比差異。</p>
</section>
<section id="使用環境" class="level3">
<h3 class="anchored" data-anchor-id="使用環境">使用環境</h3>
<p>LaTeX 有一種強大的結構稱為環境，它能定義一個特定範圍，讓內部的文字遵循特定的排版規則。</p>
<p>所有的環境都必須有頭有尾：</p>
<div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb2" style="background: #f1f3f5;"><pre class="sourceCode latex code-with-copy"><code class="sourceCode latex"><span id="cb2-1"><span class="kw" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;">\begin</span>{<span class="er" style="color: #AD0000;
background-color: null;
font-style: inherit;">環</span>境名稱}</span>
<span id="cb2-2">這裡是被影響的內容 ...</span>
<span id="cb2-3"><span class="kw" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;">\end</span>{<span class="er" style="color: #AD0000;
background-color: null;
font-style: inherit;">環</span>境名稱}</span></code></pre></div></div>
<p>最核心的環境就是 <code>document</code>。所有你想印出來的內容都必須包在這裡。這形成了 LaTeX 文稿的標準骨幹：</p>
<div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb3" style="background: #f1f3f5;"><pre class="sourceCode latex code-with-copy"><code class="sourceCode latex"><span id="cb3-1"><span class="bu" style="color: null;
background-color: null;
font-style: inherit;">\documentclass</span>[12pt]{<span class="ex" style="color: null;
background-color: null;
font-style: inherit;">article</span>}</span>
<span id="cb3-2"><span class="co" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">% 這裡是前言區</span></span>
<span id="cb3-3"></span>
<span id="cb3-4"><span class="kw" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;">\begin</span>{<span class="ex" style="color: null;
background-color: null;
font-style: inherit;">document</span>}</span>
<span id="cb3-5">這裡是「正文區」...</span>
<span id="cb3-6"><span class="kw" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;">\end</span>{<span class="ex" style="color: null;
background-color: null;
font-style: inherit;">document</span>}</span></code></pre></div></div>
</section>
</section>
<section id="本章小結" class="level2">
<h2 class="anchored" data-anchor-id="本章小結">本章小結</h2>
<p>在這一章中，我們揭開了 LaTeX 的神秘面紗，並建立了正確的排版思維。以下是幾個關鍵筆記：</p>
<section id="核心觀念內容與排版分離" class="level3">
<h3 class="anchored" data-anchor-id="核心觀念內容與排版分離">核心觀念：內容與排版分離</h3>
<ul>
<li><strong>LaTeX</strong> 讓你可以專注於「寫作內容」，而「專業排版」則交給編譯器處理。</li>
<li>與 Word 不同，LaTeX 透過<strong>指令</strong>來精確控制文件的結構。</li>
</ul>
</section>
<section id="環境建置先後順序很重要" class="level3">
<h3 class="anchored" data-anchor-id="環境建置先後順序很重要">環境建置：先後順序很重要</h3>
<ul>
<li><strong>黃金法則</strong>：必須<strong>先安裝編譯器</strong>（如 TeX Live, MiKTeX, MacTeX），<strong>再安裝編輯器</strong>（如 TeXstudio, VS Code）。</li>
<li>若想省去安裝麻煩，<strong>Overleaf</strong> 是最便利的雲端替代方案。</li>
</ul>
</section>
<section id="語法重點速記" class="level3">
<h3 class="anchored" data-anchor-id="語法重點速記">語法重點速記</h3>
<ul>
<li><strong>指令啟動碼</strong>：所有指令皆以反斜線 <code>\</code> 開頭。</li>
<li><strong>參數區分</strong>：方括號 <code>[]</code> 是可有可無的「選配」，花括號 <code>{}</code> 是不可或缺的「必配」。</li>
<li><strong>空白與換行</strong>：多個空格會被視為一個；換行請用 <code>\\</code> 或空一行。</li>
<li><strong>文件結構</strong>：一份完整的文稿包含「前言區 (Preamble)」與包裹在 <code>document</code> 環境內的「正文區」。</li>
</ul>


</section>
</section>


<a onclick="window.scrollTo(0, 0); return false;" id="quarto-back-to-top"><i class="bi bi-arrow-up"></i> 回到頂端</a><div id="quarto-appendix" class="default"><section id="footnotes" class="footnotes footnotes-end-of-document"><h2 class="anchored quarto-appendix-heading">腳註</h2>

<ol>
<li id="fn1"><p>此處的不聰明並不是指「文繞圖」(wrap text around a picture) 的功能，而是指圖片時常不會在正確的位置上，容易因為文字的多寡而跑版，調整時往往需要耗費大量精力。↩︎</p></li>
<li id="fn2"><p>編輯器用於編寫和管理 LaTeX 程式碼，提供便捷的編寫環境；編譯器則負責將這些程式碼轉換為最終輸出的文件。↩︎</p></li>
<li id="fn3"><p>Choosing a LaTeX Compiler. (n.d.). Overleaf, Online LaTeX Editor. <a href="https://es.overleaf.com/learn/latex/Choosing_a_LaTeX_Compiler%23Other_compilers">https://es.overleaf.com/learn/latex/Choosing_a_LaTeX_Compiler%23Other_compilers</a>↩︎</p></li>
</ol>
</section></div> ]]></description>
  <category>LaTeX</category>
  <guid>https://your-domain.com/articles/posts/2026/04/12/latex-intro.html</guid>
  <pubDate>Sun, 12 Apr 2026 00:00:00 GMT</pubDate>
  <media:content url="https://your-domain.com/articles/posts/2026/04/12/images/LaTeX_logo.png" medium="image" type="image/png" height="81" width="144"/>
</item>
</channel>
</rss>
