Configure Texmaker". Thanks in I have a problem when I make bibliography. the error message is that "Empty bibliography on input line 50" \documentclass[12pt,twoside]{report}. It is "\newpage" at the first line of this fragment that adds a redundant blank page after the part header page. So you must redefine the command \@endpart. Add the following snippet to the beggining of your tex file. \makeatletter \ renewcommand\@endpart{\vfil \if@twoside \null \thispagestyle{empty}%. Sep 16, 2013 Fancyhdr allows the definition of alternative page styles through the \ fancypagestyle command. To keep things simple, I defined a new page style appendix that has an empty header. The page style for chapter title pages is set by redefining the chapter command, adding \thispagestyle{pagestyle}.">
Skip to content

Thispagestyle Empty Bibliography Meaning

Categories: FAQ, Numbering, Pagination

<< | Page list | >>

Frequently Asked Question about Numbering, Pagination etc.

Table of contents

  1. Page numbers (Pagination)
    1. 1.1  How can I remove the page number from the first page?
    2. 1.2  How can I start page numbering on a different page?
    3. 1.3  How can I have roman pagination (i, ii, iii...) for the first part of my document?
    4. 1.4  How do I get headers on my index pages?
    5. 1.5  How can I get an empty pagestyle (no pagination) on a page where I have a big float?
  2. Section numbering
    1. 2.1  How can I set the starting number for a chapter or a section?
    2. 2.2  How can I remove section and subsection numbering in the output?
    3. 2.3  How can I remove section and subsection numbering in the output, but still have the sections appear in the table of contents?
    4. 2.4  How do I number sections by parts?
    5. 2.5  I'm only using sections, but they show as 0.1, 0.2 etc. How can I fix this?
    6. 2.6  How can I have alphabetic section labels (a, b, c..) instead of 1, 2, 3?
    7. 2.7  How can I start an appendix (section numbering A, B instead of 10, 11 ...)?
  3. List numbering
    1. 3.1  How do I get a formatted list which starts with e.g. 1. a)?
    2. 3.2  How can I set the starting number of an enumerated list?
    3. 3.3  How can I interrupt an enumerated list and resume the number later?
    4. 3.4  How can I change the type of counter used in an enumerated list?
    5. 3.5  How do I get to number all examples in a text sequentially?
  4. Equation numbering
    1. 4.1  How do I number equations by section?
    2. 4.2  How do I number equations globally?
    3. 4.3  Where can I get more information about equation numbering?
  5. Figure and Table numbering
    1. 5.1  How do I number figures or tables by section?
    2. 5.2  Why do longtables increment the table counter? How can I avoid that?
  6. Footnote numbering
    1. 6.1  How do I number footnotes by section?
    2. 6.2  How do I change to footnote numbers to symbols (star, dagger, etc.)?
  7. Other numbering
    1. 7.1  How do I get line numbers?

§ Page numbers (Pagination)

§ How can I remove the page number from the first page?

§ How can I start page numbering on a different page?

