LaTeX is an incredibly powerful typesetting system, favoured by academics, students, and professionals for its handling of complex mathematics, automatic referencing, and consistent structure. While its logical structuring capabilities are top-notch, efficiently getting content *into* LaTeX, especially complex equations or diagrams from existing sources, can sometimes be time-consuming. For instance, tools like TexCapture can dramatically speed up incorporating equations from images or handwriting directly into your LaTeX source, streamlining the initial drafting phase.
However, once your content is drafted, the default visual output of LaTeX, while functional, can sometimes look a bit dated or plain. The good news is that with a few adjustments and the right packages, you can significantly enhance the visual appeal of your documents. This guide is for those already familiar with basic LaTeX commands who want to take their documents from merely functional to truly beautiful, focusing on that crucial final polish. We'll explore 10 specific improvements, showing the problem, a "before" code snippet, and an "after" snippet, along with explanations.
This guide is for those already familiar with basic LaTeX commands who want to take their documents from merely functional to truly beautiful. We'll explore 10 specific improvements, showing the problem, a "before" code snippet representing the default, and an "after" snippet demonstrating the improvement, along with explanations.
The Problem: The default LaTeX font, Computer Modern, is iconic but can feel dated compared to contemporary typography. Using more modern fonts can instantly improve readability and visual appeal.
Before (Default Computer Modern):
\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{lipsum} % For dummy text
\begin{document}
\section{Introduction}
\lipsum[1]
\end{document}
After (Using Latin Modern or a specific font like Palatino):
\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{lmodern} % Option 1: Latin Modern (updated Computer Modern)
% \usepackage{mathpazo} % Option 2: Palatino clone (nice serif)
% \usepackage{charter} % Option 3: Charter (another good serif)
% For XeLaTeX/LuaLaTeX users, fontspec offers more choice:
% \usepackage{fontspec}
% \setmainfont{Linux Libertine O} % Example using a system font
\usepackage{lipsum}
\begin{document}
\section{Introduction}
\lipsum[1]
\end{document}
Explanation: Loading packages like lmodern
provides an updated version of Computer Modern with better glyph coverage. Packages like mathpazo
(Palatino) or charter
switch both text and math fonts for a cohesive, different look. For users of XeLaTeX or LuaLaTeX, the fontspec
package allows using any OpenType or TrueType font installed on your system, offering vast possibilities. Choosing a well-designed font is a fundamental step towards a beautiful document.
The Problem: Default LaTeX margins (especially in the article
class) are often quite wide, leading to shorter lines and potentially wasted space, depending on the document type.
Before (Default Margins):
\documentclass{article}
\usepackage[T1]{fontenc}
\usepackage{lmodern}
\usepackage{lipsum}
\begin{document}
\lipsum[1-2]
\end{document}
After (Using the geometry
package):
\documentclass{article}
\usepackage[T1]{fontenc}
\usepackage{lmodern}
\usepackage[margin=1in]{geometry} % Set all margins to 1 inch
% Or customize: \usepackage[left=2.5cm, right=2.5cm, top=3cm, bottom=3cm]{geometry}
\usepackage{lipsum}
\begin{document}
\lipsum[1-2]
\end{document}
Explanation: The geometry
package provides straightforward control over page dimensions, including margins, paper size, and orientation. Setting reasonable margins (e.g., 1 inch or 2.5 cm) often results in better line lengths for readability and a more balanced page appearance.
The Problem: Default single line spacing can feel dense, especially for longer texts or drafts requiring annotation.
Before (Default Single Spacing):
\documentclass{article}
\usepackage[T1]{fontenc}
\usepackage{lmodern}
\usepackage[margin=1in]{geometry}
\usepackage{lipsum}
\begin{document}
\lipsum[1]
\end{document}
After (Using the setspace
package):
\documentclass{article}
\usepackage[T1]{fontenc}
\usepackage{lmodern}
\usepackage[margin=1in]{geometry}
\usepackage{setspace}
\usepackage{lipsum}
\begin{document}
\onehalfspacing % Use 1.5 spacing for the document
% Or \doublespacing for double spacing
% Or \singlespacing to switch back
% Can also use \begin{spacing}{1.2} ... \end{spacing} for specific blocks
\lipsum[1]
\end{document}
Explanation: The setspace
package allows easy adjustment of line spacing. Common options like \onehalfspacing
(1.5 spacing) or \doublespacing
can significantly improve readability and provide space for comments or proofreading marks.
The Problem: LaTeX's default paragraph separation uses indentation with no vertical space. While traditional, some prefer vertical spacing between paragraphs, especially in reports or web-like documents.
Before (Default Indentation):
\documentclass{article}
\usepackage[T1]{fontenc}
\usepackage{lmodern}
\usepackage[margin=1in]{geometry}
\usepackage{lipsum}
\begin{document}
\lipsum[1]
\lipsum[2] % Note the indent on this second paragraph
\end{document}
After (Using parskip
package or manual settings):
\documentclass{article}
\usepackage[T1]{fontenc}
\usepackage{lmodern}
\usepackage[margin=1in]{geometry}
\usepackage{lipsum}
% Option 1: Using parskip package (can affect some list spacing, use with care)
\usepackage[parfill]{parskip} % parfill option tries to mitigate some issues
% Option 2: Manual setting (more control)
% \setlength{\parindent}{0pt} % Remove paragraph indentation
% \setlength{\parskip}{1ex plus 0.5ex minus 0.2ex} % Add vertical space between paragraphs
\begin{document}
\lipsum[1]
\lipsum[2] % Now separated by vertical space, no indent
\end{document}
Explanation: Setting paragraph indentation (\parindent
) to zero and adding vertical space (\parskip
) creates a block paragraph style. The parskip
package automates this, though manual settings offer finer control and avoid potential side effects with lists or other environments. This style clearly demarcates paragraphs visually.
The Problem: The standard LaTeX section headings are functional but visually plain. Customizing their font, size, spacing, or adding rules can make the document structure clearer and more appealing.
Before (Default Headings):
\documentclass{article}
\usepackage[T1]{fontenc}
\usepackage{lmodern}
\usepackage[margin=1in]{geometry}
\usepackage{lipsum}
\begin{document}
\section{Main Section}
\lipsum[1]
\subsection{Subsection}
\lipsum[2]
\end{document}
After (Using the titlesec
package):
\documentclass{article}
\usepackage[T1]{fontenc}
\usepackage{lmodern}
\usepackage[margin=1in]{geometry}
\usepackage{titlesec}
\usepackage{lipsum}
% Example customization: Make section titles large, bold, sans-serif
\titleformat{\section}
{\normalfont\sffamily\Large\bfseries} % Format command
{\thesection} % Label
{1em} % Separation between label and title
{} % Code before title
\titlespacing*{\section}{0pt}{3.5ex plus 1ex minus .2ex}{2.3ex plus .2ex} % Adjust spacing
% Example customization: Add a rule below subsection titles
\titleformat{\subsection}[runin] % runin makes text start on same line
{\normalfont\bfseries}
{\thesubsection}
{1em}
{}
[{\ Vskip\baselineskip \hrulefill}] % Code after title (rule)
\begin{document}
\section{Main Section}
\lipsum[1]
\subsection{Subsection Title} \lipsum[2] % Note text follows runin title
\end{document}
Explanation: The titlesec
package offers extensive control over the appearance of sectioning commands (\section
, \subsection
, etc.). You can change fonts, sizes, spacing, add rules, or even create entirely new heading styles to match your desired aesthetic.
The Problem: Default LaTeX tables (tabular
environment) often look cluttered, especially with vertical rules. Professional tables typically use minimal lines, primarily horizontal rules with varying thickness.
Before (Basic tabular
):
\documentclass{article}
\usepackage[T1]{fontenc}
\usepackage{lmodern}
\usepackage[margin=1in]{geometry}
\begin{document}
\begin{tabular}{|l|c|r|}
\hline
Header 1 & Header 2 & Header 3 \\
\hline
Data A & 123.45 & Long entry \\
Data B & 6.7 & Short \\
\hline
\end{tabular}
\end{document}
After (Using the booktabs
package):
\documentclass{article}
\usepackage[T1]{fontenc}
\usepackage{lmodern}
\usepackage[margin=1in]{geometry}
\usepackage{booktabs} % Load the package
\begin{document}
\begin{tabular}{lcr} % Remove vertical rules |
\toprule % Thicker top rule
Header 1 & Header 2 & Header 3 \\
\midrule % Standard weight middle rule
Data A & 123.45 & Long entry \\
Data B & 6.7 & Short \\
\bottomrule % Thicker bottom rule
\end{tabular}
\end{document}
Explanation: The booktabs
package provides commands (\toprule
, \midrule
, \bottomrule
) for creating publication-quality tables. These rules have appropriate weights and spacing. The package strongly discourages vertical rules, leading to cleaner, more readable tables that emphasize the horizontal flow of information.
The Problem: Default figure captions are plain, and their spacing relative to the figure might need adjustment. Fine-tuning caption appearance improves professionalism.
Before (Basic Figure and Caption):
\documentclass{article}
\usepackage[T1]{fontenc}
\usepackage{lmodern}
\usepackage[margin=1in]{geometry}
\usepackage{graphicx}
\usepackage{lipsum}
\begin{document}
\lipsum[1]
\begin{figure}[htbp] % Use htbp for better placement flexibility
\centering
\includegraphics[width=0.6\textwidth]{example-image} % Requires example-image.png/jpg/pdf
\caption{This is a standard figure caption describing the image content.}
\label{fig:example}
\end{figure}
\lipsum[2]
\end{document}
After (Using the caption
package):
\documentclass{article}
\usepackage[T1]{fontenc}
\usepackage{lmodern}
\usepackage[margin=1in]{geometry}
\usepackage{graphicx}
\usepackage{caption} % Load the package
\usepackage{lipsum}
% Customize caption appearance
\captionsetup{
font=small, % Use a smaller font size
labelfont=bf, % Make the label ("Figure 1:") bold
justification=centering, % Center the caption text
singlelinecheck=false, % Apply justification even for single-line captions
skip=5pt % Space between figure and caption
}
\begin{document}
\lipsum[1]
\begin{figure}[htbp]
\centering
\includegraphics[width=0.6\textwidth]{example-image}
\caption{This is a customized figure caption with bold label and centered text.}
\label{fig:example_custom}
\end{figure}
\lipsum[2]
\end{document}
Explanation: The caption
package allows detailed customization of captions for figures and tables. You can control the font, label format, justification, margins, and spacing. This helps integrate captions smoothly into your document design. Using placement specifiers like [htbp]
(Here, Top, Bottom, Page) gives LaTeX more flexibility in placing the figure nicely.
The Problem: Even with good fonts and layout, subtle typographic issues like uneven spacing in justified text or suboptimal line breaks can detract from the overall quality.
Before (Standard Typesetting):
\documentclass{article}
\usepackage[T1]{fontenc}
\usepackage{lmodern}
\usepackage[margin=1in]{geometry}
\usepackage{lipsum}
\begin{document}
\lipsum[3] % Text that might have tricky justification or hyphenation
\end{document}
After (Using the microtype
package):
\documentclass{article}
\usepackage[T1]{fontenc}
\usepackage{lmodern}
\usepackage[margin=1in]{geometry}
\usepackage{microtype} % Load the package
\usepackage{lipsum}
\begin{document}
\lipsum[3] % The same text, but likely better justified and spaced
\end{document}
Explanation: The microtype
package is almost magical. It implements advanced microtypographic techniques like character protrusion (pushing punctuation slightly into the margin) and font expansion (subtly adjusting character widths) to improve text justification, reduce the number of hyphens, and create a more even "typographic color" on the page. Simply loading the package often yields noticeable improvements, especially with justified text. It requires pdfLaTeX or LuaLaTeX.
The Problem: The default hyperref
package often puts distracting colored boxes around links, which can be visually jarring, especially in print.
Before (Default hyperref
Boxes):
\documentclass{article}
\usepackage[T1]{fontenc}
\usepackage{lmodern}
\usepackage[margin=1in]{geometry}
\usepackage{url}
\usepackage{hyperref} % Load hyperref last (usually)
\usepackage{lipsum}
\begin{document}
See section \ref{sec:intro} or visit \url{https://www.example.com}.
\section{Introduction} \label{sec:intro}
\lipsum[1]
\end{document}
After (Configuring hyperref
for colored text links):
\documentclass{article}
\usepackage[T1]{fontenc}
\usepackage{lmodern}
\usepackage[margin=1in]{geometry}
\usepackage{url}
\usepackage{xcolor} % Required for defining custom colors
\usepackage[
colorlinks=true, % Make links colored text, not boxes
linkcolor=blue, % Color for internal links (sections, figures)
citecolor=green, % Color for citations
urlcolor=magenta % Color for URLs
% Alternatively, for print or minimal look:
% hidelinks % Makes links black, hides them visually (still clickable in PDF)
]{hyperref}
\usepackage{lipsum}
\begin{document}
See section \ref{sec:intro} or visit \url{https://www.example.com}.
\section{Introduction} \label{sec:intro}
\lipsum[1]
\end{document}
Explanation: By passing options to the hyperref
package during loading, you can disable the boxes and use colored text instead. This makes links less intrusive while still indicating their presence clearly, especially for on-screen reading. The hidelinks
option is excellent for final print versions where colored text might be undesirable.
The Problem: The default formatting for itemize
and enumerate
lists is functional but offers little control over spacing, labels, or indentation.
Before (Default Lists):
\documentclass{article}
\usepackage[T1]{fontenc}
\usepackage{lmodern}
\usepackage[margin=1in]{geometry}
\usepackage{lipsum}
\begin{document}
\lipsum[1]
\begin{enumerate}
\item First item.
\item Second item with some more text to see wrapping.
\end{enumerate}
\begin{itemize}
\item Bullet point one.
\item Bullet point two.
\end{itemize}
\lipsum[2]
\end{document}
After (Using the enumitem
package):
\documentclass{article}
\usepackage[T1]{fontenc}
\usepackage{lmodern}
\usepackage[margin=1in]{geometry}
\usepackage{enumitem} % Load the package
\usepackage{lipsum}
% Example: Customize enumerated lists
\setlist[enumerate,1]{label=\arabic*), leftmargin=*, topsep=2pt, itemsep=0pt}
% Example: Customize itemize lists
\setlist[itemize,1]{label=\textbullet, leftmargin=1.5em, topsep=2pt, itemsep=0pt}
\setlist[itemize,2]{label=-, leftmargin=1.5em} % Customize nested itemize
\begin{document}
\lipsum[1]
\begin{enumerate} % Uses settings defined above
\item First item.
\item Second item with some more text to see wrapping.
\end{enumerate}
\begin{itemize} % Uses settings defined above
\item Bullet point one.
\begin{itemize} % Nested list uses level 2 settings
\item Nested item A.
\item Nested item B.
\end{itemize}
\item Bullet point two.
\end{itemize}
\lipsum[2]
\end{document}
Explanation: The enumitem
package provides extensive control over list environments. You can easily change labels (e.g., a)
, (i)
, custom symbols), adjust indentation (leftmargin
), control vertical spacing (topsep
, partopsep
, itemsep
), and create custom list types. This allows you to integrate lists seamlessly into your document's design.
Investing time in the visual presentation of your LaTeX documents pays off. A well-designed document is:
These 10 tips are just the beginning. The world of LaTeX customization is vast. To learn more:
geometry
, titlesec
, booktabs
, caption
, microtype
, and enumitem
contain many more options.KOMA-Script
or memoir
) which offer more built-in design flexibility than the standard classes.By applying these techniques, you can elevate your LaTeX documents from functional necessities to visually compelling pieces of communication. Happy typesetting!
lmodern
, mathpazo
, charter
(Fonts)geometry
(Page Layout)setspace
(Line Spacing)parskip
(Paragraph Spacing)titlesec
(Section Headings)booktabs
(Tables)caption
(Figure/Table Captions)microtype
(Microtypography)hyperref
, xcolor
(Hyperlinks)enumitem
(Lists)```