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.

I saw the answers to a similar question, but the accepted answer won't take effect in a KOMA-script class.

\usepackage{lastpage}
...
\cfoot{\thepage\ of \pageref{LastPage}}

I am using scrartcl and lastpage. The default page numbering is just the page number itself. I want it to be currentPage / totalPages. How do I modify it?

share|improve this question
add comment

2 Answers

up vote 6 down vote accepted

Remember to specify the page style. This minimal example works, showing "2 of 3" etc. in the page foot:

\documentclass{scrartcl}
\usepackage{lastpage}
\usepackage{scrpage2}
\cfoot{\thepage\ of \pageref{LastPage}}
\pagestyle{scrheadings}
\begin{document}
text
\newpage
text
\newpage
text
\end{document}
share|improve this answer
    
this time there is a page number on the upper right of each page. I only need the bottom "X of Y" numbering. How do I fix this? –  Kit Oct 26 '10 at 15:34
    
found it. I added \ohead{} before \cfoot... –  Kit Oct 26 '10 at 15:36
add comment

Have you tried adding

\usepackage{fancyhdr}

to your preamble?

Then, always in the preamble:

\pagestyle{fancy}
\lhead{}
\chead{}
\rhead{}
\lfoot{}
\cfoot{\thepage\ of \pageref{LastPage}} % depending on where you want the page numbers
\rfoot{}
share|improve this answer
add comment

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.