# Practical LaTeX techniques

These examples use conventional LaTeX. Your venue template may impose different commands or package restrictions. Start from its supported setup and use the compiled PDF to verify every structural or layout change.

## Figures and float placement

```latex
% Preamble:
\usepackage{graphicx}

% Document body:
\begin{figure}[tbp]
  \centering
  \includegraphics[width=0.9\linewidth]{figures/overview.pdf}
  \caption{A description of the method and the important visual relationships.}
  \label{fig:overview}
\end{figure}

Figure~\ref{fig:overview} summarizes the method.
```

A figure is a **float**: LaTeX places it where its rules allow. `t`, `b`, `p` and `h` request top, bottom, float page and here. `!` relaxes some constraints; it does not guarantee the exact source position. Forcing every figure “here” can make layout worse.

`\linewidth` is the current line width, `\columnwidth` the column width and `\textwidth` the full text area. In two-column templates, `figure*` is commonly used for full-width figures. Its allowed positions can differ from ordinary figures.

Prefer vector PDF for plots when supported and use legible labels at the final size. SVG handling depends on conversion/packages and can require external tools; Figure Studio can export a PDF directly. Keep captions informative and label after caption.

## Publication tables

```latex
% Preamble:
\usepackage{booktabs}

% Document body:
\begin{table}[tb]
  \centering
  \caption{Accuracy on the held-out evaluation set.}
  \label{tab:accuracy}
  \begin{tabular}{lrr}
    \toprule
    Method & Accuracy (\%) & Runs \\
    \midrule
    Baseline & 81.2 & 5 \\
    Proposed & 84.7 & 5 \\
    \bottomrule
  \end{tabular}
\end{table}
```

`tabular` lays out cells; `table` provides a floating wrapper/caption. Column specifications `l`, `c`, `r` align cells, while `p{width}` creates a paragraph-width column. `&` separates columns and `\\` ends rows. A literal ampersand inside a cell is `\&`.

Use consistent precision and units. A wide table might need fewer columns, shorter headings, a landscape/supplementary placement or a template-approved full-width environment. Blindly scaling everything down can make it unreadable.

For editable cells and formulas, use the [table editor](tables.md). For data-driven aggregation/error formatting, use [Figure Studio](figures.md).

## Bibliographies

Choose the bibliography system expected by the template. Do not combine BibTeX/natbib and biblatex configurations arbitrarily.

A traditional BibTeX setup can look like:

```latex
% In the document body:
Prior work studies this problem~\cite{example2026}.
\bibliographystyle{plain}
\bibliography{refs}
```

The accompanying `refs.bib` entry might be:

```bibtex
@article{example2026,
  author = {Example, Alice and Sample, Bob},
  title = {A Clearly Identified Example Paper},
  journal = {Example Journal},
  year = {2026}
}
```

This is an illustrative record, not a real citation. Use the actual registry/source metadata for your paper. Braces can preserve intended capitalization in a title, and `and` separates BibTeX authors.

A biblatex workflow instead loads the package, adds a resource and prints the bibliography:

```latex
% Preamble:
\usepackage[backend=biber,style=numeric]{biblatex}
\addbibresource{refs.bib}

% Body:
An example citation~\autocite{example2026}.
\printbibliography
```

Its backend must be available and the build configured accordingly. Citation commands depend on the package: natbib commonly uses `\citet`/`\citep`; biblatex has `\textcite`/`\parencite`/`\autocite`. Consult the actual template before changing systems.

## Split a larger project

```latex
\begin{document}
\input{sections/introduction}
\input{sections/method}
\input{sections/results}
\bibliographystyle{plain}
\bibliography{refs}
\end{document}
```

`\input` inserts a source fragment. `\include` is useful for larger units and introduces page boundaries; it also interacts with `\includeonly`. Do not put a second `\documentclass`/`\begin{document}` inside an ordinary included fragment.

Keep the compilation root selected in VersoFold while editing included files. Paths must work from the actual build context. Use a coherent folder structure and test copied/exported source so dependencies do not secretly live outside the project.

## Define notation and theorem structures

```latex
% Preamble:
\usepackage{amsmath,amssymb,amsthm}
\newcommand{\R}{\mathbb{R}}
\newcommand{\vect}[1]{\boldsymbol{#1}}
\newtheorem{theorem}{Theorem}

% Body:
Let \(\vect{x}\in\R^d\).
\begin{theorem}
A precisely stated claim belongs here.
\end{theorem}
\begin{proof}
A complete justification belongs here.
\end{proof}
```

Macros keep notation consistent and make deliberate global changes easier. Use distinctive names to avoid collisions with packages. `\newcommand` reports an existing definition; do not switch to `\renewcommand` merely to suppress an error without understanding what you are replacing.

Static tools and Visual mode may not expand arbitrary macros or conditionals. Preserve simple structure when you want outline, word counts and source anchors to work reliably.

## Engines, fonts and packages

Use the engine your template requires. XeLaTeX/LuaLaTeX support `fontspec` workflows; pdfLaTeX uses a different font setup. An engine change can alter line breaks and pagination even when the prose is unchanged.

Load packages once with compatible options. Package order can matter, so follow the template's documented arrangement, particularly for hyperlink/cross-reference packages. Avoid enabling shell escape just to eliminate an unexplained error; first identify which external tool the document actually needs.

## Appendices and submission variants

`\appendix` changes subsequent section/chapter numbering according to the class. Label appendix sections and reference them normally. A supplementary file can also be a separate compilation root with its own preamble.

VersoFold's version/variant tools can preserve shared-body entries or independent versions. Set class options, anonymity, bibliography style and limits explicitly in the correct entry. Naming a variant “final” does not configure a final template.

Related: [LaTeX basics](latex-basics.md), [page layout](page-layout.md), [submission](submission.md).
