LaTeX forum ⇒ LettersAdding a subject and aligning the closing with the sender's address

Formal letters, Cover letters, Newsletters
cheesesofnazareth
Posts: 8
Joined: Mon May 10, 2021 2:11 pm

Adding a subject and aligning the closing with the sender's address

Postby cheesesofnazareth » Tue Jul 12, 2022 5:20 pm

I am trying to write a formal letter. I am unable to find a suitable solution for the following problems:

1. I want to declare subject in the preamble. When I compile the file, the subject should be inserted between the recipient's address and the opening.

2. I want the closing and signature to align to right of the page, in-line with the sender's address.

The sample code is provided below:

\documentclass[a4paper, 12pt]{letter}
\usepackage{setspace}
\usepackage[sfdefault]{atkinson}
\usepackage{microtype}
\usepackage[parfill]{parskip}
\usepackage[top=1cm]{geometry}
\address{Cream Cheese\\Living here,\\ In a locality,\\ City--90071,\\ Provience.\\newuser@gmail.com}

\signature{Dr. C Cheese}
\date{\today}
\begin{document}
\begin{letter}{Maced Wine,\\ Living there,\\Another locality,\\New Country.\\}
\opening{Dear Ms. M. Wine,}%
\begin{spacing}{1.25}

This is a test document.\par 
How do I go declare a separate subject? I want it placed between the reciepient's address and the opening\par
Also, how do I go about moving the closing declaration closer to the right of the page? I would prefer that it aligned with the address?
\closing{Sincerely,}

\end{spacing}
\end{letter}
\end{document}

Recommended reading 2021:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org
LaTeX Beginner's Guide LaTeX Cookbook LaTeX TikZ graphics
Kreuz Elf
Posts: 22
Joined: Thu Mar 04, 2021 7:33 pm

Adding a subject and aligning the closing with the sender's address

Postby Kreuz Elf » Fri Jul 15, 2022 12:12 am

i'm sry, but it seems this isn't possible in your document class of choice. You could try a different one like for example the newer "scrlttr2". In this you could at least make a subject with:
\setkomavar{subject}{Very important letter}


Return to “Letters”

Who is online

Users browsing this forum: No registered users and 3 guests