LyX[Lyx 1.6.3] Numbering pages

Information and discussion about LyX, a WYSIWYM editor, available for Linux, Windows and Mac OS X systems.
Post Reply
miro99
Posts: 2
Joined: Mon Aug 24, 2009 5:35 pm

[Lyx 1.6.3] Numbering pages

Post by miro99 »

Hi,
first of all I apologize for my english... :D
I'm writing my thesis using Lyx 1.6.3 and I am occurred in a great problem: Lyx starts numbering the document from the first page while I need the first numbered page is the Introduction (actually page 5).
How I could resolve this? I read something about the use of \pagestyle but I cannot modify the source code from Lyx. Is there a folder where I can find a .txt version of my document that I could modify?

Thank you so much for the support

Alessandro

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

[Lyx 1.6.3] Numbering pages

Post by meho_r »

Simply put in the Preamble of you document (Document > Settings > LaTeX Preamble) the following code:

Code: Select all

\addtocounter{page}{4}
Change the number according to your needs.

BTW, you may enter LaTeX commands in your document using ERT box (Ctrl+L). So, the alternative way of changing page numbers is entering above command in ERT box on the page from which you want numbers increased. This is useful if you use \frontmatter and \mainmatter in your documents.

The above command adds specified number to the existing counter, so the result of the command is: 1+4=5. You may use another command instead, \setcounter to set the current page number to a desired value, e.g.

Code: Select all

\setcounter{page}{5}
This will give the same result as the first command. You may use this command in the Preamble or in ERT box directly inside your document, as you like.
miro99
Posts: 2
Joined: Mon Aug 24, 2009 5:35 pm

Re: [Lyx 1.6.3] Numbering pages

Post by miro99 »

Hi meho_r,
thank you so much for your help. I finally resolve my numerbering pages problem! :D
amplifier
Posts: 10
Joined: Fri Mar 11, 2011 1:51 pm

[Lyx 1.6.3] Numbering pages

Post by amplifier »

Hi there,

I searched the forum to fix a problem I have with the page numbering in Lyx, and found this thread. But when I follow the instructions, I get another result.
miro99 wrote: Lyx starts numbering the document from the first page while I need the first numbered page is the Introduction (actually page 5).
to fix that meho_r recommended:
meho_r wrote:Simply put in the Preamble of you document (Document > Settings > LaTeX Preamble) the following code:

Code: Select all

    \addtocounter{page}{4}
Change the number according to your needs.
When I do that, numbering starts on the very first page with the pagenumber 5. Is there a way to make Lyx hide the first, let's say 4 pagenumbers?

Thanks a lot!
Amp
User avatar
Stefan Kottwitz
Site Admin
Posts: 10324
Joined: Mon Mar 10, 2008 9:44 pm

[Lyx 1.6.3] Numbering pages

Post by Stefan Kottwitz »

Hi Amp,

it would be better to begin a new topic instead of continuing an old one. A link to the ealier question would be good then.

You can suppress page numbering by choosing another page style for those first pages, or use the command

Code: Select all

\pagenumbering{gobble}
at the beginning and

Code: Select all

\pagenumbering{arabic}
later on. Afterwards you could modify the page counter as above.

Stefan
LaTeX.org admin
Post Reply