LaTeX is not a word processor. It is a typesetting system — you write markup, and the compiler produces a formatted document. Once learned, it handles mathematics, figures, tables, cross-references, and bibliographies with a consistency that word processors cannot match at journal-submission quality.
Sign in to mark this article as read and track your progress.
LaTeX (pronounced "lah-tech" or "lay-tech") is a document preparation system built on top of Donald Knuth's TeX typesetting engine. You write a plain-text file containing your content and markup commands, then compile it into a PDF. The compiler handles layout — spacing, hyphenation, figure placement, equation numbering, reference lists — automatically and consistently.
Researchers in computing, mathematics, physics, and engineering use LaTeX for three reasons:
Mathematical typesetting — LaTeX produces publication-quality equations. Word processor equation editors are inconsistent across platforms and export poorly to PDF.
Bibliography management — BibTeX (LaTeX's bibliography system) produces a correctly formatted reference list automatically from a database of entries, in any style the journal or conference requires (APA, IEEE, ACM, etc.) — just by changing one line.
Version control compatibility — because LaTeX documents are plain text, they work with Git. Two authors can work on the same paper simultaneously and merge changes without losing formatting.
\documentclass[12pt]{article}
\usepackage[utf8]{inputenc}
\usepackage{amsmath}
\usepackage{graphicx}
\usepackage{hyperref}
\usepackage[style=ieee]{biblatex}
\addbibresource{references.bib}
\title{Federated Learning for Intrusion Detection on Non-IID Data}
\author{Ashish Revar}
\date{July 2026}
\begin{document}
\maketitle
\begin{abstract}
This paper proposes a personalised aggregation strategy for
federated intrusion detection that addresses non-IID data
distributions across client devices.
\end{abstract}
\section{Introduction}
Federated learning~\cite{mcmahan2017} enables model training
across distributed devices without sharing raw data.
\section{Methodology}
Details of the approach are described in Section~\ref{sec:method}.
\label{sec:method}
\printbibliography
\end{document}
The \documentclass line selects the document type. article is for papers; report is for dissertations; conference and journal templates (IEEEtran, ACM-Reference-Format) replace article with their own class.
The \usepackage{} lines in the preamble load extensions. Essential packages for a research paper:
amsmath — extended mathematicsgraphicx — figureshyperref — clickable links and PDF bookmarksbiblatex with biber backend — bibliographyLaTeX provides a hierarchy of section commands:
\section{Introduction}
\subsection{Background}
\subsubsection{Prior Work on Federated IDS}
\paragraph{Byzantine fault tolerance.}
Numbering is automatic. Cross-references use \label{} to mark a location and \ref{} to refer back to it:
\section{Experimental Results}
\label{sec:results}
As shown in Table~\ref{tab:accuracy}...
The ~ produces a non-breaking space, preventing a line break between "Table" and the number — a typographic convention in academic papers.
Inline mathematics is enclosed in single dollar signs: $f(x) = ax^2 + bx + c$ produces the formula inline with surrounding text.
Display mathematics (centred on its own line, numbered) uses the equation environment:
\begin{equation}
\mathcal{L}(\theta) = -\sum_{i=1}^{N} y_i \log \hat{y}_i
\label{eq:crossentropy}
\end{equation}
For aligned multi-line equations, use align:
\begin{align}
\hat{y} &= \sigma(Wx + b) \\
\mathcal{L} &= -y \log \hat{y} - (1-y) \log(1-\hat{y})
\end{align}
The & aligns the equals signs. \\ ends a row.
\begin{figure}[htbp]
\centering
\includegraphics[width=0.8\linewidth]{roc_curve.pdf}
\caption{ROC curves for the proposed method (solid) and FedAvg
baseline (dashed) on the non-IID test configuration.}
\label{fig:roc}
\end{figure}
[htbp] is a placement preference: here, top of page, bottom of page, or on a float page. LaTeX chooses the best available position.
\begin{table}[htbp]
\centering
\caption{F1 scores across five non-IID configurations.}
\label{tab:accuracy}
\begin{tabular}{lccc}
\hline
Configuration & Proposed & FedAvg & FedProx \\
\hline
$\alpha = 0.1$ & \textbf{0.914} & 0.871 & 0.883 \\
$\alpha = 0.5$ & \textbf{0.937} & 0.912 & 0.921 \\
\hline
\end{tabular}
\end{table}
l, c, r in tabular specify left, centre, and right column alignment. \hline draws a horizontal rule.
A .bib file contains entries for each source:
@article{mcmahan2017,
author = {McMahan, Brendan and Moore, Eider and Ramage, Daniel
and Hampson, Seth and y Arcas, Blaise Ag{\"u}era},
title = {Communication-Efficient Learning of Deep Networks
from Decentralized Data},
journal = {Proceedings of AISTATS},
year = {2017},
volume = {54},
pages = {1273--1282}
}
@inproceedings{pendlebury2019,
author = {Pendlebury, Feargus and Pierazzi, Fabio and
Jordaney, Roberto and Kinder, Johannes and Cavallaro, Lorenzo},
title = {{TESSERACT}: Eliminating Experimental Bias in Malware
Classification across Space and Time},
booktitle = {Proceedings of USENIX Security},
year = {2019}
}
In the document, \cite{mcmahan2017} produces the citation in the style specified by your bibliography package. \printbibliography (with biblatex) or \bibliography{references} (with BibTeX) generates the reference list automatically.
Overleaf (overleaf.com) is a browser-based LaTeX editor that compiles the document on their servers — no local installation required. It supports real-time collaboration: two authors can edit simultaneously and see each other's changes. Most conference and journal templates are available as Overleaf templates, which is the fastest way to start a correctly formatted submission.
For version control, Overleaf can sync to a GitHub repository, giving you both the collaborative editing of Overleaf and the full history of Git.
A student wants to submit a paper to an IEEE conference. The conference requires: two-column layout, 10pt font, IEEE citation style, figures embedded in columns. Identify which LaTeX document class and bibliography style they should use, write the \documentclass and \usepackage lines that set up the document correctly, and explain where to find the conference's official LaTeX template.