Suppose you want to have some pages without pagination (e.g. title pages, TOC) and want to start with page "1" afterwards. Just suppress, if necessary, the pagination on those pages with \thispagestyle{empty} (if it's only one page) or \pagestyle{empty} (if it concerns multiple pages). Then, start the pagination with \setcounter{page}{1} on the desired page. Note that you might eventually need to reset the pagestyle on that page to get a page number, e.g. by \pagestyle{fancy} or \pagestyle{headings}.

§ How can I have roman pagination (i, ii, iii...) for the first part of my document?

  • If you use a book class, simply insert
    \frontmatter
    at the beginning of the document. This will switch page numbering to roman (i, ii, iii...)
    \mainmatter
    will switch back to arabic (1, 2, ...) and start from "1".
  • With report or article classes, insert at the beginning (in the LaTeX preamble):
    \pagenumbering{roman}
    and then, where you want to switch back (somewhere on the page in the normal text), in ERT (Ctrl-L):
    \pagenumbering{arabic}
    \setcounter{page}{1}

§ How do I get headers on my index pages?

printindex sets the pagestyle to plain, to counter this, we can redefine this pagestyle. If we use the fancy pagestyle throughout our document we can add the following to the preamble:
\renewcommand{\ps@plain}{\pagestyle{fancy}}

§ How can I get an empty pagestyle (no pagination) on a page where I have a big float?

See unfloating figure on empty page

§ Section numbering

§ How can I set the starting number for a chapter or a section?

Add \setcounter{chapter}{3} or \setcounter{section}{3} to the preamble to set the number to 3 for chapter or section respectively.

§ How can I remove section and subsection numbering in the output?

Use the starred versions of the environments, i.e. Chapter*, Section*, Subsection*. Note: The subdivisions will not appear in the table of contents with this solution.

§ How can I remove section and subsection numbering in the output, but still have the sections appear in the table of contents?

If you want to get rid of the numbering completely, go to Document→Settings→Numbering & TOC and drag the slider "Numbering" to the left.

If you just want to insert some unnumbered sections next to numbered sections to the TOC, either:

  • use a class that supports unnumbered TOCed sections, such as KOMA-Script (Addchap, Addsec), or
  • use a Section* and add below in ERT \addcontentsline{toc}{section}{Section Name}

also cf. this FAQ entry

§ How do I number sections by parts?

Add the following lines to your LaTeX preamble:

\makeatletter
\@addtoreset{section}{part}
\makeatother

§ I'm only using sections, but they show as 0.1, 0.2 etc. How can I fix this?

Use a class that has sections as the highest element (i.e., article, not report or book).

Or, if you want something like 1.1, 1.2, set the counter for chapters. For instance, add this in ERT:

\setcounter{chapter}{1}


to the beginning of your document. (The preamble ought to work too).

§ How can I have alphabetic section labels (a, b, c..) instead of 1, 2, 3?

  • Add the following to the preamble:
    \def\thesection{\alph{section}}

See http://help-csli.stanford.edu/tex/latex-sections.shtml(approve sites) for more numbering options.

§ How can I start an appendix (section numbering A, B instead of 10, 11 ...)?

Simple, put the cursor on the first chapter/section you want to be an appendix and select: Document→Start Appendix Here.

§ List numbering

§ How do I get a formatted list which starts with e.g. 1. a)?

If you want a list which looks like

1. a) First alternative b) Second alternative c) Third alternative

then try the following

1. {} a) First alternative b) Second alternative c) Third

