Document Classesletter | Page Number on first Page

Information and discussion about specific document classes and how to create your own document classes.
Post Reply
ginegine
Posts: 2
Joined: Wed Sep 14, 2011 11:22 am

letter | Page Number on first Page

Post by ginegine »

Hi there! I want to put the page number also on the first page of a letter. This is my working example (if you put instead of the text text text -line a longer text, you can see that I get a nice header & nice footer on the second page.

Code: Select all

\documentclass[]{letter}
\usepackage{fancyhdr}
\usepackage[paper=letterpaper,
            includefoot,
            top=1.1in, bottom = 1in,left=0.8in,right=0.8in,
            ]{geometry}
\begin{document}
\pagestyle{fancyplain} \fancyhf{}
 \lhead{\fancyplain{}{author}} \rhead{\fancyplain{}{\today}}
\rfoot{\fancyplain{}{\thepage}}
\begin{letter}{}
\opening{Letter } text text text
\closing{Yours sincerely,}
\end{letter}
\end{document}
I do not need the header on the first page (even though I would not mind to have it there), but I want to have the page number there. I have found many entries about page numbers in the \documentclass{article}, but all commands I've tried to use in the letter class did not work. (With "it did not work" I mean that there did not appear a page number on the first page.) Here just some examples what I tried to do:

- it does not work to use for the first page a different pagestyle (for example \pagestyle{plain})

- setting a counter does not work (something like this
\pagestyle{headings}
\setcounter{page}{1}
\pagenumbering{arabic} )

- moving the \thepage command around does not work

- I have also (already a bit desperately :oops: ) tried to adapt things like the \title command from the article class, but this didnt work either

I know that the working example I have put up seems as if I would not even need the letter class, but the real letter does require it - or at least I think it requires it (it very much looks like a letter, with adress to the left, right etc.)

If anybody could help me, that would be great :-) thanks

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

User avatar
localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

letter | Page Number on first Page

Post by localghost »

I suggest to take a look at the »scrlttr2« class from the KOMA Script bundle. It is much more customizable, thus much more flexible. Alternatively you may take a look at the isodoc class.


Best regards and welcome to the board
Thorsten
Post Reply