How to Fix Common LaTeX Problems in a CV Draft
At a glance
- 1. Load the package
Add changepage to the preamble before using the adjustwidth environment.
- 2. Check the arguments
Give adjustwidth two lengths: the left adjustment first, then the right adjustment.
- 3. Compile a small example
Test the layout in a minimal document, then transfer the working code to your CV.
- 4. Check the page edges
Make sure any negative adjustments do not push text outside the printable page area.
If your LaTeX CV draft has an error involving adjustwidth, the usual fix is to load the changepage package and provide both required length arguments. The title alone does not identify a particular error, so the examples below cover the common setup and layout problems.
Minimal working example
The adjustwidth environment changes the left and right margins for the material inside it. Its syntax is \begin{adjustwidth}{left adjustment}{right adjustment}. A negative adjustment makes that side wider; a positive adjustment makes it narrower.
Here is a complete document you can compile as a test:
\documentclass[11pt]{article}
\usepackage[margin=1in]{geometry}
\usepackage{changepage}
\begin{document}
\begin{center}
{\LARGE Alex Example}\\
alex@example.com
\end{center}
\section*{Experience}
\begin{adjustwidth}{-0.5in}{-0.5in}
\textbf{Research Assistant} \hfill 2022--2024\\
Department of Biology, Example University\\
Worked on a project and presented the results at a conference.
\end{adjustwidth}
\end{document}
The geometry package sets the document’s overall margins. The changepage package defines adjustwidth. In this example, each side of the experience entry extends half an inch beyond the normal text block. Since the page margins are one inch, the entry still has half an inch of space at either edge.
Common errors and their fixes
“Environment adjustwidth undefined”
Add this line to the preamble, before \begin{document}:
\usepackage{changepage}
The preamble is the part of the file between \documentclass and \begin{document}. If your CV uses a class or template that already loads changepage, loading it again is generally unnecessary; check the template documentation if you are unsure.
Missing or malformed arguments
The environment needs two arguments, even if you want to change only one margin. For example:
\begin{adjustwidth}{0pt}{-0.3in}
This keeps the left edge unchanged and extends the right side by 0.3 inches. Do not omit either set of braces. Use a valid LaTeX length, such as 1cm, 0.25in, or 2em.
A missing \end{adjustwidth}
Every \begin{adjustwidth} must have a matching \end{adjustwidth}. If the end is missing, LaTeX may report an error much later in the file, making the apparent location misleading. Check that the environment closes before the next section or before \end{document}.
Text runs off the page
Negative adjustments expand the text block. Large values can make text, rules, or long unbreakable content cross the page edge. Reduce the adjustments or remove them. If you intend to change the margins throughout the entire CV, use a page-layout setting such as geometry instead of wrapping the whole document in adjustwidth.
When to use adjustwidth in a CV
Use it for a local layout change, such as making one short entry line up with a heading or extending a particular block. For ordinary paragraphs, lists, and section spacing, the CV class or template may already provide suitable commands. Mixing manual margin changes with template-specific layout commands can produce uneven alignment, so keep the adjustment limited to the content that needs it.
If the minimal example compiles but your CV does not, compare the preamble and the lines immediately before the first reported error. For a specific diagnosis, the useful details are the exact error message, the relevant code around it, and the document class or template name. LaTeX often reports where it noticed a problem rather than where the problem began.
References
Spotted an error? Send a correction. Read how we write and check articles in our editorial policy.