## LaTeX forum ⇒ Text Formatting ⇒ remove page numbers from header Topic is solved

Information and discussion about LaTeX's general text formatting features (e.g. bold, italic, enumerations, ...)
chmst1999
Posts: 4
Joined: Sun Feb 24, 2019 7:54 am

### remove page numbers from header  Topic is solved

I am trying to write a letter with consistent letterhead on every page. I believe I have a working document now (thanks to help from a prior post). However, now the header has the page numbers in the top-left corner. I don't want page numbers. Is there a way to have everything work the way it is but omit the page numbers in the header?

UPDATE: I fixed it with the line below included after the start of the document (in %%%%%)
\pagenumbering{gobble} % stops page numbering throughout document

Now the document and header work as I want without the page numbering!

\documentclass[12pt,headsepline]{letter} % Uses 10pt\usepackage[document]{ragged2e}\usepackage{makecell}\usepackage{graphicx}\usepackage{tabularx}\usepackage{geometry} \geometry{letterpaper,% <------- corrected includehead, includefoot,total={170mm,257mm},headheight=5mm,left=20mm,head=58.99994pt,%<------ added}\usepackage{hyperref}\hypersetup{colorlinks=true,linkcolor=blue,filecolor=magenta,urlcolor=blue} %Header\usepackage{blindtext}\usepackage{marvosym}\usepackage{scrlayer-scrpage}\newcommand*{\email}[1]{\href{mailto:#1}{\nolinkurl{#1}}}%\ihead*{}\chead{\begin{tabularx}{\textwidth}{ccc}&\textsc{\large\bf First A. Last}& \\&\textsc{P.O. BOX 999, Square, ZZ 11223}& \\ \textsc{\Mobilefone \hspace{1mm} (555) 555-5555} & \textsc{\Letter \hspace{1mm} \email{anyone@anywhere.k12.mt.us}} & \ComputerMouse \hspace{1mm} \href{http://goo.gl/AAAA}{http://goo.gl/AAAA}%\hline\end{tabularx}%} \begin{document} \signature{First And Last} % name for signature \longindentation=0pt % needed to get closing flush left\let\raggedleft\raggedright % needed to get date flush left %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \pagenumbering{gobble}   % stops page numbering throughout document%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \begin{letter}{Mr. Whom Ever\\Superintendent\\P.O. Box 8888\\Smallville, YY 76543}\opening{Dear Mr. Ever:}\thispagestyle{scrheadings} \blindtext[10] \vspace{\baselineskip}%\linebreak Doesn't make any sense\closing{Sincerely,} \encl{enclosure 1, enclosure 2}	% Enclosures\end{letter}\end{document}

Stefan Kottwitz
Posts: 9557
Joined: Mon Mar 10, 2008 9:44 pm
Nice that you found it!

Switching off the numbering style (to none) is one way. Another way would be modifying the header entries, with the scrlayer-scrpage tools. For example, \ohead{} woud do it.

I prefer scrlttr2 over the letter class, btw.

Stefan