where {} is in ERT (i.e. a placeholder not generating output. Specifically, set the style to "enumerate", enter the brackets in ERT, change the environment depth, and add the three elements. LyX will auto-label the entries.

§ How can I set the starting number of an enumerated list?

In order to make an enumerated list start with e.g. 5, you can add this ERT as the first thing on the line:

[5.]\setcounter{enumi}{5}

also see the example, uploads:/Examples/Setting_starting_number_of_enumerated_list.lyx

Or use the Enumerate-Resume style provided by the Enumitem LyX module.

§ How can I interrupt an enumerated list and resume the number later?

For a quick-and-dirty solution (manual setting of the starting number) see the previous question.

More elegant ways that adjust the starting number automatically are provided by the following packages that extend the enumerate environment:

The Enumitem LyX module provides a pretty comfortable way to use one of those, namely .

Please refer to the packages' documentation for details.

Another solution would be to move away from and use packages such as or . These packages allow you to have sequential numbering throughout the text without resorting to ERT, and you can set up LyX to include them in your default document class. Covington is described here.

§ How can I change the type of counter used in an enumerated list?

To change all enumerated lists from (1), (2), (3),... to (a), (b), (c), write

\renewcommand\theenumi{(\alph{enumi})}\renewcommand\labelenumi{\theenumi}

in the preamble.

To only change this for a single list, write instead

\bgroup\renewcommand\theenumi{(\alph{enumi})}\renewcommand\labelenumi{\theenumi}

as ERT just in front of the list and write

\egroup{}

as ERT just after the list or use the optional arguments for lists provided with the Enumitem module.

If you need your list to follow the numbering of your sections/subsections then you could use the Enumitem module and an optional argument similar to the following:

label=\thesection.\arabic*label=\thesubsection.\arabic*

In the above, the first would insert 2.1, 2.2, 2.3, etc. (for a list in Section 2), while the second would insert 2.1.1, 2.1.2, 2.1.3, etc. (for a list in Section 2 Subsection 1). See the Enumitem example shipped with LyX to see how to properly specify such an argument to the start of a list.

§ How do I get to number all examples in a text sequentially?

You can use several packages (such as ). See this page for more.

§ Equation numbering

§ How do I number equations by section?

In recent LyX versions: Go to Document→Settings→Modules and add the module "Number equations by section".

In older LyX versions, add the following line to your LaTeX preamble:

\numberwithin{equation}{section}

(or put subsection etc. in place of section if that's what you want)

This second version requires amsmath, so make sure that "Use AMS math package" is selected in Document→Settings→Math Options.

§ How do I number equations globally?

Try the Covington package, or define your own counter in LaTeX.

§ Where can I get more information about equation numbering?

§ Figure and Table numbering

§ How do I number figures or tables by section?

In recent LyX versions: Go to Document→Settings→Modules and add the module "Number figures by section" or "Number tables by section", respectively.

In older LyX versions, add the following line to your LaTeX preamble:

\numberwithin{figure}{section}

or

\numberwithin{figure}{section}

(or put subsection etc. in place of section if that's what you want)

This second version requires amsmath, so make sure that "Use AMS math package" is selected in Document→Settings→Math Options.

§ Why do longtables increment the table counter? How can I avoid that?

See this FAQ.

§ Footnote numbering

§ How do I number footnotes by section?

Add the following lines to your LaTeX preamble:

\makeatletter
\@addtoreset{footnote}{section}
\makeatother

§ How do I change to footnote numbers to symbols (star, dagger, etc.)?

Add \renewcommand{\thefootnote}{\fnsymbol{footnote}} to your LaTeX preamble.

§ Other numbering

§ How do I get line numbers?

Load the lineno package in the preamble with the following command to get line numbers to the left of every fifth line:
\usepackage[left,modulo]{lineno}

To get a line number next to each and every line leave out the arguments in the preamble:
\usepackage{lineno}

Warning: At this point you will not see any line numbering in the text. You have to proceed with one of the two following directives to actually place any line numbers in the document.

1. One way to place line numbers throughout the entire document is to include this in the preamble after loading the package:
\linenumbers

2. Another way, which can restrict line numbering to a subset of the document is to place the text you want numbered between the following commands in ERT:
\begin{linenumbers}
...
\end{linenumbers}
There are many options to the lineno package, documented in this PDF on CTAN.

FAQNumberingPagination

<< | FAQ.PageList | >>

LaTeX has some predetermined styles that change the way the header and the footer are displayed. The footer and the header can also be customized to fit any particular layout. This article explains how.

[edit]Introduction

The information displayed in the footer and the header of a document depends on the page style currently active, these page styles are more notorious in the book document class:

\documentclass[a4paper,12pt,twoside]{book}\usepackage[english]{babel}\usepackage[utf8]{inputenc}   \pagestyle{headings}   \begin{document}\chapter{Sample Chapter}\section{New section}   Hello, here is some text without a meaning. This text should show what aprinted text will look like at this place. If you read this text, you will get noinformation. Really? Is there no information? Is there a diㄦence betweenthis text and some nonsense like \Huardest gefburn"? Kjift { not at all!...   \end{document}

The command sets the page style called headings to the current document. You can see more page styles in the next section

  Open an example in ShareLaTeX

[edit]Standard page styles

The standard page styles are invoked in LaTeX by means of the command:

The myheadings pagestyle displays the page number on top of the page in the outer corner.

There are other three page styles:

  • : Both the header and footer are cleared (blank) in this page style.
  • : This is the default style. The header is empty and the footer contains page numbers in the centre.
  • : As shown in the introduction,The footer is empty in this page style. The header contains the page number on right side (on even pages) or on left side (on odd pages) along with other user-supplied information; there is an exception for the first page of each chapter, where the footer contains centred page number while the header is blank.

  Open an example in ShareLaTeX

[edit]Setting page style for current page only

Sometimes is convenient to specify the page style only for the current page. For instance, to leave a intentionally blank page or to remove the header and footer from the current chapter page:

\chapter{Sample Chapter}\thispagestyle{empty}   Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim }ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit es... \end{document}

Of course, you can replace empty for any of the styles mentioned in the previous section

  Open an example in ShareLaTeX

[edit]

Styles can be modified beyond the standard layouts by means of fancyhdr. Below is an example.

\documentclass{article}\usepackage[english]{babel}\usepackage[utf8]{inputenc}\usepackage{fancyhdr}   \pagestyle{fancy}\fancyhf{}\rhead{Share\LaTeX}\lhead{Guides and tutorials}\rfoot{Page \thepage}   \begin{document}   \section{First Section}   Hello, here is some text without a meaning. This text should show what aprinted text will look like at this place. If you read this text, you will get noinformation. Really? Is there no information? Is there a diㄦence between this ...   \end{document}

To customize the footer and header in your document first import the package fancyhdr with

After that, the "fancy" style is set by . The command clears the header and footer, otherwise the elements of the default "plain" page style will appear.

Below, a description of the rest of the commands and a few more whose usage is similar.

Prints the text included inside the braces on the right side of the header.
Prints the text set inside the braces on the left side of the header.
Similar to the previous commands, in this case the text is centred on the header.
Prints the word "Page" and next the page number which is automatically set by on the right side of the footer. See the reference guide for a list of commands that automatically generate content (Section numbers, chapters and so on).
This prints the parameter passed inside the braces on the left side of the footer.
Similar to the previous two commands, prints its parameter on the centre of the footer.

  Open an example of the fancyhdr package in ShareLaTeX

[edit]

If your document is double-sided, for example a book, and you need to customize the header and the footer, the recommended commands in this case are and with several selectors passed as parameters. Let's see:

\documentclass[a4paper,12pt,twoside]{book}\usepackage[utf8]{inputenc}\usepackage[english]{babel}\usepackage{fancyhdr}   \pagestyle{fancy}\fancyhf{}\fancyhead[LE,RO]{Share\LaTeX}\fancyhead[RE,LO]{Guides and tutorials}\fancyfoot[CE,CO]{\leftmark}\fancyfoot[LE,RO]{\thepage}     \begin{document}   \chapter{Using different page styles}   Lorem ipsum dolor sit amet, consectetur adipiscing ...

The selectors that can be passed, inside brackets, to the commands and are:

  • for even page
  • for odd page
  • for left side
  • for centered
  • for right side

For instance, will print the text "ShareLaTeX" on the Left side of the header for Even pages, and the Right side for Odd pages.

For more information on the command and used in the previous example see the reference guide.

  Open an example of the fancyhdr package in ShareLaTeX

[edit]Decorative lines on header and footer

When you are using fancyhdr in your document, there are two decorative lines on both the header and the footer, the latter has 0pt thickness and hence is not visible. It's easy to change that:

\documentclass[a4paper,12pt,twoside]{book}\usepackage[utf8]{inputenc}\usepackage[english]{babel}\usepackage{fancyhdr}   \pagestyle{fancy}\fancyhf{}\fancyhead[LE,RO]{Share\LaTeX}\fancyhead[RE,LO]{Guides and tutorials}\fancyfoot[CE,CO]{\leftmark}\fancyfoot[LE,RO]{\thepage}   \renewcommand{\headrulewidth}{2pt}\renewcommand{\footrulewidth}{1pt}   \begin{document}   \chapter{Using different page styles}   Lorem ipsum dolor sit amet, consectetur adipiscing ...

There are two additional lines in this example:

This sets the header line thickness to 2pt.
Sets the footer line thickness to 1pt.

  Open an example of the fancyhdr package in ShareLaTeX

[edit]Reference guide

The following commands can be used in the headers and footers to add custom information

  • adds number of the current page.
  • adds number of the current chapter.
  • adds number of the current section.
  • adds the word "Chapter" in English or its equivalent in the current language.
  • adds name and number of the current top-level structure (for example, Chapter for reports and books classes; Section for articles ) in uppercase letters.
  • adds name and number of the current next to top-level structure (Section for reports and books; Subsection for articles) in uppercase letters.

[edit]Further reading

For more information see: