Adding page labels

From Scribus Wiki
Jump to: navigation, search
This article is part of the HOWTOs series.
Installation Usage PDF issues Imposition Other

Page labeling is a way of marking an individual pages of your document with custom symbols. These symbols are then used by PDF viewers to navigate through the document.

Currently, scribus does not support page labeling. This article explains how to do it in post-processing.

Adding page labels to a PDF document

This method requires pdflatex with pdfpages and hyperref packages.

Downside

When working with a PDF files, pdflatex always strips all links. If you need to preserve links, you can use the pax package.

Instructions

Create a file named document_with_labels.tex with the following content:

\documentclass[a5paper]{article}
\usepackage{pdfpages}
\usepackage{hyperref}
\begin{document}

  % reset page number to 1 and use the Roman numbering
  \pagenumbering{roman}
  \includepdf[noautoscale=true,pages=1-3]{document.pdf}

  % reset page number to 1 and use the Hindu numbering
  \pagenumbering{arabic}
  % include everything from page 4 on
  \includepdf[pages=4-]{document.pdf}

\end{document}

Note that if you would like to start numbering from different number (e.g. 2), you should replace the \pagenumbering{arabic} command with:

  \setcounter{page}{2}
  % set the macro "thepage" to return the current page number in Hindu numeral system
  \renewcommand{\thepage}{\arabic{page}}

To generate a pdf file, invoke the following command in your terminal:

# write the output to the "document_with_labels.pdf" file
pdflatex "document_with_labels.tex"

Now you can open the document_with_labels.pdf file in a PDF viewer (like Evince or Okular) and see that first 3 pages are labeled with Roman numbers, whereas the remaining ones with the Hindu numbers.

PDF labels as shown in Evince