## LaTeX forum ⇒ Document Classes ⇒ How to put date on top-left under letter class? Topic is solved

Information and discussion about specific document classes and how to create your own document classes.
Cham
Posts: 930
Joined: Sat Apr 02, 2011 4:06 pm

### How to put date on top-left under letter class?

I'm having a problem with the date position under the letter class. Here's a MWE code to show the problem:
\documentclass[11pt,letterpaper]{letter}\usepackage[T1]{fontenc}\usepackage[letterpaper,top=1in]{geometry}\usepackage{charter} \begin{document} \date{\begin{flushleft}\today\end{flushleft}} % Use todays date and left-align it \begin{letter}{To someone} \begin{center}	\Large\textsc{sue letter}\end{center} \signature{Bob Doe} \opening{Hello.}Blabla bla bla.\closing{Yours,} \end{letter} \end{document}

Here's a preview and what I need to do (in red) :
letter.jpg (18.58 KiB) Viewed 1967 times

So how can I move the date in the upper-left corner, while moving the title under the date? This should be very easy but I don't get it.

Cham
Posts: 930
Joined: Sat Apr 02, 2011 4:06 pm
I solved my issue by using this code, but it seems odd to me. Is there a better solution for this?

\documentclass[11pt,letterpaper]{letter}\usepackage[T1]{fontenc}\usepackage[letterpaper,top=1in]{geometry}\usepackage{charter} \begin{document} \date{\begin{flushleft}\today\end{flushleft}}\signature{Bob Doe} \begin{letter}{{\hfill\Large\textsc{sue letter}\hfill} \bigskip \\ \textbf{Someone} \\ Address} \opening{Hello.} Blabla bla bla. \closing{Yours,} \end{letter} \end{document}

If I remove the \bigskip command, the "sue letter" title is flushed to the right. What am I doing wrong here?

Stefan Kottwitz
Posts: 9521
Joined: Mon Mar 10, 2008 9:44 pm
Hi Cham,

good that you found a way! Well, one can use such a workaround, or patch letter class macros. It's probably not worth the effort if there's a simple way.

To enforce the \hfill that may not be done at the end of a line, you can use \hspace*{\fill}:

\begin{letter}{{\hfill\Large\textsc{sue letter}\hspace*{\fill}}

Stefan