1

I am interested in using Roman numerals for the table numbers in a report I am creating, however have run into an issue as I am using the report document class. MWE:

\documentclass{report}
\renewcommand{\thetable}{\Roman{table}}

\begin{document}

\listoftables
\newpage

\chapter{Chapter 1}
\begin{table}[htb]
    \centering
    \caption{This table is captioned with roman numerals, and is table number 1 in chapter 1} %This is Table 1.1
    \label{tbl:ch1t1}
\end{table}

\chapter{Chapter 2}
\begin{table}[htb]
    \centering
    \caption{This table is captioned with roman numerals, and is table number 1 in chapter 2} %so this is Table 2.1
    \label{tbl:ch2t1}
\end{table}
\end{document}

Previously, my table numbering convention (by the default that LaTeX uses) was that Tables 1,2,3... in chapter 1 would have table numbers 1.1, 1.2, 1.3,...

Tables in chapter 2 would have table numbers 2.1, 2.2, 2.3,...

However, with the \renewcommand{\thetable}{\Roman{table}} line, it gives the tables in sections 1 and 2 the same table number - I (because it resets the counter in between chapters). How can I generate a continuous set of table numbers so that the second table in the MWE has a table number of II?

jmd17
  • 63
  • You have to remove the counter from the reset list of chapter, i.e. \usepackage{chngcntr} and \counterwithout{table}{chapter} in addition to your \renewcommand{\thetable}{...} –  Apr 20 '17 at 06:03
  • I think it's worth leaving the first comment up in case someone wants to specify table numbers by chapter: using \renewcommand{\thetable}{\Roman{chapter}.\Roman{table}} gives the table numbers as I.I and II.I for my above MWE. – jmd17 Apr 20 '17 at 06:07
  • Is your chapter counter also formated with \Roman? If not, it is quite confusing, if the chapter numbers are arabic, but tables have III.LX ;-) –  Apr 20 '17 at 06:09
  • It is not formatted with \Roman, and I would agree! That's why I was looking for the continual numbering system. – jmd17 Apr 20 '17 at 06:11
  • If you have Roman figures for the chapter number, i.e. \thechapter is actually \Roman{chapter} it is more consistent to use \renewcommand{\thetable}{\thechapter.\Roman{table} so the table number will always have the prefix corresponding to the chapter –  Apr 20 '17 at 06:16
  • Now I'm having an issue in my LoT in which the length of the roman numerals for the tables is so long that it extends into the actual table names (similar to here: https://tex.stackexchange.com/questions/7853/toc-text-numbers-alignment). I'm looking through the tocloft package to try and find something that will help with this but haven't had any luck so far. Any ideas? – jmd17 Apr 20 '17 at 15:01
  • \addtolength{\cfttabnumwidth}{15pt} should help (adjust 15pt) for your personal needs. By the way, this has been asked also very often. –  Apr 20 '17 at 15:05

0 Answers0