I would like to place the page number in the top right corner of my page (inside the margin). My margins are 1 inch from the top and 1 inch from the right. I can put page numbers in the upper right corner by using a horizontal fill, but I would like the page number to be as close to my margin as possible. When I print out the document it is over 1.5 inches from the top of the page. How can I make the number appear higher in the page?

MWE My source code for the following LyX screen and pdf is

\section{\noindent {\normalsize{INTRODUCTION}}}

My LyX screen is enter image description here

And my PDF is enter image description here

  • 1
    You might want to have a look at \frontmatter, \mainmatter, and friends. – Sean Allred Apr 29 '14 at 3:55
  • Pages that should have their numbers not typed (title, copyright, dedication?) would generally use \thispagestyle{empty} to remove the numbers. They would still increment the count, however, which seems to be as desired. – cslstr Apr 29 '14 at 4:34
  • @cslstr if I insert that in my Latex preamble, how will it know which page numbers to hide? – The Substitute Apr 29 '14 at 4:47
  • 1
    @TheSubstitute: Insert the command at the places of the corresponding pages, not in the preamble. You have to do this multiple times, at all positions/pages you don't want to have visually numbered. – user31729 Apr 29 '14 at 4:55
  • thank you, this takes care of the pages that I don't want to have visible numbers. – The Substitute Apr 29 '14 at 5:05

In Page Margins set margins to 1 in. (you may need to adjust to get it exactly right). In Page Layout set headings style to default. In Preamble


Add a thin space and a vertical space if you want the introduction to be a little down.

Page numbers should appear at right edge, starting at 1 on first page.

After that, I believe you can put a


or otherwise, to remove the page numbers...

% Preview source code

%% LyX 2.0.8 created this file.  For more info, see http://www.lyx.org/.
%% Do not edit unless you really know what you are doing.

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% User specified LaTeX commands.


~ \vspace{3in}




Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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