LyXRemoving page numbers

Information and discussion about LyX, a WYSIWYM editor, available for Linux, Windows and Mac OS X systems.
Post Reply
adamski
Posts: 1
Joined: Sat Nov 27, 2010 3:46 pm

Removing page numbers

Post by adamski »

Apologies for the silly question. I'm new to using LyX and I'm struggling.

How do I remove page numbers from a document? I have tried using \thispagestyle{empty} but that also removes the header from my document.

Thanks.

Recommended reading 2024:

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

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

And: Currently, Packt sells ebooks for $4.99 each if you buy 5 of their over 1000 ebooks. If you choose only a single one, $9.99. How about combining 3 LaTeX books with Python, gnuplot, mathplotlib, Matlab, ChatGPT or other AI books? Epub and PDF. Bundle (3 books, add more for higher discount): https://packt.link/MDH5p

meho_r
Posts: 823
Joined: Tue Aug 07, 2007 5:28 pm

Removing page numbers

Post by meho_r »

Which document class are you using and which pagestyle? An example .lyx file would be nice too.

Generally, you might try constructing your headers/footers using fancyhdr, something like this (in the preamble):

Code: Select all

\usepackage{fancyhdr}
\fancyhf{}
\fancyhead[LE]{\leftmark}
\fancyhead[RO]{\rightmark}
\renewcommand{\headrulewidth}{0.4pt}
\pagestyle{fancy}
In case that you have problems with the first page of a chapter, try putting into the preamble the following:

Code: Select all

\makeatletter
\let\ps@plain\ps@empty
\makeatother
Of course, you may replace empty with fancy or any other page style you like.
Post Reply