In a thesis, report or book one can often find a list of figures and a list of tables. Latex provides a simple command for both of them which will collect all your figures and/or tables and automatically generate a list.
This is another great example which nicely shows how powerful LaTex is compared to some proprietary products available on the market. The two commands \listoffigures and \listoftables are used in the same way as \tableofcontents and easily generate lists with your figures and tables.
The command \listoffigures will collect all the captions of your figures and include it in the list. Now it might happen that your captions are long which results in an even longer list of figures, spanning over several pages. Therefore, \caption[]{} has an option that lets you define a shorter entry displayed in the list of figures only whereas the compulsary field will still be displayed together with the figure. This applies for the list of tables in the same way as it does for the list of figures.
Tags: book, caption, figure, LaTex, listoffigures, listoftables, report, tableofcontent
March 21, 2008 at 12:43 am |
Hi! I had a problem with the \listoffigures comand while I was writting a document in spanish; I would like that in the document appears Lista de Figuras, instead List of Figures, what can I do? Thank you very much for any help you can give me
March 21, 2008 at 9:35 am |
Hi there,
You can change the title as follows:
\renewcommand\listfigurename{Lista de Figuras}
\listoffigures
Similarly, you can change “Table of Contents” (\contentsname) and “List of Tables” (\listtablename).
You might also want to consider changing you whole document language to Spanish:
\usepackage[spanish]{babel}
Which not only renames “List of Figures” to “Indice de figuras”, but uses Spanish hyphenation, etc.
April 1, 2008 at 3:36 am |
Oh, sweet. Thanks man, that was very helpful. Glad to see that there are other people doing some LaTeX stuff these days
April 18, 2008 at 6:12 pm |
Hello!
Thanks for the useful information on Latex.
I had a problem with \listoffigures.
Basically, when I generate the list, it does not include the captions for thos figures tha are composed by several subfigures…
Any help will be much appreciated.
Regards!
April 18, 2008 at 9:32 pm |
Hi Andrey,
Good question indeed. The answer is astonishingly easy. You just need to change the list-of-figure depth to 2 before generating the list:
\setcounter{lofdepth}{2}
By the way, if you want numbers instead of (a), (b) and (c), you would need to change \thesubfigure command. E.g.:
\renewcommand{\thesubfigure}{\thefigure.\arabic{subfigure}}
Does this answer your question?
Cheers,
Tom
April 27, 2008 at 10:14 am |
Hi,
I’m preparing a book and have more than 9 chapters and more than 9 figures in those chapters. Hence, the figure numbers look like XX.XX and they are so wide that they touch the titles in the list of figures. How can I increase the width for the numbers allocated in the list of figures?
Many thanks in advance,
Axel.
May 4, 2008 at 7:41 am |
Salut Axel,
Here is how you can increase the space between the number and the caption in your \listoffigures. Add the following two lines before your \begin{document}:
\usepackage{tocloft}
\setlength{\cftfignumwidth}{3em}
With the tocloft-package you can control the design of table of contents, figures and tables.
Cheers,
Tom
May 20, 2008 at 12:31 am |
Great website, your tips are very helpful.
I have a random question — is there a way to suppress page numbering on your List of Tables? I want the page numbers for the actual tables in the list, I just need to start my whole document’s page numbers after the table of contents, etc. I was able to suppress page numbering for the Table of Contents and List of Figures using the fancyhdr package and this code:
\fancypagestyle{plain}{
\fancyhf[]{}
}
\renewcommand{\headrulewidth}{0pt}
but that doesn’t seem to work for the tables.
Thanks!
Lydia
May 28, 2008 at 6:27 pm |
Hi Lydia,
Sorry for my late reply. Actually, you can suppress the page numbering on individual pages with the following command:
\thispagestyle{empty}
The page-style of the next page will not be affected.
What you actually did with the fancyhdr package was not setting any header nor footer and set the line seperating the header and footer from the actual content to zero. So I am surprised you still got page numbering on your list of tables.
Hope this will work,
Tom
May 29, 2008 at 1:02 am |
Hi, I want to have a listoffigures, so that the list begins like this:
1.1. Figure A…………(p.20)
1.2. Figure B…………(p. 30)
and so forth.
Right now, in Latex, I get the following for my list of figures:
1.2.1. Figure A…….(p.20)
1.2.2. Figure B…….(p.30)
How can I get rid of the extra .1 and .2?
June 3, 2008 at 2:50 pm |
Hi,
is it possible to make Latex use only part of the caption in the figure. Like 1st sentance so that the list of figure is concise and the figure can have longer captions.
Cheers,
Peto
July 3, 2008 at 11:07 am |
Hi Peto,
This can be done by using square brackets with the text you want Latex to show in the list of figures, before the actual caption text:
\caption[list-of-figure text]{actual caption text}.
Cheers,
Tom
July 6, 2008 at 11:35 am |
Hello,
I am using a custom thesis.cls to write my thesis. I want to number all pages of the front matters, i.e. the Acknowledgment then Table of Content, List of Tables, list of figures and abstract in roman numerals. Then i start my chapter.1 at page 1 (arabic numerals)
I managed to start my chapter.1 correctly by placing the command \pagenumbering{arabic}
just before Chapter 1. However, when i put \pagenumbering{roman} before the Acknoweldgment page, I get only this page in roman “i”, but the others starting from the ToC, all get arabic numerals. When i repeated the command in top of the abstract i was able to get that page to start at “i” but does not continue the counter from prevoius pages. I am now stuck with ToC, LoF and LoT.
Can you help?
July 12, 2008 at 10:01 pm |
Hi Kate,
Thanks for your comment. The solution to your problem is easy, but not really obvious. What you do is insert a “\newpage” after your last page having roman numbering. E.g.:
\pagenumbering{roman}
\tableofcontents
\listoffigures
\newpage
\pagenumbering{arabic}
Hope it works now,
Tom
July 19, 2008 at 11:39 pm |
I need the word chapter (e.g., ‘Chapter 1: … )’ to appear in my table of contents. However, my thesis file only produces a list of numbers such as
1 Introduction
1.1 Motivation
1.2 Previous work
2 Algorithm
Instead I need
Chapter 1: Introduction and so on…
The usual chapters are all fine and produce a ‘Chapter x’ heading but just the table of contents does not have the word Chapter x :
Would appreciate suggestions..
Thanks
July 20, 2008 at 9:40 pm |
Hi Vivek,
Do this:
\usepackage{tocloft}
\renewcommand{\cftchapfont}{Chapter }
The line above will add the word “Chapter” before the number in your TOC. Don’t forget the white space, otherwise the number will follow just after “Chapter”.
Best regards,
Tom
July 21, 2008 at 9:03 am |
Hi,
I would like to ask some questions.
First of all, instead of numbering the tables like : 1.1 , 1.2 , 1.3 ,…, 2.1 ,.., 3.1
I would like to number them with integer and consecutive numbers. Moreover, I would like to keep the numeration between chapters. That is to say, if I end one chapter with table 6, I would like to have table 7 in the following chapter, avoiding to begin again with table number 1.
My last question is, how can I start to numerate my chapter 1 with the page number 1. I managed to start numbering in my chapter number 1, with the command \thispagestyle{empty}, but it starts with the number 5. Is it possible to change it?
Thanks a lot.
July 24, 2008 at 9:17 pm |
Hi Andreu,
You have to redefine the table counter (\thetable) as follows:
Define your own counter.
\newcounter{mytable}
Tell Latex to replace the existing table counter with your new counter “mytable” and increase it everytime you use it.
\renewcommand{\thetable}{\addtocounter{mytable}{1}\themytable}
To answer your second question, you can set the page counter to any value:
\setcounter{page}{1}
Cheers,
Tom
July 25, 2008 at 10:34 pm |
Hello,
I am using Latex and I have a question.
I would like the Table of contents to appear as Table of Contents but not only Contents.
I used the following code.
\pagenumbering{roman}
Acknowledgement,
abstarct
\tableofcontents
\listoffigures
\newpage
\pagenumbering{arabic}
can this be done.
Thanks
July 28, 2008 at 9:06 pm |
Hi Kobby,
There is already a comment on this topic (see comment by iliana above):
What you would have to add before your TOC:
\renewcommand\contentsname{Table of Contents}
Cheers,
Tom
July 29, 2008 at 9:30 am |
Hi,
First of all, I would like to thank you for your piece of advice. But I still have problems with the tables. I defined my own counter, and I succeed in numbering my TOC with integer numbers, but now the captions of the tables don’t match with them. Do you know if it’s possible to solve it?
Thanks again for your time.
July 29, 2008 at 9:37 pm |
Hi Andreu,
I don’t exactly understand your problem. The tables should not appear in your TOC, did you mean the list of tables?
If I use the command I proposed above, I get the caption number as I understand you want them to be (integer values continuous over all chapters). If the number does not match with the number in the LOT, try to typeset (generate the PDF) twice, so Latex can update the LOT.
Let me know if it still doesn’t work,
Tom
July 30, 2008 at 1:11 pm |
Hi Tom,
I’m sorry, you were right, I was referring to the list of tables.
My problem is that using your proposed command, I get, in the list of tables and the table labels, integers values continuous over all the chapters but they don’t match with the table captions, which are set randomly. I’ve tried to typeset more than twice, but it doesn’t work yet.
Perhaps, the problem is that I’m not using your command in a properly way.
Thanks again in advance.
August 7, 2008 at 9:42 am |
Hello,
Talking about List of Figures I want to change the numbering of the figures.
Right now it looks like 2.1,2.2,2.3,3.4,3.5…
So when I start a new chapter the first numbe ris increasing for the next figure but also the second number is. I want the second number to start again from 1..
How can I do that?
August 7, 2008 at 12:30 pm |
Okay I found the problem,
I somehow had a \renewcommand included that changed the order!
That happens when you don’t start from the scratch
Thx
August 11, 2008 at 10:53 pm |
Hi,
I am writing my thesis at the moment and as it looks today,
I will probably need latex-help from time to time.
Today I do not understand, why my lists (listoftable and listoffigures) do not occur in the table of content. I already added [bibtotoc] to the document properties, but that only brought the references into the content. Would be great if someone had an idea.
I am using:
\documentclass[a4paper,10pt,twoside,bibtotoc]{scrartcl}
August 12, 2008 at 9:39 am |
Hi Susan,
Usually, if you want to add something to the table of contents (TOC), you can use “addcontentsline”, e.g.
\listoffigures\addcontentsline{toc}{section}{List of figures}
The first command produces the list of figures and the rest adds it to the TOC.
Now if your list of figures spans more than one page, Latex will automatically use the last page number in the TOC, which is usually not wanted. There is another package which I would suggest you to use called
tocbibind.
Hope this works out.
Good luck with your thesis!
Tom
August 12, 2008 at 3:29 pm |
Hi, thanks for all the tips here! Very useful.
I’m trying to add an entry for the lot and lof to my toc. I’ve done \listoffigures\addcontentsline{toc}{section}{List of figures} but this returns the last page of the lof rather than the first. I can see why LaTeX would do that, but I don’t know how to solve it to take the lof’s first page. It takes the one before the lof if I put \addcontentsline before \listoffigures. Any thoughts?
Cheers,
Jakob
August 13, 2008 at 9:47 pm |
Hi Jakob,
Susan had a related question. I would suggest you use tocbibind.
E.g.:
\usepackage[nottoc]{tocbibind}If you don’t want the TOC to be listed in itself. Tocbibind will add almost everything to the TOC by default.
Cheers,
Tom
August 15, 2008 at 12:09 pm |
ok, liststotoc did the job (not listtotoc as I have been trying before) ..
cheers
susan
August 15, 2008 at 4:04 pm |
One more quick question, how do I maintain the caption in my list of tables/figures, but not include it in the document itself where the figure is? The output I get now when I type \caption[text]{} is “Figure 1.1:” I’d like to get rid of the colon waiting for text…
August 15, 2008 at 5:14 pm |
Hi Jenny,
You can solve your problem using version 3 of the caption package:
\usepackage[labelsep=space]{caption}If you don’t have the latest version of caption, the obsolete package caption2 can also solve the problem.
usepackage{caption2}\renewcommand\captionlabeldelim{}
Which basically set the label delimiter to nothing.
Cheers,
Tom
August 24, 2008 at 6:08 am |
Hi,
I am wondering If I want to exclude on of the tables or figures from appearing in the List of tables or figures. Like I am using table environment to virtually format something and I don’t want this virtual table to appear in List of Tables at the begninng.
Thanks
August 24, 2008 at 7:00 am |
Hi Moosa,
You can exclude captions from your LOF and LOT by adding the following two lines to your document, one before the figure/table you want to exclude and the other after:
\captionsetup[figure]{list=no}...
\captionsetup[figure]{list=yes}
Cheers,
Tom
September 16, 2009 at 3:00 pm |
Moosa (and others),
To exclude a specific caption, I found that you can just leave the first argument in the caption blank. The \captionsetup[figure]{list=no} didn’t work for me. Try:
\caption[]{X versus Y}
August 27, 2008 at 1:14 pm |
Hi!
Great blog! Very helpful!
I have a question about making the captions shorter in the list of figures. Do I just add \caption[]{} where I have all the other information in the text about the figures, or do I have to add something else?
Thanks!
August 27, 2008 at 8:41 pm |
Hi Roxanna,
You were right, just use \caption[Your list of figure text]{Your long caption text}
Tom
September 3, 2008 at 12:47 pm |
Hi,
I need the word table and figure (e.g., ‘Table 1. … Figure 1.)’ to appear in my list of tables and figures. However, my thesis file only produces a list of numbers such as
LIST OF TABLES
1 XXXXXX ……… 5
2 YYYYY ………… 8
LIST OF FIGURES
1 TTTTTTTTT…….12
2 ZZZZZZZZ…….30
Instead I need
Table 1. XXXXXXX………5
and
Figure 1. TTTTTTTTTTTT………12
The usual tables and figures are all fine and produce a ‘Table x’ and ‘Figure t’ heading but just the list of tables and figures does not have the word Table x. and Figure t.
Would appreciate suggestions..
Thanks
September 8, 2008 at 12:35 pm |
Hi. thank you for your useful and easy-to-follow info. I just wonder if I want to put “Table” and “Figure” these words into my lists of figures and lists of tables, what should I do? I’ve tried \isucaption, but it gives me an error message. by the way, I defined mine like this…
\usepackage[isu,small,bf,up]{caption2}
Many Thanks in Advance.
September 8, 2008 at 12:40 pm |
Hi Maggie,
“isu” is not really a valid option of the caption2 package. All options are listed in the documentation on page 3:
http://www.cs.brown.edu/system/software/latex/doc/anleitung.pdf
Anyway, I am not sure if \isucaption is able to do what you want. I propose you try tocloft, which is a powerfull package to customize your TOC, LOF and LOT.
Here is how to add “Figure” and “Table” in front of each LOF/LOT entry:
\usepackage{tocloft}\renewcommand{\cftfigfont}{Figure}
\renewcommand{\cfttabfont}{Table}
Cheers,
Tom
September 11, 2008 at 7:27 am |
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}
to add image in my thesis. So what command should i add in order to make what i want? Thanks
September 11, 2008 at 12:37 pm |
Hi Ken,
There are two possibilities to solve your problem:
1. Remove the keyword “Figure” which is printed before your caption and add the follwoing code (see below how this is done).
\newcounter{myfigure}\renewcommand{\thefigure}{\addtocounter{myfigure}{1}fig.\themyfigure}%
2. The easier way would be to use the “tocloft”-package:
\usepackage{tocloft}\renewcommand{\cftfigfont}{fig.}
\newcounter{myfigure}
\renewcommand{\thefigure}{\addtocounter{myfigure}{1}\themyfigure}%
Using the above code will obviously produce “fig.X” in your LOF and “Figure X:” in your captions. If this is not what you want, you would have to manually change the keyword for your captions.
This is done using the following after your \begin{document}:
\renewcommand{\figurename}{fig.}Cheers,
Tom
September 12, 2008 at 12:38 am |
Hello Tom,
Thank you so much for your reply. I actually tried that earlier, but it gives me an error message
\newcounter{lofdepth}\setcounter{lofdepth}{1}
I guess it is because I use \setcounter{lofdepth}{2}.
Actually, now I face another problem – I want to add “Appendix” word into my Table of content. Do you also know any easier way? I tried to change it manually, but it mess up all my figures…
Thank you again so much for your lovely help xxxxxxxxxxxxx
September 12, 2008 at 7:11 am |
Hi, Tom,
Thanks for your answer. When I insert
\usepackage{tocloft}
\renewcommand{\cftfigfont}{fig.}
\newcounter{myfigure}
\renewcommand{\thefigure}{\addtocounter{myfigure}{1}\themyfigure
before \begin{document}, I find that all the figure no. mess up. Do I need to add a line in between:
\begin{figure} [h]
\begin{center}
\label{pageoffig1}
\includegraphics[width=13cm]{abc.jpg}
\caption {\this is abc}
\end{center}
\end{figure}
so as to fix this problem. Many thanks!
Cheers
Ken
September 13, 2008 at 4:59 am |
Hi,
I am writing my thesis using a class file. My thesis includes more than 100 figures. In the top of list of figures, I see “Appendix Figure” instead of “Figure” from third page onwards. Is there a way I can fix this?
Thanks!
Jag
September 13, 2008 at 9:18 am |
Hi Jag,
It might be that your class file defines the header to show “Appendix Figure” for figures which are part of the appendix. You might want to check your class file and see if there is something similar to this totorial explaining exactly what you want to omit.
Sorry, I cannot tell you more than that without seing your Latex document/class file.
Good luck with your thesis,
Tom
September 13, 2008 at 12:04 pm |
hi every one!
i have a prob in using minitoc ,the chapters and sections dont appear in the minitoc ( i have 2 lines instead) and this happen when i start only to add the
\addcontentsline{toc}{chapter}{Liste Des Figures}
\listoffigures
and because i need the list of figures and also the list of tables ,i would be very happy to find a solution ,thks
here is the code
\begin{document}
\ifpdf
\DeclareGraphicsExtensions{.pdf,.jpg,.png}
\else
\DeclareGraphicsExtensions{.eps}
\fi
\pagestyle{empty} %No headings for the first pages.
\include{title}
\dominitoc
\pagestyle{plain}
\pagenumbering{roman}
\tableofcontents
\clearpage
\addcontentsline{toc}{chapter}{Liste Des Figures}
\listoffigures
September 13, 2008 at 1:47 pm |
Hi Simo,
You can only add the list of figures to your table of contents after creating it. So simply change the order of the following two commands:
\addcontentsline{toc}{chapter}{Liste Des Figures}\listoffigures
to
\listoffigures\addcontentsline{toc}{chapter}{Liste Des Figures}
Cheers,
Tom
September 14, 2008 at 7:05 am |
Hi Tom
I have repeating figures’ names (generated by a script that collect regression results) and I want to add the section name before every batch, e.g. instead of
1. Test1 ….
2. Test2 ….
3. Test3 ….
4. Test1 ….
5. Test2 ….
6. Test3 ….
and so on, to be:
Ver. 1.4
1. Test1 ….
2. Test2 ….
3. Test3 ….
Ver 1.5
4. Test1 ….
5. Test2 ….
6. Test3 ….
Thanks
Gaby
September 14, 2008 at 5:50 pm |
Hi Gaby,
I suggest you try the following piece of Latex code. You will have to customize it to your needs, but as a first approach it should solve your problem.
\newcounter{mybatchcounter}\newcommand{\batch}[1]{
\addtocounter{mybatchcounter}{1}
\section{Batch \themybatchcounter}
\begin{figure}[ht]
\centering
\includegraphics[width=\textwidth]{#1/Test1.jpg}
\caption{}
\includegraphics[width=\textwidth]{#1/Test2.jpg}
\caption{}
\includegraphics[width=\textwidth]{#1/Test3.jpg}
\caption{}
\end{figure}
\newpage}
\batch{batch1_dir}
\batch{batch2_dir}
Let me know if this is not what you were looking for.
Cheers,
Tom
September 15, 2008 at 7:19 pm |
Hi, great blog. Anyway, in my table of contents I need the word ‘Chapter’ before my chapters, but if I add the code:
\usepackage{tocloft}
\renewcommand{\cftchapfont}{Chapter }
then I get the word Chapter before my chapters but also before my List of Figures and List of Tables. Is there a way for my Table of Contents to just say
List of Figures…
Chapter 1: Introduction
instead of
Chapter List of Figures
Chapter 1: Introduction.
Also, two quick questions:
1) Is there an easy way to center the heading for the Table of Contents
2) Is there an easy way t o add dots to every line in the Table of Contents (right now I only have dots to my sections).
September 15, 2008 at 8:40 pm |
Hi Jon,
I am not sure if I completely understand all of your problems, but I can certainly give you some hints.
If you want “Chapter” in the TOC entries, but not in the LOF/LOT, simply use the command:
\renewcommand{\cftchapfont}{}after generating your TOC.
However, I don’t understand why you get “Chapter” in front of your list titles, this seems a bit weird to me. I tried your code and I only got “Chapter” in front of my TOC entries.
1) You can use
\centering{\cfttoctitlefont}to centre your TOC title, it worked for me.
Similarly, you can centre LOF and LOT titles.
2) Adding dots between chapters can be done as follows:
\renewcommand{\cftchapleader}{\cftdotfill{\cftsecdotsep}}Cheers,
Tom
September 16, 2008 at 7:55 am |
Hi Tom,
Thanks for the reply,
I looked at my original post, and realized that I was not clear about what I was trying to do. I hope this time i’ll be more precise:
I have figures in different sections that get the same name (the figures), and when I generate the list of figures there is no possibility to know to which section the figure belongs to.
What commands do I need to add so that the LOF will look like:
Section 1.4 Superman vs. Spiderman with Kripton
1. Test1 ….
2. Test2 ….
3. Test3 ….
Section 1.5 Superman vs. Spiderman without Kripton
4. Test1 ….
5. Test2 ….
6. Test3 ….
and not like:
1. Test1 ….
2. Test2 ….
3. Test3 ….
4. Test1 ….
5. Test2 ….
6. Test3 ….
I managed to do that by manualy changing the LOF file, but those changs apply only for the next compilation, since they are overwritten with the newly generated LOF file.
Thanks
Gaby
September 17, 2008 at 7:58 pm |
Tom, thanks for the help. I ended up resolving my ‘Chapter’ problem with the following code (just adding it in case anybody else has a similar problem):
\usepackage{tocloft}
\renewcommand{\cftchappresnum}{Chapter }
\renewcommand{\cftchapaftersnum}{:}
\renewcommand{\cftchapnumwidth}{6em}
\renewcommand{\cftchapleader}{\cftdotfill{\cftsecdotsep}}
and then adding my bibliography or list or whatever to the Table of Contents where needed via:
\addcontentsline{toc}{chapter}{Bibliography}
September 18, 2008 at 5:27 am |
Thanks Tom! I finally figured it out after some head-scratching..
—————————————–
Hi Jag,
It might be that your class file defines the header to show “Appendix Figure” for figures which are part of the appendix. You might want to check your class file and see if there is something similar to this totorial explaining exactly what you want to omit.
Sorry, I cannot tell you more than that without seing your Latex document/class file.
Good luck with your thesis,
Tom
September 22, 2008 at 4:51 pm |
Hi Tom,
I would like to change the font size in the “List of figures” title, possbly even change it from bold to italic. How would I do this.
Thanks,
Neil.
September 22, 2008 at 6:29 pm |
Hi Neil,
You can easily change the titles using the “tocloft” package:
\renewcommand{\cftXtitlefont}{\Huge\itshape}Just replace the X with either “toc”, “lof” or “lot” and use any font size you like.
Available font sizes are: \tiny, \scriptsize, \footnotesize, \small, \normalsize, \large, \Large, \LARGE, \huge and \Huge.
Cheers,
Tom
September 23, 2008 at 8:28 am |
Hi Tom,
That worked but when I use tocloft the fancy header and footer disappears from the pages that have the loc, lof and lot.
Neil.
September 23, 2008 at 10:05 am |
Hi Neil,
I am not sure if the actual problem is the tocloft package. Does the header/footer appear on the TOC/LOF/LOT pages when you are not using the tocloft package?
Anyway, you can “force” the header to appear, e.g. for the table of contents:
\addtocontents{toc}{\protect\thispagestyle{fancy}}\tableofcontents
Hope this works out,
Tom
September 23, 2008 at 11:34 am |
Hi Tom,
Yep, the header/footer appears/disappears when I turn on and off tocloft. However your fixed worked perfectly.
Thanks alot for the help!
Neil.
September 28, 2008 at 10:59 pm |
Hi Tom,
do you know if there’s a way to get the \tableofcontents command to also show an entry for the list of figures and the list of tables?
Speaking about which: since my dissertation only contains two tables, do you know a way to combine these two lists?
Cheers,
Philipp
September 29, 2008 at 7:28 pm |
Hi Philipp,
Thanks for your comment. You can actually add anything you like to the table of cotents by using the following command:
\addcontentsline{file}{type}{text}where file would be “toc” in your case. As type you would simply use figure or table and the third argument would be the text you want to have in the table of contents.
However, personally I prefer to use a separate list of figures and tables, even if there are only two entries. You can have them on the same page as the TOC.
Anyway, it’s your choice and you should be able to do it with the information above.
Have fun,
Tom
September 30, 2008 at 5:39 pm |
Hi Tom,
sorry, I didn’t express this properly. I’m definitely going to use a separate \listoffigures and \listoftables. And I’d like to put references to them into the tableofcontents. I know the command \addcontentsline. The problem is that my list of figures is longer than a page. So if I use \addcontentsline before \listoffigures, I will get a too low page number in the toc, if I use it afterwards, the page number will be too high. I wondered if there’s an elegant way to get this right.
Cheers,
Philipp
October 5, 2008 at 5:54 pm |
Hi Philipp,
Simply insert a page break before your lof/lot:
\tableofcontents\newpage
\addcontentsline{toc}{figure}{List of Figures}
\listoffigures
\newpage
\addcontentsline{toc{table}{List of Tables}
\listoftables
\newpage
Cheers,
Tom
October 11, 2008 at 2:44 pm |
Hello,
I need to add the word “Page” to the list of tables and to the list of figures on the top of the page numbers. I don’t want the page numbers just appear, I want the word Page on the top of them.
I have succeed to add “Page” to the table of contents but I couldn’t do that in the list of tables or the list of figures.
Is there any one can help me?
regards
Rand
October 12, 2008 at 7:05 pm |
Hi Rand,
Using the following command, you can produce the word “Page” in your toc/lof/lot (just replace X):
\addtocontents{X}{\protect\makebox[\textwidth][r]{Page}\protect}Make sure, you don’t add the command just after your \listoffigures. Inside your first chapter should be fine. I don’t exactly see why, but at least it works
.
Cheers,
Tom
October 13, 2008 at 12:12 pm |
Hi Tom,
I have a large table with multiple rows. I have taken care to split the table into two which results in two similar table environments and produces the table segmented into two over two pages as i wanted (for some reason longtable never worked for me). In addition, i was able to paste the table notes below the second table, and there were a lot of these (there seems to be no sound table package which allows continuation over multiple pages and takes care to include the table notes appearing below the bottom margin of the table). The only problem with my table now is that even if i append Continued atop the second part of the original unsegmented table, this word along with an increased table numbering gets included in the listoftables. I know about the \captionsetup[figure]{list=no} command mentioned above. In all honesty, i have no idea whereabouts in the table environment this gets included but i would like this second table to remain unnumbered and in addition would like to be able to have Table 4.1, say, appear on top of the second segment along with the word -Continued……any ideas????
Thanks in advance,
Robert.
October 13, 2008 at 9:56 pm |
Hi Robert,
I hope I correctly understood your issue. Have a look at the following very short example and let me know what you think?
Btw. Explicitly using the caption-package, Latex will not add a list of table entry if you leave the optional brackets empty:
\caption[]{Your caption text}Cheers,
Tom
\usepackage{caption}\begin{table}[ht]
\centering
\begin{tabular}{|c|c|}
\hline
a&b\\
\hline
c&d\\
\hline
\end{tabular}
\caption{First part}
\label{tab:a}
\end{table}%
\addtocounter{table}{-1}
\begin{table}[ht]
\centering
\caption[]{Continued}
\begin{tabular}{|c|c|}
\hline
a&b\\
\hline
c&d\\
\hline
\end{tabular}
\label{tab:b}
\end{table}%
October 14, 2008 at 4:01 pm |
hi every one
i have a problem with the caption of figure , after compiling , the same title repeat twice i dont know why?? and i have errors
\begin{figure}[h]
\includegraphics{K4MAFJ01__2}
\caption{agents that maintain state}\label{fig:fig2} %this one
\end{figure}
the result is like this : the figure right here after these two titles
agents that maintain state
Fig1.1 agents that maintain state %in italic just after
Fig1.1 agents that maintain state
the errors are :Missing \endcsname inserted
1.53 …{references\relax}{figure.1.1}{}}
Latex Error: Missing \begin{document}
the source of the prob here:
\@writefile{toc}{\contentsline {chapter}{\numberline {1}Some small hints}{1}{chapter.1}}
\@writefile{lof}{\addvspace {10\p@ }}
\@writefile{lot}{\addvspace {10\p@ }}
\@writefile{lof}{\contentsline {xchapter}{Some small hints}{1}{chapter.1}}
\@writefile{lot}{\contentsline {xchapter}{Some small hints}{1}{chapter.1}}
\newlabel{hints}{{1}{1}{Some small hints\relax }{chapter.1}{}}
\@writefile{toc}{\contentsline {section}{\numberline {1.1}References}{1}{section.1.1}}
\newlabel{references}{{1.1}{1}{References\relax }{section.1.1}{}}
\@writefile{toc}{\contentsline {section}{\numberline {1.2}Dividing large Documents}{1}{section.1.2}}
\newlabel{dividing}{{1.2}{1}{Dividing large Documents\relax }{section.1.2}{}}
\@writefile{toc}{\vspace *{\baselineskip }}
\@writefile{toc}{\contentsline {starchapter}{Bibliographie}{1}{section.1.2}}
\@writefile{lof}{\contentsline {figure}{\numberline {1.1}{\ignorespaces agents that maintain state}}{2}{figure.1.1}}
\newlabel{fig\@DP fig2}{{1.1}{2}{References\relax }{figure.1.1}{}}
thank you for your responses
October 14, 2008 at 9:05 pm |
Hi Yan!
First of all, I always get errors if I use underline (“_”), so trying to escape them with a backslash might help:
\includegraphics{K4MAFJ01\_\_2}What might have happened is that you are trying to include files which do not yet exist. If so, just comment out the
\include{file}The figure environment looks all right, so I am not sure why you get the caption twice and I can’t remember having seen such a thing before. If you are still having the problem, could you post some more code, please?
Also, you might have some lines of code before you start your document which should actually be inside the document. So it would be interesting to see what code you have before “\begin{document}”.
If you get errors like these, it is always advisable to delete the auto-generated files like .toc, .aux, .log, etc. (but not the .tex file of course
), as they may contain the error and when you re-generate the PDF, Latex will access them…
Cheers,
Tom
October 14, 2008 at 10:42 pm |
thank you Tom, here is all the code
\documentclass[a4paper,oneside,11pt]{report}
\usepackage[left=1in,right=1in,top=1.1in,bottom=1.1in]{geometry}
\usepackage[french]{babel}
\usepackage[pdftex]{hyperref}
\hypersetup{
colorlinks,%
citecolor=black,%
filecolor=black,%
linkcolor=black,%
urlcolor=black}
\newif\ifpdf
\ifx\pdfoutput\undefined
\pdffalse %%normal LaTeX is executed
\else
\pdfoutput=1
\pdftrue %%pdfLaTeX is executed
\fi
\ifpdf
%\usepackage{ae} %%Use only just one of these packages:
%\usepackage{zefonts} %%depends on your installation.
\else
%%Normal LaTeX – no special packages for fonts required
\fi
%% Language %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%\usepackage[francais]{babel}
\usepackage[T1]{fontenc}
\usepackage[latin1]{inputenc}
%% Packages for Graphics & Figures %%%%%%%%%%%%%%%%%%%%%%%%%%
\ifpdf %%Inclusion of graphics via \includegraphics{file}
\usepackage[pdftex]{graphicx} %%graphics in pdfLaTeX
\else
\usepackage[dvips]{graphicx} %%graphics and normal LaTeX
\fi
%\usepackage[hang,tight,raggedright]{subfigure} %%Subfigures inside a figure
%\usepackage{pst-all} %%PSTricks – not useable with pdfLaTeX
%% Math Packages %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\usepackage{amsmath}
\usepackage{amsthm}
\usepackage{amsfonts}
\usepackage{xtab}
\usepackage{array}
\usepackage {graphicx}
\newcommand{\HRule}{\rule{\linewidth}{0.5mm}}
\begin{document}
\ifpdf
\DeclareGraphicsExtensions{.pdf,.jpg,.png}
\else
\DeclareGraphicsExtensions{.eps}
\fi
\pagestyle{empty} %No headings for the first pages.
\include{title}
%% Title Page %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% ==> Write your text here or include other files.
\pagestyle{plain}
\addcontentsline{toc}{chapter}{Contents}
\tableofcontents %Table of contents
\pagenumbering{roman}
%% The List of Figures
\clearpage
\addcontentsline{toc}{chapter}{List of Figures}
\listoffigures
%% The List of Tables
\clearpage
\addcontentsline{toc}{chapter}{List of Tables}
\listoftables
\clearpage
\pagenumbering{arabic}
\chapter{Some small hints}
\section{References}
\begin{figure}[h]
\centering
\includegraphics[scale=0.5,angle=270]{xxs}
\caption{agents that maintain state}
\end{figure}
\section{Dividing large Documents}
\end{document}
October 15, 2008 at 9:29 am |
hi Tomi discovered that the package hyperref caused this prob i dont know why??? when i put it like a comment , the title is good
what should i do??
October 15, 2008 at 11:20 am |
Hi Yan,
Your code works perfectly with me, so what I would recommend you is that you get the latest version of the Latex distribution. The hyperref package should not cause any problems. The only thing what you can try is change the order of the packages you use. But as I said, I can generate the PDF (using pdflatex) from your code without errors.
Tom
October 15, 2008 at 12:47 pm |
Tom, is this the link for the new package??http://www.tug.org/protext/
protext is the same thing as miktex?
October 15, 2008 at 2:08 pm |
You can get the latest version of MikTex from here:
http://www.miktex.org/
Cheers,
Tom
October 15, 2008 at 9:04 pm |
you’re right Tom thank you very much , i used to have a lot of warnings and errors , and with this new package nothing ,incredible
Good luck
October 15, 2008 at 10:45 pm |
hi tom ,i have some warnings , i think the prob is with the package
hyperref and minitoc , here are the warnings
Package minitoc(hints) Warning :W0030
minitoc(hints) — The \part command is altered after minitoc
Package minitoc(hints) Warning :W0023
minitoc(hints) — it may be the consequence of loading the ‘hyperref’ package
Regards.
October 16, 2008 at 10:35 am |
good day
it seems like we can not ovoid this warning messages, but they’re not harmful
i would like to know how to edit good graphics, cause when i tried to add jpg images that i saved from word2007 they didnt seem good at all .
and when i try to add it like a pdf , i got a lot of additional space around the framework of my graphic.
thank you.
October 16, 2008 at 2:12 pm |
Thanks! Your answer to Axel mostly fixed my problem.
However, I had to use
\usepackage[subfigure]{tocloft}
\setlength{\cftfignumwidth}{3em}
or else I got a “Command \c@lofdepth already defined” error (probably because I use the subfigure package). Also, tocloft does not create a list of figures on a new page by default so I needed to put a \clearpage command before \listoffigures.
Thanks again; this saved me some hair-pulling!
October 16, 2008 at 3:56 pm |
i dont know why i have dash instead of bullet?? when i use itemize
it seems like its the default parameter.
October 16, 2008 at 7:10 pm |
Hi Yan,
I am glad you could fix some of your problems. I probably won’t be able to solve your issue with the word graphics. If you have the original image, you should definitely use it. I don’t know what Microsoft is doing exactly (compression, scaling, etc.), but the image quality is definitely suffering. I don’t think you can avoid that. Except if you scale them down in Latex…
Concerning the itemize issue, let me write a post on how to change the default setting of the four levels in order to get bullets on the first level.
Tom
October 16, 2008 at 8:52 pm |
the problem is that i get dash in the first level ,dash in the second ,..and so on
i dont think its a prob of reordering , even the dash that appear start from the left like this
-not like this :
-i cant find the white space that u can see before the dash
first level dash
second level dash , and the dash is thick a little comparing to the the original
that i found in executing a test file.
thanks.
October 16, 2008 at 9:26 pm |
i discovered that the french package caused this prob , when i omit the package, all the items are good and in order
what should i do Tom.?
October 16, 2008 at 11:00 pm |
even with the last update of babel package , same thing.
October 16, 2008 at 11:06 pm |
the german package for babel works perfect for itemize
complicated
what the hell with these french
please Tom help
October 17, 2008 at 6:44 am |
Hi Yan,
You can use
\StandardLayoutin the preamble after loading the babel package.
Tom.
October 17, 2008 at 9:24 am |
i just find it on the \frenchbsetup , exact, you’re right TOM
thanks
October 20, 2008 at 2:08 am |
Dear Tom
Can you please guide me in one problem. I am writing my Master Thesis and I have generated TOC with the following commands in Latex.
pagenumbering{roman}
\input{abstract.tex}
\input{acknow.tex}
\tableofcontents
\listoffigures
\listoftables
\newpage
The problem is when I run the file, I see Abstract, Acknowledgement but not Table of contents, List of figures and List of Tables in my TOC. Can you please help me in this regard
I shall be highly thankful
Regards
Ali
October 20, 2008 at 9:19 pm |
Hi Ali,
From the information given above, you might want to try including the files without the file extension (.tex). I tried to run it with the extension and I got the inverse, the abstract didn’t get included, but the toc did.
Hope this helps,
Tom.
October 22, 2008 at 11:39 pm |
hi Tom , i would like to change the spacing(underline) on the minitoc table
this time ,there is a large spacing, what command should i use??
thanks
October 22, 2008 at 11:40 pm |
Hi Yan,
Check out the minitoc documentation available in both, English and French.
Tom
October 23, 2008 at 10:03 pm |
Hi Tom,
I’ve created a table that is six pages long. The table looks fine, but when I use the \listoftables command, the table has six entries in the list of tables, one for each page. Is there any way to have only one entry in the list of tables?
Tanks,
Ed
October 23, 2008 at 10:58 pm |
Hi Ed,
I gave a solution to your questions above. I can understand that reading all these comments is annoying so just go here
.
Cheers,
Tom
October 24, 2008 at 12:32 am |
Hi Tom,
I tried to make a list for my figures in my thesis. But I always got error messages.
I insert my figure in this way:
\begin{figure}\label{fig1}
%\begin{center}
\hspace{-1.5cm}\includegraphics[width=7.0in, height=6.0in]{fig1}
\begin{center}
\noindent \hskip1cm (i) \hskip 3cm (ii) \hskip 3cm (iii) \hskip 3.4cm (iv)
\end{center}
\caption{\small The phase portraits of $I_i(t)$ vs $S_i(t)$($i=1,2$)
for (\ref{simple-model})
with (\ref{data1}), $D_{I_i}=0,\,\,i=1,2$ and (i) $D_{S_1}=0,\,\,\,D_{S_2}=0$;
(ii) $D_{S_1}=0.02,\,\,\,D_{S_2}=0.2$; (iii)
$D_{S_1}=0.4,\,\,\,D_{S_2}=0.2$; (iv)
$D_{S_1}=0.8,\,\,\,D_{S_2}=0.2$. Initial values are given by
(\ref{IV-1}).}
%\end{center}
\end{figure}
As you see the above, the caption is pretty long. But I don’t have a better name for it. Also in my main.tex file. I used
\newpage
\listoffigures
\addcontentsline{toc}{table}{LIST OF FIGURES}
But when i run it, I always get the error message something like that:
in main.lof missing number, treated as zero \protect, than the window give me the file of main.lof in which the error has highlighted the following thing:
\contentsline {figure}{\numberline {2.4.1}{\ignorespaces \let \relax \fontsize {12}{14.5}\selectfont \abovedisplayskip 12\p@ plus3\p@ minus7\p@ \abovedisplayshortskip \z@ plus3\p@ \belowdisplayshortskip 6.5\p@ plus3.5\p@ minus3\p@ \belowdisplayskip \abovedisplayskip \let \leftmargin \leftmargini \parsep 5\p@ plus2.5\p@ minus\p@ \topsep 10\p@ plus4\p@ minus6\p@ \itemsep 5\p@ plus2.5\p@ minus\p@ \leftmargin \leftmargini \parsep 5\p@ plus2.5\p@ minus\p@ \topsep 10\p@ plus4\p@ minus6\p@ \itemsep 5\p@ plus2.5\p@ minus\p@ =\relax \fontsize {10.95}{13.6}\selectfont \abovedisplayskip 11\p@ plus3\p@ minus6\p@ \abovedisplayshortskip \z@ plus3\p@ \belowdisplayshortskip 6.5\p@ plus3.5\p@ minus3\p@ \def \leftmargin \leftmargini \parsep 5\p@ plus2.5\p@ minus\p@ \topsep 10\p@ plus4\p@ minus6\p@ \itemsep 5\p@ plus2.5\p@ minus\p@ {\leftmargin \leftmargini \topsep 9\p@ plus3\p@ minus5\p@ \parsep 4.5\p@ plus2\p@ minus\p@ \itemsep \parsep }\belowdisplayskip \abovedisplayskip \relax \fontsize {10.95}{13.6}\selectfont \abovedisplayskip 11\p@ plus3\p@ minus6\p@ \abovedisplayshortskip \z@ plus3\p@ \belowdisplayshortskip 6.5\p@ plus3.5\p@ minus3\p@ \def \leftmargin \leftmargini \parsep 5\p@ plus2.5\p@ minus\p@ \topsep 10\p@ plus4\p@ minus6\p@ \itemsep 5\p@ plus2.5\p@ minus\p@ {\leftmargin \leftmargini \topsep 9\p@ plus3\p@ minus5\p@ \parsep 4.5\p@ plus2\p@ minus\p@ \itemsep \parsep }\belowdisplayskip \abovedisplayskip The phase portraits of $I_i(t)$ vs $S_i(t)$($i=1,2$) for (2.4.3\hbox {}) with (2.4.1\hbox {}), $D_{I_i}=0,\tmspace +\thinmuskip {.1667em}\tmspace +\thinmuskip {.1667em}i=1,2$ and (i) $D_{S_1}=0,\tmspace +\thinmuskip {.1667em}\tmspace +\thinmuskip {.1667em}\tmspace +\thinmuskip {.1667em}D_{S_2}=0$; (ii) $D_{S_1}=0.02,\tmspace +\thinmuskip {.1667em}\tmspace +\thinmuskip {.1667em}\tmspace +\thinmuskip {.1667em}D_{S_2}=0.2$; (iii) $D_{S_1}=0.4,\tmspace +\thinmuskip {.1667em}\tmspace +\thinmuskip {.1667em}\tmspace +\thinmuskip {.1667em}D_{S_2}=0.2$; (iv) $D_{S_1}=0.8,\tmspace +\thinmuskip {.1667em}\tmspace +\thinmuskip {.1667em}\tmspace +\thinmuskip {.1667em}D_{S_2}=0.2$. Initial values are given by (2.4.4\hbox {})}}{47}
Could you help me out with this? I will really appreciate. I really don’t know how to fix it. I am so frustrated at this moment.
Thank you so much.
October 28, 2008 at 8:09 pm |
Hi Jing,
I used your code to recreate the error, but it seems there is nothing wrong with your code in general.
One thing you might want to try is to put the label after the caption. Otherwise, I can only suggest you get the latest version of Latex and hope this will solve your problem.
Good luck!
Tom.
October 30, 2008 at 8:32 pm |
Hi,
very useful blog. thnx
I have a question,
I use
\documentclass[12pt, abstracton, headsepline, liststotoc]{scrartcl}
as document class and I want lof&lot (without number) appear in toc however it does not.
[liststotoc] is supposed to do this work but still no output.
could you pls help me
thnx
oguzhan
October 30, 2008 at 9:18 pm |
Hi Oguzhan,
I don’t know where your problem comes from, it worked perfectly with my Latex distribution. You might want to try the following things:
1. Delete all tex-output files (.aux, .toc, etc. except .tex) and try again.
2. Reduce the code to a minimum and see if it works.
3. Get the latest Latex distribution.
Good luck,
Tom.
October 31, 2008 at 3:33 pm |
Hi Tom,
appreciate for your help.
i tried all but still no entry in toc.
any more idea?
thnx
oguzhan
November 1, 2008 at 6:26 am |
Hi,
In my table of contents I need the word ‘page’ before my page number,
and I would like that appear the number of page of list of figure in my table of contents, like this:
List of figures ……………… page 1
Chapter 1 ………………….. page 5
Chapter 2 ………………….. page 7
Is there any one can help me?
regards
joker
November 2, 2008 at 12:38 pm |
Hi Joker,
Adding the word page before the page number can be achieved using the tocloft package:
\usepackage{tocloft}\renewcommand{\cftchapleader}{\cftdotfill{\cftdotsep} \bfseries Page}
\renewcommand{\cftsecleader}{\cftdotfill{\cftdotsep} Page}
See the tocloft documentation.
Concering your second question, please refer to my previous comments on this article, e.g. here.
Cheers,
Tom.
November 12, 2008 at 8:03 pm |
Hi!
How can you reduce the space before and after the title “Content” of the table of contents, i.e., the space between “Content” and the first line of contents in the table of contents?
How can you do the same for “List of Figures” and “List of Tables”
?
Thanks
November 12, 2008 at 10:22 pm |
Hi Fatima,
Here is a little trick how you can increase or decrease in your case the space between the title and your first entry:
\addtocontents{toc}{\vspace{-0.5in}}Use this command before your first entry, but after your \tableofcontents command. It manually adds an additional entry, which is space instead of text.
By using “lof”/”lot” instead of “toc”, you can add/remove space to the list-of-figures / list-of-tables.
Reference: tocloft-documentation
Cheers,
Tom.
November 23, 2008 at 7:48 pm |
hi yan how are u, i’m writing an article using a structure of twocolumn, \documentclass[a4paper,twocolumn,10pt]{article} i would like to write the abstract without using two column i mean in one part.
help!!pls
November 23, 2008 at 8:04 pm |
i mean Tom
sorry
November 23, 2008 at 8:23 pm |
i got it, just use multicol package .
November 24, 2008 at 12:58 pm |
Hi,
In my table of contents appears my list of figures and tables, then the introduction and my sections. I nedd to put a point between the name of my section, lits of figures and tables and the page number, I’m working with document class article
Its appears like this
abstract 1
list of figures 2
list of tables 3
1. Introduction 4
2. literature 5
2.1. literature century XX ……… 6
.
.
3. conclusions 30
I nedd like this
abstrarct ………………………….. 1
list of figures …………………….. 2
list of tables ……………………… 3
1. introduction …………………… 4
2. literature ………………………. 5
2.1 literature century XX ……… 6
.
.
.
3. conclusions …………………… 30
Thanks,
November 24, 2008 at 7:30 pm |
hi Tom its me again ,it seems that package multicols dont deal with figures, seems that the figure dont fit into one colulmn?? what should i do??
December 3, 2008 at 5:09 pm |
Hi! This seems to the expert page for the \listoffigures!
I have a question.
I have a problem with latex files in book format.
I use \listoftables and \listoffigures.
It does generate a proper list of figures with roman numbering,
*but* then two empty pages follow that however include the page
titles “list of figures” *and* crucially they start the numbering in arabic numbering. It looks very strange and it means my introduction starts from page 3. I can understand may be it decides 2 empty pages are needed but why title them as list of figures (and even that is probably ok) and especially, why switch to arabic numerals and start counting before the introduction? I hope it makes sense, sorry to take people’s time with this. Many thanks in advance.
December 4, 2008 at 10:39 pm |
Hi Chris,
I am quite surprised about your issue. I would expect Latex to add one page after listoffigure/listoftable to make the number of pages used even. Also, I could explain the header on the empty page, but not the entire title “List of figures”.
The following code however should solve your numbering problem and might also help with some of the other problems. Give it a try:
\tableofcontents\listoffigures
\listoftables
\cleardoublepage
\setcounter{page}{1}
\pagenumbering{arabic}
Cheers,
Tom.
December 15, 2008 at 5:31 am |
hi tom.
is there any way to get rid of the page numbers and the dots in listoffigure?
i.e., now we have
1 XXXXXX ……… 5
2 YYYYY ………… 8
but i just want
1 XXXXXX
2 YYYYY
or better
Fig. 1 XXXXXX
Fig. 2 YYYYY
thanks.
December 16, 2008 at 9:59 pm |
Hi Morris,
Here is how you can omit the dots and the page numbers in the list of figures:
\usepackage{tocloft}\renewcommand{\cftfigdotsep}{\cftnodots}
\renewcommand{\cftfigpagefont}[1]{}
\renewcommand{\cftfigafterpnum}{\cftparfillskip}
Please see my previous comments or the tocloft documentation on how to add “Fig.” in front of every entry.
Tom.
December 17, 2008 at 11:22 am |
thanks tom.
i still cant get rid of the numbers though, i still got
Fig. 1 XXXXXX 5
Fig. 2 YYYYY 8
i want:
Fig. 1 XXXXXX
Fig. 2 YYYYY
i tried to read the fine tocloft manual a bit in the meantime.
\renewcommand{\cftdot}{} would also get rid of the dots… cant figure out a way to make the numbers disappear. may need to renewcommand listoffigures. will check back from time to time.
great blog!
January 2, 2009 at 11:47 pm |
hi Tom, i have these two warnings i dont know why??
LaTeX Font Warning: Font shape `T1/lmr/bx/sc’ undefined
(Font) using `T1/lmr/bx/n’ instead on input line 14.
LaTeX Font Warning: Some font shapes were not available, defaults substituted.
Thks Tom.
March 6, 2009 at 11:57 am |
Hi Tom,
Nothing to do with figures but you seem to know everything about Latex.
Anyhow,
I am trying to change the section font type in a document that uses the res.cls which in tern uses the article.sty formats. I have tried using various variations of \renewcommand{\sectionfont}{\sffamily} but with no joy. what am I doing wrong?
Thanks.
Neil.