Graphics, Figures & TablesCustomize Table Numbers

Information and discussion about graphics, figures & tables in LaTeX documents.
Post Reply
Dutty_Sutty
Posts: 4
Joined: Fri Aug 05, 2011 6:29 pm

Customize Table Numbers

Post by Dutty_Sutty »

I need to customize my table numbers so that, instead of tables 1, 2, 3, and 4, I have tables 1.a., 1.b., 1.c., and 2. How do I go about doing this?

Cheers
Last edited by Dutty_Sutty on Fri Aug 26, 2011 11:35 am, edited 1 time in total.

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

Customize Table Numbers

Post by localghost »

The subfloat package is your friend. It provides structures which work quite similar to the »subequations« environment of the amsmath package.

Code: Select all

\documentclass[11pt]{article}
\usepackage[T1]{fontenc}
\usepackage[tableposition=top]{caption}
\usepackage[countmax]{subfloat}

\renewcommand*{\thesubfloattable}{\themaintable.\alph{subfloattable}}

\begin{document}
  \begin{subtables}
    \begin{table}[!ht]
      \caption{First Sub-Table}\label{subtab-1:dummy-1}
      \centering
      \rule{6.4cm}{3.6cm}
    \end{table}
    \begin{table}[!ht]
      \caption{Second Sub-Table}\label{subtab-2:dummy-1}
      \centering
      \rule{6.4cm}{3.6cm}
    \end{table}
    \begin{table}[!ht]
      \caption{Third Sub-Table}\label{subtab-3:dummy-1}
      \centering
      \rule{6.4cm}{3.6cm}
    \end{table}
  \end{subtables}

  \begin{table}[!ht]
    \caption{Second Table}\label{tab:dummy-2}
    \centering
    \rule{6.4cm}{3.6cm}
  \end{table}
\end{document}
Definitions for figures happen analog. For details refer to the package manual.


Thorsten
Post Reply