## LaTeX forum ⇒ Letters ⇒ Adding a subject and aligning the closing with the sender's address

cheesesofnazareth
Posts: 8
Joined: Mon May 10, 2021 2:11 pm

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

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}

LaTeXguide.org • LaTeX-Cookbook.net

Kreuz Elf
Posts: 22
Joined: Thu Mar 04, 2021 7:33 pm

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

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}