1% ============================================================================
2% article_template.tex - Complete Article Template
3% ============================================================================
4% This template demonstrates the structure of a typical academic article,
5% including commonly used packages, metadata, and sectioning.
6%
7% Compilation:
8% pdflatex article_template.tex
9% ============================================================================
10
11\documentclass[11pt,a4paper]{article}
12
13% ============================================================================
14% PACKAGE IMPORTS
15% ============================================================================
16
17% Essential packages for encoding and fonts
18\usepackage[utf8]{inputenc} % UTF-8 input encoding
19\usepackage[T1]{fontenc} % Font encoding
20\usepackage{lmodern} % Latin Modern font (clearer than default)
21
22% Page layout and margins
23\usepackage[margin=1in]{geometry}
24
25% Language and hyphenation
26\usepackage[english]{babel}
27
28% Enhanced mathematical typesetting
29\usepackage{amsmath, amssymb, amsthm}
30
31% Graphics and figures
32\usepackage{graphicx}
33\usepackage{float} % Better float positioning
34
35% Tables
36\usepackage{booktabs} % Professional table formatting
37
38% Colors
39\usepackage{xcolor}
40
41% Hyperlinks (should be loaded last)
42\usepackage{hyperref}
43\hypersetup{
44 colorlinks=true,
45 linkcolor=blue,
46 citecolor=green,
47 urlcolor=cyan,
48 pdftitle={Article Template},
49 pdfauthor={Your Name}
50}
51
52% ============================================================================
53% CUSTOM COMMANDS AND SETTINGS
54% ============================================================================
55
56% Define a custom theorem environment
57\newtheorem{theorem}{Theorem}[section]
58\newtheorem{lemma}[theorem]{Lemma}
59\newtheorem{corollary}[theorem]{Corollary}
60
61% Custom command example
62\newcommand{\R}{\mathbb{R}} % Real numbers symbol
63
64% ============================================================================
65% DOCUMENT METADATA
66% ============================================================================
67
68\title{A Comprehensive Article Template for \LaTeX}
69
70\author{
71 John Doe\thanks{Department of Computer Science, Example University} \\
72 \texttt{john.doe@example.edu}
73 \and
74 Jane Smith\thanks{Department of Mathematics, Example University} \\
75 \texttt{jane.smith@example.edu}
76}
77
78\date{\today} % Or specify a date: \date{January 1, 2026}
79
80% ============================================================================
81% DOCUMENT BODY
82% ============================================================================
83
84\begin{document}
85
86% Generate title
87\maketitle
88
89% ============================================================================
90% ABSTRACT
91% ============================================================================
92
93\begin{abstract}
94This document serves as a comprehensive template for writing academic articles
95in \LaTeX. It demonstrates the proper structure of an article, including the
96use of sections, subsections, mathematical equations, figures, tables, and
97references. The abstract should provide a concise summary of the paper's
98purpose, methods, results, and conclusions, typically in 150--250 words.
99This template includes commonly used packages and best practices for
100scientific writing.
101
102\noindent\textbf{Keywords:} \LaTeX, document structure, academic writing,
103template, typesetting
104\end{abstract}
105
106% ============================================================================
107% MAIN CONTENT
108% ============================================================================
109
110\section{Introduction}
111\label{sec:introduction}
112
113The introduction sets the context for your work and states the problem you
114are addressing. It should provide sufficient background for readers to
115understand the motivation and significance of your research.
116
117\LaTeX{} is a high-quality typesetting system designed for the production of
118technical and scientific documentation. Unlike word processors, \LaTeX{}
119separates content from formatting, allowing authors to focus on writing while
120the system handles layout and typography.
121
122This template demonstrates:
123\begin{itemize}
124 \item Proper document structure with sections and subsections
125 \item Mathematical equation formatting
126 \item Figure and table inclusion
127 \item Cross-referencing and citations
128 \item Bibliography management
129\end{itemize}
130
131\section{Background and Related Work}
132\label{sec:background}
133
134This section reviews relevant literature and establishes the theoretical
135foundation for your work. You can cite references using \verb|\cite{}|
136commands (requires a bibliography).
137
138\subsection{Document Classes}
139
140\LaTeX{} provides several standard document classes:
141\begin{description}
142 \item[article] For short documents, journal papers, conference proceedings
143 \item[report] For longer documents with chapters (theses, books)
144 \item[book] For actual books with front/back matter
145 \item[beamer] For presentations
146\end{description}
147
148\subsection{Package Ecosystem}
149
150The Comprehensive \TeX{} Archive Network (CTAN) hosts thousands of packages
151that extend \LaTeX's capabilities. Common packages include \texttt{amsmath}
152for mathematics, \texttt{graphicx} for figures, and \texttt{hyperref} for
153hyperlinks.
154
155\section{Methodology}
156\label{sec:methodology}
157
158Describe your methods here. You can cross-reference other sections using
159\verb|\label{}| and \verb|\ref{}| commands. For example, the introduction
160is in Section~\ref{sec:introduction}.
161
162\subsection{Mathematical Notation}
163
164Inline mathematics uses single dollar signs: $E = mc^2$. Display mathematics
165uses the \texttt{equation} environment:
166
167\begin{equation}
168 \label{eq:quadratic}
169 x = \frac{-b \pm \sqrt{b^2 - 4ac}}{2a}
170\end{equation}
171
172We can reference Equation~\ref{eq:quadratic} later in the text.
173
174\subsection{Lists and Enumerations}
175
176Unordered lists (itemize):
177\begin{itemize}
178 \item First item
179 \item Second item
180 \item Third item
181\end{itemize}
182
183Ordered lists (enumerate):
184\begin{enumerate}
185 \item First step
186 \item Second step
187 \item Third step
188\end{enumerate}
189
190\section{Results}
191\label{sec:results}
192
193Present your findings in this section. Use subsections to organize different
194aspects of your results.
195
196\subsection{Numerical Results}
197
198Table~\ref{tab:results} shows example numerical data.
199
200\begin{table}[h]
201\centering
202\caption{Example results table}
203\label{tab:results}
204\begin{tabular}{lrrr}
205\toprule
206Method & Accuracy & Precision & Recall \\
207\midrule
208Method A & 0.85 & 0.82 & 0.88 \\
209Method B & 0.92 & 0.90 & 0.94 \\
210Method C & 0.88 & 0.85 & 0.91 \\
211\bottomrule
212\end{tabular}
213\end{table}
214
215\subsection{Theoretical Results}
216
217\begin{theorem}[Pythagorean Theorem]
218\label{thm:pythagoras}
219In a right triangle, the square of the hypotenuse equals the sum of squares
220of the other two sides:
221\[
222 a^2 + b^2 = c^2
223\]
224\end{theorem}
225
226\section{Discussion}
227\label{sec:discussion}
228
229Interpret your results and discuss their implications. Compare with existing
230work and acknowledge limitations.
231
232\section{Conclusion}
233\label{sec:conclusion}
234
235Summarize your main contributions and suggest directions for future work.
236This template provides a solid foundation for academic article writing in
237\LaTeX, demonstrating best practices for document organization and formatting.
238
239% ============================================================================
240% ACKNOWLEDGMENTS
241% ============================================================================
242
243\section*{Acknowledgments}
244
245This work was supported by Example Grant No. 12345. The authors thank
246Dr. Example Reviewer for helpful comments.
247
248% ============================================================================
249% BIBLIOGRAPHY
250% ============================================================================
251% In a real document, you would use BibTeX:
252% \bibliographystyle{plain}
253% \bibliography{references}
254%
255% For this template, we show a manual bibliography:
256
257\begin{thebibliography}{9}
258
259\bibitem{lamport1994}
260Leslie Lamport.
261\textit{\LaTeX: A Document Preparation System}.
262Addison-Wesley, 2nd edition, 1994.
263
264\bibitem{knuth1984}
265Donald E. Knuth.
266\textit{The \TeX{}book}.
267Addison-Wesley, 1984.
268
269\bibitem{mittelbach2004}
270Frank Mittelbach and Michel Goossens.
271\textit{The \LaTeX{} Companion}.
272Addison-Wesley, 2nd edition, 2004.
273
274\end{thebibliography}
275
276\end{document}
277
278% ============================================================================
279% COMPILATION NOTES
280% ============================================================================
281% For documents with bibliography and cross-references:
282% 1. pdflatex article_template.tex
283% 2. bibtex article_template (if using BibTeX)
284% 3. pdflatex article_template.tex
285% 4. pdflatex article_template.tex
286%
287% Modern alternative: use latexmk for automatic compilation
288% latexmk -pdf article_template.tex
289% ============================================================================