CVs and Letters

How to Write a Cover Letter in LaTeX

Write a cover letter in LaTeX that matches your CV header, uses the letter class or a custom layout, stays on one page, and is easy to reuse per job.

On this page
  1. What a cover letter usually contains
  2. Option 1: use the letter class
  3. Option 2: match your CV header
  4. Write the body in LaTeX
  5. Reuse one file for several applications
  6. Check the page count and layout
  7. Common mistakes

A cover letter in LaTeX can use the built-in letter class or a custom layout that matches your CV. The typesetting is the easy part. Most of the effort goes into the writing, so this guide covers the LaTeX setup briefly, then the structure, a reusable file, and the layout checks.

What a cover letter usually contains

  • Your contact details and the date.
  • The recipient: a name and role if you have them, then the employer’s name and address.
  • A greeting.
  • An opening that names the role and says where you saw it advertised.
  • Two or three paragraphs that connect your experience to what the job asks for.
  • A closing line, your name, and an enclosure line if you attach your CV.

Most cover letters aim to fit on one page. A page limit makes you choose your strongest points, and shorter letters are easier to read.

Option 1: use the letter class

The letter class handles the layout, so you write only the content. The job-specific details go in two macros at the top. Changing a macro updates every place it appears in the letter.

The body text below is sample wording. Replace it with your own.

\documentclass[11pt]{letter}
\address{Jane Doe \\ 12 Example Road \\ Leeds LS1 1AA \\ jane@example.com}
\signature{Jane Doe}

\newcommand{\targetrole}{Graduate Software Engineer}
\newcommand{\targetcompany}{Example Ltd}

\begin{document}

\begin{letter}{Hiring Manager \\ \targetcompany \\ 1 Example Street \\ London EC1 1AA}

\opening{Dear Hiring Manager,}

I am applying for the \targetrole{} position at \targetcompany. The role matches the work I have done during my degree, particularly on projects that involved cleaning and testing data.

In my final-year project, I built a small pipeline that loaded weekly sales records and checked them before they reached a report. That work taught me to test code before it reaches users, which is the habit the job advert describes.

Thank you for considering my application. I would welcome the chance to talk about how I could contribute to the team.

\closing{Yours sincerely,}
\encl{CV}

\end{letter}

\end{document}

\newcommand defines a macro. \targetrole{} prints the role, and the empty braces stop LaTeX from swallowing the space after the macro name. Change the two definitions for each application, or keep one file per application so that older letters stay unchanged.

Option 2: match your CV header

If you prefer a custom layout, reuse the header from your CV so the two documents look like a pair. Copy the packages, font size and margins from the CV, then use the same header block:

\begin{center}
  {\LARGE \textbf{Jane Doe}}\\[4pt]
  Leeds, UK \quad|\quad \href{mailto:jane@example.com}{jane@example.com}
\end{center}

This snippet needs hyperref, which the CV’s preamble already loads. Type the date, the recipient and the greeting as plain text below the header, one line each. Keep the font size, margins and name style the same as the CV. A matching header makes the two documents read as one application.

Write the body in LaTeX

  • Paragraphs. Separate them with a blank line. Use \\ only inside address blocks.
  • Paragraph spacing. To add space between paragraphs and drop the indent, load parskip in the preamble with \usepackage{parskip}.
  • Quotation marks. LaTeX prints a straight " as a closing quote. Write ``like this’’ for an opening and closing pair.
  • Dashes. Use -- for ranges, as in 2023–2027, and --- for a dash in a sentence. How to format text in LaTeX covers quotes and dashes in more detail.
  • Bold. Use it sparingly. Bold text is optional in a cover letter, and many readers find it distracting.

Reuse one file for several applications

  • Keep the role and company macros at the top of the file, as in Option 1.
  • Save a copy for each application, such as cover-letter-example-ltd.tex, so you keep the earlier version.
  • Check the spelling of the company, the role and the recipient’s name against the advert. The macros appear in both the recipient block and the opening line, so one typo shows in two places. For the rest of the letter, see spell checking LaTeX documents.

Check the page count and layout

  • Compile the file and check that the letter fits on one page. If it spills over, cut a sentence before reducing the font size or the margins.
  • Use 11pt or 12pt text. The letter class accepts both.
  • Check the PDF rather than the source. Line breaks and spacing are easiest to judge on the page.

Common mistakes

  • Leftover sample text. Read the whole PDF before you send it, and check the body text against the advert.
  • One letter for every employer. The opening and the examples should change to match each role.
  • A missing enclosure line. If you attach your CV, keep the \encl line so the reader knows to look for it.

For how the greeting, closing and signature commands work in more detail, see the guide to writing letters in LaTeX. The header that matches your letter comes from the CV guide.

The complete guide to cvs and letters

How to Make a CV in LaTeX
Read the guide

Keep exploring

Guides from other topics

All topics →