GeneralPrefixing table/figure numbers in the list of tables/figures

LaTeX specific issues not fitting into one of the other forums of this category.
Post Reply
DannyBoy
Posts: 10
Joined: Mon Dec 03, 2007 12:16 am

Prefixing table/figure numbers in the list of tables/figures

Post by DannyBoy »

Is there an easy way to prefix the numbers in the list of tables/figures? For example, instead of it appearing as "1.1 Some diagram........ 1" it will appear as "Figure 1.1 Some diagram........ 1".

Recommended reading 2024:

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

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

And: Currently, Packt sells ebooks for $4.99 each if you buy 5 of their over 1000 ebooks. If you choose only a single one, $9.99. How about combining 3 LaTeX books with Python, gnuplot, mathplotlib, Matlab, ChatGPT or other AI books? Epub and PDF. Bundle (3 books, add more for higher discount): https://packt.link/MDH5p

gmedina
Posts: 2313
Joined: Wed Jul 11, 2007 11:45 pm

Prefixing table/figure numbers in the list of tables/figures

Post by gmedina »

In one of your recent posts I recommended the tocloft package. Read the documentation.
1,1,2,3,5,8,13,21,34,55,89,144,233,...
DannyBoy
Posts: 10
Joined: Mon Dec 03, 2007 12:16 am

Re: Prefixing table/figure numbers in the list of tables/figures

Post by DannyBoy »

When including the package in a previously working document I receive errors ("!LaTeX Error: Command \c@lofdepth already defined. Or name \end... illegal"). I am then directed to a piece of text that bears no obvious relation to the error. (Sorry, but I don't have a MWE...)
User avatar
gmedina
Posts: 2313
Joined: Wed Jul 11, 2007 11:45 pm

Prefixing table/figure numbers in the list of tables/figures

Post by gmedina »

Then build one. It's not so hard. Here you can find the guidelines.
1,1,2,3,5,8,13,21,34,55,89,144,233,...
DannyBoy
Posts: 10
Joined: Mon Dec 03, 2007 12:16 am

Re: Prefixing table/figure numbers in the list of tables/figures

Post by DannyBoy »

The conflict seems to be between the subfigure and tocloft packages. Are there any reasons why they shouldn't play well together?
Last edited by DannyBoy on Mon Dec 03, 2007 4:46 am, edited 1 time in total.
User avatar
gmedina
Posts: 2313
Joined: Wed Jul 11, 2007 11:45 pm

Prefixing table/figure numbers in the list of tables/figures

Post by gmedina »

The subfigure package is obsolete. You should use the subfig package instead.
1,1,2,3,5,8,13,21,34,55,89,144,233,...
DannyBoy
Posts: 10
Joined: Mon Dec 03, 2007 12:16 am

Prefixing table/figure numbers in the list of tables/figures

Post by DannyBoy »

subfig doesn't seem to like tocloft either, as this gives me errors.

Code: Select all

\documentclass[article]{article}

\usepackage{subfig}
\usepackage{tocloft}

\title{This is the title}
\author{Mr. A Person}

\begin{document}
\maketitle
Here is some text
\end{document} 
However, when I change the order of subfig and tocloft the errors disappear. Is this indicative of a greater problem?
DannyBoy
Posts: 10
Joined: Mon Dec 03, 2007 12:16 am

Re: Prefixing table/figure numbers in the list of tables/figures

Post by DannyBoy »

Ignore the last post... I RTFM, as instructed... :oops:
Post Reply