Generallist of figure, tocloft package

LaTeX specific issues not fitting into one of the other forums of this category.
Post Reply
kengor
Posts: 2
Joined: Tue Nov 04, 2008 5:16 am

list of figure, tocloft package

Post by kengor »

Hi,
I am writing my thesis using LATEX and I have used \listoffigure to generate a list of figure. Here is the outcome,

List of figures
1.1 This is a bird in chapter 1………1
1.1 This is a pig in chapter 1………12
2.1 This is another bird in chapter..33

But rather, I need my list of figure to be presented in the numbering order as follow:

List of figures
fig.1 This is a bird in chapter 1………1
fig.2 This is a pig in chapter 1………12
fig.3 This is another bird in chapter..33

I have used:

\addcontentsline{toc}{chapter}{List of Figures}
\listoffigures

to add the list of figures and

\begin{figure} [h]
\begin{center}
\label{pageoffig1}
\includegraphics[width=13cm]{abc.jpg}
\caption {\this is abc}
\end{center}
\end{figure}

And someone recommended me to use \tocloft package, and add following code to the document:

\usepackage{tocloft}
\renewcommand{\cftfigfont}{fig.}
\newcounter{myfigure}
\renewcommand{\thefigure}{\addtocounter{myfigure}{1}\themyfigure}

But the no appeared on the list of figure just turned into a mess and became inconsistent with the no appeared in the document. Do anyone know what's wrong with it?

Recommended reading 2024:

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

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

phi
Posts: 577
Joined: Tue Oct 21, 2008 8:10 pm

list of figure, tocloft package

Post by phi »

Hi,
try the following:

Code: Select all

\usepackage{chngcntr}
\counterwithout{figure}{chapter}
kengor
Posts: 2
Joined: Tue Nov 04, 2008 5:16 am

Re: list of figure, tocloft package

Post by kengor »

so i just simply add those lines, but it turns out a number of 'error message' again...
User avatar
localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

list of figure, tocloft package

Post by localghost »

kengor wrote:so i just simply add those lines, but it turns out a number of 'error message' again...
Be more precise. The term "a number of error messages" lacks of any expressiveness. Take a look at the log file and post it here as attachment. Presumably the chngcntr package is not installed. If all efforts fail, reduce the problem to a minimal working example (MWE).


Best regards and welcome to the board
Thorsten¹
Post Reply