歡迎來到 LaTeX 的世界!對於第一次接觸的初學者,最容易受挫的原因通常是「花太多時間在記指令」和「排版環境設定失敗」。使用 Overleaf 線上編輯器是最好的起點,它幫您解決了最麻煩的安裝問題。以下是為您整理的四步高效學習法:
這是所有操作的起點,讓您無需在電腦安裝任何軟體,直接在瀏覽器編寫 LaTeX。
.edu)註冊,有機會免費升級為 Standard / Professional。不要從零開始打字,請在 Overleaf 建立一個新專案(Blank project),並直接貼上以下這段最基礎的排版範本
\documentclass 到 \end{document} 之間 \documentclass[12pt, letterpaper]{article} % 設定字體與紙張大小
% --- 前導區(引入英文排版必備套件) ---
\usepackage[utf8]{inputenc} % 確保特殊英文字元正常顯示
\usepackage[margin=1in]{geometry} % 設定頁面邊距為 1 英吋
\usepackage{graphicx} % 圖片處理套件
\usepackage{amsmath, amssymb} % 數學公式進階套件
\usepackage{booktabs} % 製作美觀英文表格的必備套件
\title{An Elegant Academic Report in LaTeX}
\author{Your Name}
\date{\today}
\begin{document}
\maketitle
\begin{abstract}
This is the abstract of your paper. It provides a brief summary of the research background, methods, and main conclusions.
\end{abstract}
\section{Introduction}
Writing in English with \LaTeX{} is highly efficient. You don't need to worry about font encodings or missing characters. For instance, we can easily write bold text like \textbf{this} or italic text like \textit{that}.
\section{Methodology}
In this section, we present our core mathematical model. The famous Einstein equation is given by:
\begin{equation}
E = mc^2 \label{eq:einstein}
\end{equation}
\end{document}
\ 開頭的都是指令(如 \section)\begin{document} 到 \end{document} 之間才是你的文章內容當文件僅是"純英文"時,建議將核心引擎切換回速度最快的 pdfLaTeX:
LaTeX 有許多 Word 看不出來的專業排版潛規則,寫英文時請務必遵循:
| 排版對象 | 錯誤打法 (Word 思維) | 正確打法 (LaTeX 規範) | 說明 |
|---|---|---|---|
| 左右雙引號 | "hello" |
``hello'' |
左引號用鍵盤左上角兩個反單引號;右引號用兩個單引號。 |
| 連字號 (Dash) | 全部都打 - |
-, --, --- |
一般連字用 -;數字範圍用 --;轉折破折號用 ---。 |
| 縮寫後空格 | Dr. Smith |
Dr.\ Smith |
句點後若非句子結束,需加反斜線與空格,避免間距過寬。 |
點擊 左上角 Overleaf 圖案 Back to your projects,再次 建立新專案(New project)後,直接貼上以下這段中文排版範本,在改變 typesetting 為 XeLaTeX 後點擊 Recompile
\documentclass{ctexart} % 使用中文專用的文章格式
\title{我的第一篇 LaTeX 文件}
\author{您的名字}
\date{\today}
\begin{document} % 正文開始
\maketitle % 自動生成標題、作者和日期
\section{第一章:初體驗}
這是我第一次使用 LaTeX。在 Overleaf 上寫中文非常簡單!
\subsection{這是小標題}
這裡可以繼續寫內容。如果想要變換字體,例如\textbf{粗體字}或是\textit{斜體字}(中文斜體需注意字型支援)。
\end{document} % 正文結束
初學 LaTeX 不需要背所有指令,只要先學會這三個最常用的功能:
$...$ 包起來,例如 $E=mc^2$。$$...$$ 包起來,例如 $$\sum_{i=1}^n i = \frac{n(n+1)}{2}$$。\begin{document} 之前)加上 \usepackage{graphicx}。\begin{figure}[h]
\centering
\includegraphics[width=0.5\linewidth]{圖片檔名.jpg}
\caption{圖片說明文字}
\end{figure}
LaTeX 的精髓在於「內容與排版分離」。您不需要自己設計版面,而是去找別人寫好的「範本(Template)」。
NYCU thesis template」,通常學長姐都會留下格式正確的畢業論文範本。遇到不會的符號或指令,請利用這兩個神器: