Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

In LyX, how can I make the pages numbers start from the second page? (i.e., making the first page, which is the table of contents in my case, not having a page number on it)

share|improve this question
    
Welcome to TeX.SX! Usually, we don't put a greeting or a "thank you" in our posts. While this might seem strange at first, it is not a sign of lack of politeness, but rather part of our trying to keep everything very concise. Accepting and upvoting is the preferred way here to say "thank you" to users who helped you. –  e-birk Feb 26 '13 at 22:00
1  
What document class are you using? Do you have any contents before the ToC? What about the ToC length (only 1 page)? –  Werner Feb 26 '13 at 23:58
add comment

1 Answer

up vote 2 down vote accepted

Since LyX (up to recent version 2.0.x) only supports globally changing the pagestyle (in "Document > Setting... > Page Layout") using TeX code/ERT is a workaround.

If the first page should not be numbered then insert the TeX code/ERT

\thispagestyle{empty}

at the beginning of your document (before the table of contents(TOC)). This will clear the page number of that page (see also http://tex.stackexchange.com/a/44153).

(To suppress page numbers for the whole TOC \pagestyle{empty} before TOC and \pagestyle{plain} after TOC can be used. Note that the last \pagestyle command on a page will take precedence over all \pagestyle commands on that page. Depending on your case another \thispagestyle{empty} after \pagestyle{plain} might be used.)

If the page numbers should be reset at some point, you can add the TeX code

\setcounter{page}{1}

on a (new) page / after a page break.

share|improve this answer
    
Is this also valid if you have contents (whatever... perhaps a dedication page) before the ToC? And what if the ToC spans more than one page? Then \pagestyle{plain} will make the entire ToC be void of page numbers. The OP only wants the first ToC page to be without a page number. –  Werner Feb 26 '13 at 22:30
    
@Werner Every page before \pagestyle{empty} will have a page number. As far as I know, the last \pagestyle on a page will take precedence over all \pagestyle commands on that page. –  e-birk Feb 26 '13 at 22:40
    
Yes, the last one will prevail. But since you're placing \pagestyle{empty} before the ToC, that may fall on the last page before the ToC is set. –  Werner Feb 26 '13 at 22:42
    
What is “ERT”? Is this a LyX special? –  Speravir Feb 27 '13 at 3:45
    
@Speravir yes, it is a way to insert LaTeX code directly. –  scottkosty Feb 27 '13 at 5:10
show 3 more comments

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.