1. Document Structure Commands
\documentclass{article} % Common classes: article, report, book, beamer
\begin{document}
Your content goes here.
\end{document}
\title{My First LaTeX Document}
\author{John Doe}
\date{\today} % Automatically inserts the current date
\maketitle
2. Sectioning Commands
\section{Introduction}
\subsection{Background}
\subsubsection{Details}
3. Text Formatting Commands
\textbf{This is bold text}
\textit{This is italic text}
\underline{This is underlined text}
4. Lists
\begin{itemize}
\item First item
\item Second item
\end{itemize}
\begin{enumerate}
\item First item
\item Second item
\end{enumerate}
5. Mathematical Expressions
E = mc^2
\[ E = mc^2 \]
\begin{equation}
E = mc^2
\end{equation}
6. Figures and Tables
\usepackage{graphicx} % Add this in the preamble
\begin{figure}
\centering
\includegraphics[width=\textwidth]{image.png}
\caption{Sample Figure}
\label{fig:sample}
\end{figure}
\begin{table}
\centering
\begin{tabular}{|c|c|c|}
\hline
Header1 & Header2 & Header3 \\
\hline
Row1 & Row1 & Row1 \\
\hline
Row2 & Row2 & Row2 \\
\hline
\end{tabular}
\caption{Sample Table}
\label{tab:sample}
\end{table}
7. References and Citations
\section{Introduction} \label{sec:intro}
As seen in Section \ref{sec:intro}...
\begin{thebibliography}{9}
\bibitem{latexcompanion}
Michel Goossens, Frank Mittelbach, and Alexander Samarin.
\textit{The \LaTeX\ Companion}.
Addison-Wesley, Reading, Massachusetts, 1993.
\end{thebibliography}
8. Packages
\usepackage{amsmath} % For advanced math features
\usepackage{hyperref} % For hyperlinks
Except where otherwise noted, this work is licensed under a Creative Commons Attribution-NonCommercial 4.0 International License. For details and exceptions, see the Library Copyright Statement.
© 2016-23 The University of Texas at Arlington.
University of Texas Arlington Libraries
702 Planetarium Place · Arlington, TX 76019 · 817-272-3000