General ⇒ How to change prefix of numbers in ListOfTable or ListOfFigu
How to change prefix of numbers in ListOfTable or ListOfFigu
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.
Learn LaTeX easily with newest books:
The LaTeX Beginner's Guide: 2nd edition and perfect for students writing a thesis
The LaTeX Cookbook: 2nd edition full of practical examples for mathematics, physics, chemistry, and more
LaTeX Graphics with TikZ: the first book about TikZ for perfect drawings in your LaTeX thesis
How to change prefix of numbers in ListOfTable or ListOfFigu
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}
Re: How to change prefix of numbers in ListOfTable or ListOfFigu
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
Code: Select all
\usepackage[subfigure]{tocloft}
Re: How to change prefix of numbers in ListOfTable or ListOfFigu
\usepackage[subfigure]{tocloft}
\renewcommand\cftfigpresnum{Figure }
\renewcommand\cfttabpresnum{Table }
Thanks.
How to change prefix of numbers in ListOfTable or ListOfFigu
Re: How to change prefix of numbers in ListOfTable or ListOfFigu
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.