Document Classesletter.cls

Information and discussion about specific document classes and how to create your own document classes.
Post Reply
Richard Davies
Posts: 2
Joined: Wed Apr 20, 2022 10:19 am

letter.cls

Post by Richard Davies »

I'm trying to write a simple letter and get errors. Minimal example and errors shown. Same errors if compiling with pdflatex, lualatex or xelatex.

Code: Select all

\documentclass[11pt,a4paper]{letter}
\begin{document}
\begin{letter}
  \opening{Dear Sirs,\\}
  The cat sat on the mat.
\end{letter}
\end{document}
Error message
This is pdfTeX, Version 3.14159265-2.6-1.40.21 (TeX Live 2020/Debian) (preloaded format=pdflatex)
restricted \write18 enabled.
entering extended mode
(./problemletter.tex
LaTeX2e <2020-10-01> patch level 4
L3 programming layer <2021-01-09> xparse <2020-03-03>
(/usr/share/texlive/texmf-dist/tex/latex/base/letter.cls
Document Class: letter 2020/03/11 v1.3b Standard LaTeX document class
(/usr/share/texlive/texmf-dist/tex/latex/base/size11.clo))
(/usr/share/texlive/texmf-dist/tex/latex/l3backend/l3backend-pdftex.def)
(./problemletter.aux) [1{/var/lib/texmf/fonts/map/pdftex/updmap/pdftex.map}]
! Incomplete \iffalse; all text was ignored after line 7.
<inserted text>
\fi
l.7 \end{letter}

?
Am I doing something stupid or is there something wrong with my latex?

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org
LaTeX Beginner's Guide LaTeX Cookbook LaTeX TikZ graphics TikZによるLaTeXグラフィックス
rais
Posts: 419
Joined: Sun Nov 16, 2014 8:51 pm

letter.cls

Post by rais »

The {letter} environment requires an argument which you have omitted.
\begin{letter}{recipient of this letter}

KR
Rainer
Richard Davies
Posts: 2
Joined: Wed Apr 20, 2022 10:19 am

letter.cls

Post by Richard Davies »

Thank you just me being an idiot.
User avatar
Stefan Kottwitz
Site Admin
Posts: 10290
Joined: Mon Mar 10, 2008 9:44 pm

letter.cls

Post by Stefan Kottwitz »

Hi Richard,

welcome to the forum!

No worries, small code mistakes happen easily to all of us and it's good that solution and explanation was easy. :-)

Stefan
LaTeX.org admin
Post Reply