Friday, October 05, 2007

Creat an empty page in Latex

It is necessary to use a trick when creating an empty page in Latex. The following code does the job:

\newpage

\thispagestyle{empty}
\mbox{}

The major part is \mbox{}, which ensures the existence of an empty page.

The usage of \thispagestyle is
\thispagestyle{option}. The option can be:

  • plain - Just a plain page number.
  • empty - Produces empty heads and feet - no page numbers.
  • headings - Puts running headings on each page. The document style specifies what goes in the headings.
  • myheadings - You specify what is to go in the heading with the \markboth or the \markright commands.


The usage of \thispagestyle comes from Hypertext Help with LaTeX.

48 comments:

  1. Thanks for the tip, I needed exactly that! :)

    ReplyDelete
  2. Great tip, thank you! I bloody needed it... let me add, if you want the pagenumber to be on the empty page use plain instead of empty in the pagestyle. And if you don't do copy and past, check that you write THISpagestyle, or it will be a pain as all your pagenumbers will disappear :D

    ReplyDelete
  3. Thx a lot. Great help!!

    ReplyDelete
  4. Many Many Thanks..............

    And I am also thankful to "Anonymous" for the 'plain' tip ,,,,,

    ReplyDelete
  5. Great tip... Thanks....

    ReplyDelete
  6. Yes! thanks, heps a lot!

    ReplyDelete
  7. Great tips !!

    ReplyDelete
  8. Thank you from Italy

    ReplyDelete
  9. In my thesis work using latex I am getting a blank at the end of the chapter. Kindly help how to remove it.

    ReplyDelete
  10. As far as I know, if doubleside option is enabled, a new chapter in latex will always start from odd page. The even page without any concent at the end of each chapter will be purposely left emtpy.

    ReplyDelete
  11. Thanks a lot!

    ReplyDelete
  12. really helpful! finally solved my problem - thanks so much :)

    ReplyDelete
  13. Thanks a lot. Problem solved.

    ReplyDelete
  14. this is 1st website i got in google..it worked well for thanks!

    ReplyDelete
  15. Thank! Your tip has been very useful for me!

    ReplyDelete
  16. I had to add

    \pagebreak

    at the end to make it work, but this really helped.

    Thanks!

    ReplyDelete
    Replies
    1. Same for me, thanks for all your help

      Delete
    2. Thanks for your suggestion!

      Delete
  17. any idea why those lines would cause double empty pages?

    ReplyDelete
  18. Thx! That saved ma a lot of headache and cursing ;)

    ReplyDelete
  19. this command cause double empty pages, then for deleting one of them add this code like this:

    \newpage
    \thispagestyle{empty}
    \mbox{}
    \let\cleardoublepage\clearpage

    and will appear one page

    best regards

    ReplyDelete
  20. Thank you God for creating the geniuses who created LATEX who encourages other geniuses in providing useful tips!!!
    Thanks to all. Even the comments were helpful.

    ReplyDelete
  21. Didn't face the double blank page problem...
    Worked smoooth! Thanks a lot...

    ReplyDelete
  22. Finally something that works!!!
    Thanks! I've been trying to do this for many hours.

    ReplyDelete
  23. Thank you!
    I used:
    \clearpage
    \thispagestyle{plain}
    \mbox{}
    \clearpage

    I found clear page did not adjust the previous page text to stretch to the bottom.
    So even page is kept empty but heading and number page stayed.

    ReplyDelete
  24. Very useful, it is actually stange the lack of information about this kind of tricks in other tutorials...
    Thanks!

    ReplyDelete
  25. I need a command to leave equal space at both the margins, means that now the text is randomly distributed but i want it to have equal distance from both the margins throughout the document. Thanks.

    ReplyDelete
  26. \newpage
    \thispagestyle{empty}
    \mbox{}
    \let\cleardoublepage\clearpage
    \hfill

    \vfill

    \noindent\myName: \textit{\myTitle,} \mySubtitle, %\myDegree,
    \textcopyright\hspace{0.5 mm} October 2011

    Why i am unable to remove the extra page in this case even i have used the trick that you have mentioned but still not working, is it in the wring place.

    ReplyDelete
  27. Thanks mate, you saved me :P

    ReplyDelete
  28. Thanks a lot .. saved me a lot of time ..

    short and sweet ..

    ReplyDelete
  29. great post, exactly what i needed..

    ReplyDelete
  30. THANK YOU SO MUCH. I've spent more time than I care to admit trying to figure this out...

    ReplyDelete
  31. Thank you very much, it works great!!!

    ReplyDelete
  32. Thanks. This is really helpful :)

    ReplyDelete
  33. Consider using \null instead of \thispagestyle{empty}, in combination with \pagenumbering{gobble} to turn off page numbering and \pagenumbering{arabic} to turn it back on

    ReplyDelete
  34. or just use
    \newpage
    \thispagestyle{empty}
    ~

    ReplyDelete
  35. Many thanks...!!!

    ReplyDelete
  36. Thank you! Worked very well.

    ReplyDelete
  37. fantastic dear friend..
    It helped me a lot..
    Thanks for sharing

    ReplyDelete
  38. Generating an empty page in LaTeX requires a simple command: "\newpage" or "\clearpage." Having Bad Games This concise feature demonstrates LaTeX's meticulous control over document structure and formatting, a cornerstone of professional typesetting.

    ReplyDelete