Cấu Trúc Tài Liệu
Khung Cơ Bản
\documentclass[12pt, a4paper]{article} \usepackage[utf8]{inputenc} \usepackage{amsmath} \title{My Document} \author{Your Name} \date{\today} \begin{document} \maketitle Content here. \end{document}
Loại Tài Liệu
articleBài báo, tài liệu ngắn
reportBáo cáo có chương
bookSách với phần và chương
beamerTrình chiếu (slide)
letterThư từ
Cấu Trúc Văn Bản
Tiêu Đề Phần
\part{Part Title} \chapter{Chapter} % report/book only \section{Section} \subsection{Subsection} \subsubsection{Sub-sub} \paragraph{Paragraph}
Định Dạng Văn Bản
\textbf{text}In đậm
\textit{text}In nghiêng
\underline{text}Gạch chân
\texttt{text}Font monospace
\emph{text}Nhấn mạnh (ngữ cảnh)
\textsc{text}Chữ hoa nhỏ
Danh Sách
\begin{itemize} \item First item \item Second item \end{itemize} \begin{enumerate} \item Numbered item \item Second item \end{enumerate} \begin{description} \item[Term] Definition \end{description}
Toán Học
Toán Trong Dòng & Khối
Inline: $e = mc^2$ or \(e = mc^2\) Display: \[ \int_0^\infty e^{-x^2} dx = \frac{\sqrt{\pi}}{2} \] Numbered equation: \begin{equation} E = mc^2 \end{equation}
Ký Hiệu Toán Phổ Biến
^{n} / _{n}Số mũ / chỉ số dưới
\frac{a}{b}Phân số
\sqrt{x} / \sqrt[n]{x}Căn bậc hai / căn bậc n
\sum_{i=1}^{n}Ký hiệu tổng
\int_{a}^{b}Ký hiệu tích phân
\lim_{x \to 0}Giới hạn
\inftyVô cực
\alpha \beta \gamma \piChữ cái Hy Lạp
Môi Trường Align
\begin{align} f(x) &= x^2 + 2x + 1 \\ &= (x + 1)^2 \end{align}
Bảng Biểu
Bảng Cơ Bản
\begin{tabular}{|l|c|r|} \hline Left & Center & Right \\ \hline a & b & c \\ d & e & f \\ \hline \end{tabular}
Chỉ Định Cột
l / c / rCăn trái / giữa / phải
|Đường kẻ dọc
p{3cm}Cột độ rộng cố định với wrap
\hlineĐường kẻ ngang
\multicolumn{n}{c}{text}Ô trải qua n cột
Float Bảng
\begin{table}[ht] \centering \caption{My Table} \label{tab:mytable} \begin{tabular}{ll} \hline Col1 & Col2 \\ \hline a & b \\ \hline \end{tabular} \end{table}
Hình Ảnh
Chèn Hình
\usepackage{graphicx} % in preamble \includegraphics[width=0.8\textwidth]{image.png} \includegraphics[scale=0.5]{figure.pdf}
Float Hình
\begin{figure}[ht] \centering \includegraphics[width=0.7\textwidth]{plot.png} \caption{This is the caption.} \label{fig:myplot} \end{figure}
Tùy Chọn Vị Trí
hTại vị trí hiện tại (nếu có thể)
tĐầu trang
bCuối trang
pTrang riêng cho floats
!Buộc vị trí (bỏ qua giới hạn)
References & Links
Cross-References
\label{sec:intro} % place marker See Section~\ref{sec:intro} Figure~\ref{fig:myplot} on page~\pageref{fig:myplot}
Bibliography
\cite{knuth1984} % inline citation \bibliographystyle{plain} \bibliography{refs} % refs.bib file % BibTeX entry: @book{knuth1984, author = {Knuth, Donald}, title = {The TeXbook}, year = {1984} }
Hyperlinks
\usepackage{hyperref} \href{https://example.com}{Link Text} \url{https://example.com}
Packages Phổ Biến
Packages Cần Thiết
amsmath / amssymbMôi trường và ký hiệu toán học nâng cao
graphicxChèn và thay đổi kích thước hình ảnh
geometryLề và kích thước trang
hyperrefHyperlinks và PDF metadata
booktabsBảng chất lượng cao với toprule/midrule
listingsĐịnh dạng code với syntax highlight
tikzVẽ đồ họa và sơ đồ
babelHỗ trợ ngôn ngữ quốc tế hoá
Cài Đặt Geometry
\usepackage[ a4paper, top=2.5cm, bottom=2.5cm, left=3cm, right=3cm ]{geometry}
Common Patterns
Code Listings
\usepackage{listings} \begin{lstlisting}[language=Python] def hello(): print("Hello, World!") \end{lstlisting}
Toán Nhiều Dòng
\begin{gather} a + b = c \\ d + e = f \end{gather} % Cases: f(x) = \begin{cases} x^2 & x \geq 0 \\ -x & x < 0 \end{cases}