I am numbering my index pages with roman numerals, but I'm writing the document using restructuredText that is parsed into LaTeX.
I have a preamble that contains all the necessary setup, but after the table of contents, it resets the page numbering back to 1, so \listoftables and \listoffigures show up at page (i) and (ii) respectively instead of (iii) and (iv) like they should. Since my table of contents could change, I don't want to use fixed page numbering.
There is a question that suggests rewriting \tableofcontents to storing the page number, but I have tried that and it didn't work. Since I am new here, I cannot comment on that one.
I would be willing to accept that I cannot fix this as long as I could disable page numbering for the TOC.
The following are the used classes and packages from the generated output:
% Generated by Sphinx.
\def\sphinxdocclass{report}
\documentclass[letterpaper,10pt, openany, oneside, english]{sphinxmanual}
\usepackage[utf8]{inputenc}
\DeclareUnicodeCharacter{00A0}{\nobreakspace}
\usepackage{cmap}
\usepackage[T1]{fontenc}
\usepackage{babel}
\usepackage{times}
\usepackage[Sonny]{fncychap}
\usepackage{longtable}
\usepackage{sphinx}
\usepackage{multirow}
% Include packages
\usepackage{lastpage}
\usepackage[table]{xcolor}
\usepackage{csvsimple}
\usepackage[hypcap]{caption}
\usepackage{booktabs}
\usepackage{wrapfig}
\usepackage{hyperref}
\usepackage[nottoc]{tocbibind}
\hypersetup{colorlinks,%
citecolor=black,%
filecolor=black,%
linkcolor=black,%
urlcolor=blue,%
pdftex}
\definecolor{lightgray}{gray}{0.9}
\let\oldtabular\tabular
\let\endoldtabular\endtabular
Since I have no control over when the table of contents will be called on, I also redefined the table of contents like this:
% Redefine table of contents to include the tables and figures
\newcounter{mypageno}
\let\oldtableofcontents\tableofcontents
\renewcommand{\tableofcontents}{%
\oldtableofcontents%
\cleardoublepage%
\setcounter{mypageno}{\value{page}}%
\pagenumbering{roman}%
\setcounter{page}{\value{mypageno}}%
\listoftables%
\listoffigures%
\cleardoublepage%
\pagenumbering{arabic}%
}
\pagenumbering{..}
resets the page counter to 1, so don't use it if you don't want it reset. Instead just change the numbering representation using something like\renewcommand{\thepage}{\roman{page}}
.\listoftables
starts on (i) again. Does one of the packages above redefine the\tableofcontents
in such a way to force a\pagenumbering{arabic}
after the TOC?