General ⇒ How to change prefix of numbers in ListOfTable or ListOfFigu
How to change prefix of numbers in ListOfTable or ListOfFigu
Hello everyone,
I have one question. I want to change the prefix of numbers in List Of Table or List Of Figure. For example, from 1.1 to Figure 1.1 or Table 1.1. I tried the commande \usepackage{tocloft}. But there are a lot of errors and does not work. How can I do it?
thanks for your advice.
I have one question. I want to change the prefix of numbers in List Of Table or List Of Figure. For example, from 1.1 to Figure 1.1 or Table 1.1. I tried the commande \usepackage{tocloft}. But there are a lot of errors and does not work. How can I do it?
thanks for your advice.
NEW: TikZ book now 40% off at Amazon.com for a short time.

How to change prefix of numbers in ListOfTable or ListOfFigu
Hi,
take a look at the following example:
take a look at the following example:
Code: Select all
\documentclass{book}
\usepackage{tocloft}
\newlength\mylena
\settowidth\mylena{Figure}
\newlength\mylenb
\settowidth\mylenb{Table}
\addtolength\cftfignumwidth{\mylena}
\addtolength\cfttabnumwidth{\mylenb}
\renewcommand\cftfigpresnum{Figure }
\renewcommand\cfttabpresnum{Table }
\begin{document}
\listoffigures
\clearpage
\listoftables
\clearpage
\begin{figure}[!ht]
\centering
\rule{4cm}{3cm}
\caption{test figure}
\label{fig:test}
\end{figure}
\begin{table}[!ht]
\centering
\rule{4cm}{3cm}
\caption{test table}
\label{tab:test}
\end{table}
\end{document}
1,1,2,3,5,8,13,21,34,55,89,144,233,...
Re: How to change prefix of numbers in ListOfTable or ListOfFigu
More information:
The error messages are the following:
("C:\Program Files\MiKTeX 2.7\tex\latex\graphics\dvips.def"))) (subfigure.sty
! LaTeX Error: Command \c@lofdepth already defined.
Or name \end... illegal, see p.192 of the manual.
See the LaTeX manual or LaTeX Companion for explanation.
Type H <return> for immediate help.
...
l.99 \newcounter{lofdepth}
? t
The error messages are the following:
("C:\Program Files\MiKTeX 2.7\tex\latex\graphics\dvips.def"))) (subfigure.sty
! LaTeX Error: Command \c@lofdepth already defined.
Or name \end... illegal, see p.192 of the manual.
See the LaTeX manual or LaTeX Companion for explanation.
Type H <return> for immediate help.
...
l.99 \newcounter{lofdepth}
? t
How to change prefix of numbers in ListOfTable or ListOfFigu
Since you are using the subfigure package, you must load the tocloft package using
Please take into account however that subfigure is an obsolete package and shouldn't be used anymore. In its stead you can use either the subfig package or the subcaption package.
Code: Select all
\usepackage[subfigure]{tocloft}
1,1,2,3,5,8,13,21,34,55,89,144,233,...
Re: How to change prefix of numbers in ListOfTable or ListOfFigu
I add 3 lines listed as follows. The prefix problem is solved. But new problem comes out. The title in Table of Content, List of Figures, and List of Tables are overlapped. How to solve this problem?
\usepackage[subfigure]{tocloft}
\renewcommand\cftfigpresnum{Figure }
\renewcommand\cfttabpresnum{Table }
Thanks.
\usepackage[subfigure]{tocloft}
\renewcommand\cftfigpresnum{Figure }
\renewcommand\cfttabpresnum{Table }
Thanks.
How to change prefix of numbers in ListOfTable or ListOfFigu
You have to increase the \cftfignumwidth and \cfttabnumwidth lengths: please take a look at the example code of my first reply in this thread. The tocloft documentation explains the details.
1,1,2,3,5,8,13,21,34,55,89,144,233,...
Re: How to change prefix of numbers in ListOfTable or ListOfFigu
Thank you, Gmedia.
I follow your suggestion by replacing subfigure package with subfig package and using the sample code you provided. The problems in ListOfTable and ListOfFigures are solved.
But in Table Of Contents, the first level title, such as, Chapter1 Introduction, is still overlap. Could you give me some suggestion on it?
Thanks in advance.
I follow your suggestion by replacing subfigure package with subfig package and using the sample code you provided. The problems in ListOfTable and ListOfFigures are solved.
But in Table Of Contents, the first level title, such as, Chapter1 Introduction, is still overlap. Could you give me some suggestion on it?
Thanks in advance.
How to change prefix of numbers in ListOfTable or ListOfFigu
1,1,2,3,5,8,13,21,34,55,89,144,233,...