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
(lof) and \listoftables
(lot) are used in the same way as \tableofcontents
to generate lists with all your figures and tables.
The command \listoffigures
will collect all the captions of your figures and include them in the list. Now it may happen that your captions are long which would results in an even longer list of figures, spanning over several pages. Therefore, the caption
command provides the option to define a shorter entry displayed in the list of figures only whereas the text of the required argument will be displayed together with the figure. This applies for the list of table in the same way as it does for the list of figures.
\caption[short caption for lof/lot]{long figure/table caption}
iliana
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
tom
Hi there,
You can change the title as follows:
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:
Which not only renames “List of Figures” to “Indice de figuras”, but uses Spanish hyphenation, etc.
carlosgalvezp
Hi,
I tried that and it does change the title of the section “List of Figures” to “Lista de figuras”, but the entry in the Table of Contents is still “List of figures”.
How can I change the name of the entry inside the Table of Contents?
Thanks
tom
Hi!
You have to manually add it to the table of contents. By the way, loading the babel package with the option spanish automatically changes the names. Have a look at the minimal working example below:
Best, Tom.
carlosgalvezp
Hi!
I tried that but it just creates another entry in the Table of Contents, which doesn’t point to any page (you click on it an nothing happens). Also, another “List of figures” entry appears, so I have that entry twice: one in spanish and the other in english. I already used the babel package and still doesn’t work. My code is the following:
Thanks for your help!
tom
Please provide a complete minimal working example. The question you had before was different or did I misunderstand something? If you want to cross-link the chapters in the table of contents, load the
hyperref
package after loading all the other packages in your preamble.Cheers, Tom.
Garoth
Oh, sweet. Thanks man, that was very helpful. Glad to see that there are other people doing some LaTeX stuff these days 🙂
Andrey
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!
tom
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:
By the way, if you want numbers instead of (a), (b) and (c), you would need to change \thesubfigure command. E.g.:
Does this answer your question?
Cheers,
Tom
Axel
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.
tom
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}:
With the tocloft-package you can control the design of table of contents, figures and tables.
Cheers,
Tom
Kathleen
Thank you for this!! I know this is like 3 years old and you might not even see it, but I’m trying to get my dissertation turned in and this was the last formatting problem I had, and now it’s fixed and I can go to bed!
tom
Hey Kathleen,
I’m happy, I could help. I wish you all the best with your thesis :-).
Tom.
Jon
Ditto Kathleen– I’m just finishing my thesis and this was one of the last things I had to fix. Thanks for the help!
John Stasko
It doesn’t seem to work for me.
Firstly, it doesn’t change my \tableofcontents, but that’s not where the real problem lies. It’s in my \listof{diagrams}{List of Diagrams}, since I’m using the float package.
I’ve got the following packages loaded, maybe it’s too much:
float, tocbibind, tocloft.
Thanks!
John Stasko
Well my solution for now was to insert some hard spaces “\ \ ” into the caption for the diagrams.
tom
Hey John,
The solution I gave was specifically for the space available for figure numbers in the list-of-figures. If you have the same issue in the
tableofcontents
, say withsection
, the command would be:You can find a complete list in the tocloft documentation.
Now when it comes to a custom list that you define yourself, that’s a completely different story. If you provide a minimal example, I will try my best to help.
Best, Tom.
Lydia
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:
but that doesn’t seem to work for the tables.
Thanks!
Lydia
tom
Hi Lydia,
Sorry for my late reply. Actually, you can suppress the page numbering on individual pages with the following command:
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
Monti
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?
Tom
Put the following before your
\begin{document}
:Remove the following from wherever you do not want to restart the second number at 1.
Peto
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
John Stasko
Peto, use
when you write your captions.
tom
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:
Cheers,
Tom
Kate
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?
tom
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.:Hope it works now,
Tom
Vivek
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
tom
Hi Vivek,
Do this:
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
Andreu
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.
tom
Hi Andreu,
You have to redefine the table counter (\thetable) as follows:
Define your own counter.
Tell Latex to replace the existing table counter with your new counter “mytable” and increase it everytime you use it.
To answer your second question, you can set the page counter to any value:
Cheers,
Tom
kobby
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.
can this be done.
Thanks
tom
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
Andreu
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.
tom
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
Andreu
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.
Anne
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?
Anne
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
Susan
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}
tom
Hi Susan,
Usually, if you want to add something to the table of contents (TOC), you can use “addcontentsline”, e.g.
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
Bimal Naik
Hi, Tom
Thanks to you for such nice & needful reply.Your reply is solve my problem of adding list of table & figure entry to TOC.
Jakob
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
tom
Hi Jakob,
Susan had a related question. I would suggest you use tocbibind.
E.g.:
If you don’t want the TOC to be listed in itself. Tocbibind will add almost everything to the TOC by default.
Cheers,
Tom
Susan
ok, liststotoc did the job (not listtotoc as I have been trying before) ..
cheers
susan
Jenny C
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{} is “Figure 1.1:” I’d like to get rid of the colon waiting for text…
tom
Hi Jenny,
You can solve your problem using version 3 of the caption package:
If you don’t have the latest version of caption, the obsolete package caption2 can also solve the problem.
Which basically set the label delimiter to nothing.
Cheers,
Tom
Moosa
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
tom
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:
Cheers,
Tom
Phil
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}
Roxanna
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!
tom
Hi Roxanna,
You were right, just use
\caption[Your list of figure text]{Your long caption text}
Tom
luzmara
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
Maggie
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…
Many Thanks in Advance.
tom
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:
Cheers,
Tom
Ken
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:
to add the list of figures and
to add image in my thesis. So what command should i add in order to make what i want? Thanks
tom
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).
2. The easier way would be to use the “tocloft”-package:
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}:
Cheers,
Tom
Maggie
Hello Tom,
Thank you so much for your reply. I actually tried that earlier, but it gives me an error message
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
Ken
Hi, Tom,
Thanks for your answer. When I insert
before
\begin{document}
, I find that all the figure no. mess up. Do I need to add a line in between:so as to fix this problem. Many thanks!
Cheers
Ken
Another Ken
Hi Ken !!
Please, I need help !
What did you do to fix the that wrong figure numbering ?
I use the code:
And, in fact, every figure number is crazy, I mean: By now Figure 1 is Figure 38, Figure 2 is Figure 42, Figure 3 is Figure 47 and so on. I don’t know what to do.
Please, let me know what did you do..
Thank you in advance….
Another Ken
Well, I’ve found a solution: (Actually I’m not sure about how, but it works fine)
Just take this line away:
Just delet it, and everything is gonna be OK.
Enjoy !
Jag
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
tom
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
simo
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
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
tom
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:
to
Cheers,
Tom
Gaby
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
tom
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.
Let me know if this is not what you were looking for.
Cheers,
Tom
Jon
Hi, great blog. Anyway, in my table of contents I need the word ‘Chapter’ before my chapters, but if I add the code:
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).
tom
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:
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
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:
Cheers,
Tom
Gaby
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
Jon
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):
and then adding my bibliography or list or whatever to the Table of Contents where needed via:
Jag
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
Neil Murray
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.
tom
Hi Neil,
You can easily change the titles using the “tocloft” package:
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, \Huge
.Cheers,
Tom
Neil Murray
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.
tom
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:
Hope this works out,
Tom
Neil Murray
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.
Philipp
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
tom
Hi Philipp,
Thanks for your comment. You can actually add anything you like to the table of cotents by using the following command:
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
Philipp
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
tom
Hi Philipp,
Simply insert a page break before your lof/lot:
Cheers,
Tom
Rand
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
tom
Hi Rand,
Using the following command, you can produce the word “Page” in your toc/lof/lot (just replace X):
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
gizmo
Hi tom,
I’m trying to use your suggestion for Rand with pdflatex, and on the “first compile” (first time through pdflatex), it seems to add the desired string to the toc. However on the “second compile” (second time through pdflatex where page numbers are resolved, I guess), pdflatex flags the string in the toc file as an error.
Thanks,
gizmo
tom
Hi Gizmo,
Thanks for pointing this out. I had a look at the problem and you are right, the code I posted is not working very well. However, I found this, which seems to work smoothly:
Add the lines just after you produce the toc/lof/lot.
Tom.
Robert
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.
tom
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:
Cheers,
Tom
yan
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
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
tom
Hi Yan!
First of all, I always get errors if I use underline (“_”), so trying to escape them with a backslash might help:
What might have happened is that you are trying to include files which do not yet exist. If so, just comment out the
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
yan
thank you Tom, here is all the code
yan
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??
tom
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
yan
Tom, is this the link for the new package??http://www.tug.org/protext/
protext is the same thing as miktex?
tom
You can get the latest version of MikTex from here:
http://www.miktex.org/
Cheers,
Tom
yan
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
yan
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.
yan
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.
Shane
Thanks! Your answer to Axel mostly fixed my problem.
However, I had to use
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!
yan
i dont know why i have dash instead of bullet?? when i use itemize
it seems like its the default parameter.
tom
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
yan
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.
yan
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.?
yan
even with the last update of babel package , same thing.
yan
the german package for babel works perfect for itemize
what the hell with these french 🙂 complicated
please Tom help
tom
Hi Yan,
You can use
in the preamble after loading the babel package.
Tom.
yan
i just find it on the
\frenchbsetup
, exact, you’re right TOMthanks
Ali
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.
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
tom
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.
yan
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
tom
Hi Yan,
Check out the minitoc documentation available in both, English and French.
Tom
Ed
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
tom
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
Jing
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:
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
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:
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.
tom
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.
Oguzhan
Hi,
very useful blog. thnx
I have a question,
I use
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
tom
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.
Oguzhan
Hi Tom,
appreciate for your help.
i tried all but still no entry in toc.
any more idea?
thnx
oguzhan
joker
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
tom
Hi Joker,
Adding the word page before the page number can be achieved using the tocloft package:
See the tocloft documentation.
Concering your second question, please refer to my previous comments on this article, e.g. here.
Cheers,
Tom.
Fatima
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
tom
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:
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.
yan
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
yan
i mean Tom 🙂 sorry
yan
i got it, just use multicol package .
luzmara
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,
yan
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??
Chris
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.
tom
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:
Cheers,
Tom.
morris
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.
tom
Hi Morris,
Here is how you can omit the dots and the page numbers in the list of figures:
Please see my previous comments or the tocloft documentation on how to add “Fig.” in front of every entry.
Tom.
morris
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!
yan
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.
Neil Murray
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.
Susann
Hey Tom,
is there a way to reduce the vertical space between entries in the list of figures / list of tables?
Thank you!
Susann
tom
Hi Susann,
The tocloft package should solve your problem. Check out the documentation here.
Cheers,
Tom
Kay
Hi,
I have a couple of figures in my appendix. How do I get rid of appendix figures listed in ‘List of Figures’.
tom
Please see my post on that topic:
http://texblog.wordpress.com/2010/05/02/excluding-items-from-list-of-figures-list-of-tables/
Cheers,
Tom
AnneDi
Hi, I need to show entries in list of figures like
Figure 2.1 ——————
Figure 2.2 ——————
like that.
but it shows like
2.1 ———————–
2.2 ———————–
does anyone has any idea how to do this?
tom
See my answer to Carlos question below.
Thanks,
Tom
Dan
I’m writing a technical document with a lot of figures, mainly in several appendices. Ideally, I would like each appendix to have its own table of figures instead of having hundreds of figures listed in the main document’s TOF. Is there a way to do this?
Thank you.
tom
Try the minitoc package (26MB documentation!), which I wrote about some time ago:
https://texblog.wordpress.com/2008/09/15/create-small-tocslofslots-using-minitoc/
Best,
Tom.
Sebastian
Hi,
I have a text with an appendix consisting in a lot of figures, and I don’t want them to be in the list of figures. How can I force the command \listoffigures to display only the figures in the chapters?
Thanks
tom
Please see my post on that topic:
Excluding items from list-of-figures / list-of-tables
Cheers,
Tom
Carlos
Hi everyone!
How do I get my list of Figures to show a list like:
Figure 1. Blah Blah
Figure 2. Blah Blah
etc…
Please help me out here, it’s for my thesis.
tom
Hi Carlos!
To have Latex put the word “Figure” in front of your number, use the following package:
Redefine the way how list entries look by using these commands:
Cheers, Tom.
Katja
Thanks Tom for your great site, I was looking everywhere for an answer to this. You are the hero of the day! x
sv
Hi Tom,
I enjoyed and benefitted from many of your postings. In a article document class, I use figures, tables, supertabular, and some of them are in tabular and tabularx environment. My huge table defined by supertabular is in landscape orientation.
Now I want to caption all of them as Exhibits, placed after all the text and I want figures, tables, etc. to be in same sequence.
I have tried this:
Now: 1) The commented out lines do not serve my purpose, and I have to type in the exact numbers of figures as 16 in \addcounter. (I have placed 16 figures, and then my tables follow)
2) Still, the first table (large one, but in table environment and portrait) is numbered as Exhibit 17, and the next table is numbered as 19, 20, 21, 22….
Where did I slip?
Thanks,
SV
tom
Hi sv,
If you use only one counter for both, figures and tables, it will do the trick.
In case you want to have a “List of Exhibits”, you will also need to change the title of the list of figures:
\renewcommand\listfigurename{List of Exhibits}
and make sure your tables are added to the list of figures.Cheers,
Tom
sv
Hi Tom,
Thanks for the help. But I get some errors.
This is my code:
The error message I get is
Runaway argument?
{\protect \refstepcounter {figure}\the figure \par \par \thispagestyle \ETC
! File ended while scanning use of \@argdef.
\par
filename.tex
Thanks,
SV
sv
Hi Tom,
I found a solution, now. The codes I used are as below:
Now I get all figures captioned as Exhibit 1, Exhibit 2,… Exhibit n and the the tables follow with captions Exhibit n+1, Exhibit n+2,….
This is an article and not a report, and so I don’t need the list of exhibits.
Thanks,
SV
Javier
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 “Lista de ffiguras” , what can I do?
Is a compilation problem?
Thanks
tom
Hi Javier,
Check out my comment on that topic
Tom.
Mary
Hi, Tom,
I am using report document class to write my dissertation. My table captions are so long that they enter the columns of page numbers in list of tables. How can I make each line of the entries shorter?
Another question: how can I force the end of the pages in list of tables to redistribute entries to avoid a widow entry on the last page?
Thanks a lot.
tom
Hi Mary,
Your first question is easily answered:
Your second question is more difficult and I probably won’t be able to answer it to your satisfaction, since it depends on how flexible you are with your document. Basically, you have several possibilities, I could think of. You could change the margin of the page and squeeze the last entry on the same page as the others. Or you might think about changing the font size or spacing between lines of the list of tables/figures. I am sure there is a way to redistribute entries, but I wouldn’t know how to do it.
Cheers,
Tom
Jaime
Tom, you rule with LaTeX.
Greetings.
Sandeep
Hi Tom,
I am writing my thesis and I need help regarding spacing of the entries using ‘\listoffigures’. I want that the entries that span across 2 lines should be more compact. In other words, I want to change this spacing manually ? How can I achieve it ? Thanks.
Sandeep
tom
Hi Sandeep,
The tocloft package can fix your spacing problem. Please check out the documentation at: http://mirror.switch.ch/ftp/mirror/tex/macros/latex/contrib/tocloft/tocloft.pdf
Thanks,
Tom
Mads
Hi Tom, I am working on my masters thesis and just wanted to thank you for this very useful information!
Greetings
Chris
Hey Tom, nice work!!!
However i still got a question:
the figures in my bachelor thesis are numbered as follows: 1.1, 1.2, 1.3, 2.1, etc.
i also have an introduction with two figures in it.
unlike the other figures they are numbered 1, 2.
Now how could i change that to 0.1 and 0.2
thanks in advance
chris
tom
Hi Chris,
Assuming, you are suppressing the numbering of your introduction chapter, the following code does the trick:
Cheers, Tom.
Chris
Works absolutely perfect!
tom, you’re a genious!
Ray
Hi Tom, I have a question about the list of figures command. In my thesis i have long captions for figures, but want to keep them like that in the lof. however as they are long, rather than wrap to the next line, the entries in lof just go off the page. any ideas how i can stop this, and get them to wrap to the page and not go off it? cheers!
tom
Hi Ray,
Please post a minimal example, so I can see what you are doing. I tried what you described above, but the caption wraps perfectly in my list of figures.
Thanks, Tom.
Ray
after posting here i accdeintly found the cause! i asn’t using the “breaklinks” in the \usepackage[breaklinks]{hyperref} declaration. all working now though. many thanks for the quick reply though, and all the other above advice. I’ve used most of it!
Catarina
Thank you so much for the existence of the site!! I have been looking for the answer for this problem since ever!
Thank you Ray for, even solving your problem alone, posting here the solution..Thank you so much!
Thank you Tom too. I’ve used many of your advices 😉
*
Roland
Hi,
I only want to display important figures in my list of figures. Therefore I have to suppress some figures in order not to be shown. How can I do this?
Thanks, Roland
Roland
Ok. I got it. \usepackage{caption} does the job.
\caption[]{Caption}
vicen
Hi, my associated problem is that the first page of the list of figures or list of tables the number of pages do not appear (and I think I have not written any strange command), any idea why or how to solve it?Thks!
tom
Please include a minimal example in order to illustrate your problem. Thanks, Tom.
Kosala
[LaTex source code removed]
————————————————-
Problem: This gives an error “No room for a new \write”. Could you plese tell me how to resolve this issue?
tom
Hi Kosala,
Please give me a minimal example that I can copy into my editor and run. It should not contain any
include
commands, since I don’t have these files. Use blindtext if necessary. Also, please remove any personal style files.This guide may be of help to create a minimal example: Creating a LaTex Minimal Example.
Thanks,
Tom.
Amani
Hi every one
I have problem in the list of tables since I merge each three tables in one caption… the problem that I want to make the number of page that appear in the “list of tables” like this for exaple 20–22 …I try to change it in the LOT file but I dont know why it is not working ,, the PDF file does not apply the change, not that I latex the source file first then change the LOT file than I get the PDF file
does any one have a solusion and I will be very greatful … thanks in advance
Amani
tom
Hi Amani,
Thanks for your comment. Please post a mini-example that illustrates your problem, so we can help solving it. Thanks, Tom.
Flaces
hi Tom
honestly its wonderful blog, and well kept by all/you.
I have two questions, and I put the code for clarity.
1.
When I refer to a subfigure as: Figure~\ref{fig1}, then what I get in the output is: Figure 1a. While I need to have Figure 1(a)?
2.
As you can see, there are three data rows within each cell; I need to color the second and third data rows with bit lighter shades of gray, such that it does not include the first common column (e.g. row1), and the color should not cover the vertical lines getting in between the cells.
Further, how can the vertical lines and horizontal lines can be changed to some other style like dashed or dotted?
Thanks in advance.
tom
Hi Flaces,
Wow, you have quite a few questions and it took me a while to figure out how to solve them. Let me start with your first question.
1. I suggest, you combine the references of the figure and subfigure:
This should produce the parentheses. It needs more typing, but you don’t have to redefine any commands.
2. Rowcolor, the trickiest part and also the ugliest I have to say. Here is a possible solution. I colored the columns and set the rows back to white. The problemes start with the title row, because there “Column1” sits in the middle of the cell and therefore, coloring the row will overwrite it. Hence, we have to set every single cell to white. I still hope, this solution is acceptable.
Dashed line:
The first number is the dash width and the latter the space width.
Best, Tom.
Yallen
Hi Tom, glad to find this useful blog. I have a question.
I used the command \titlecontents in the titletoc package to format the entry of lof. The following is the code.
I defined
\figuretitlename
as “FIGURE” to make it appear in each entry of lof. However, when caption is long. The whole multi-line entry is left aligned, like thisFIGURE 1: AAAAAAAAAAA
AAAAA
So my question is how to make it aligned after the colon
FIGURE 1: AAAAAAAAAAA
AAAAA
Well, I try to use short and one-line captions but some have to be long…
Thanks in advance.
tom
Hi Yallen,
Here is how you can solve your problem:
Tom.
Sri
Hi,
I’m working on my thesis. There is a strange problem I encountered. My headers are meant to display the chapter name. When there are upto 2 sections in any chapter, this header works fine. Whenever a 3rd section is inserted the header does not display the chapter name from that page onwards for the rest of the chapter. I’m quite new to latex and unable to figure out what is causing this. Any help would be greatly appreciated. This is the part of the template I’m using
and for including the chapters:
Thanks in advance!
arnab
Can u please help me how can I add list of figure,list of table with page number in the contents?
like:
list of figures………I
List of table ………II
1. Introduction……….1
tom
Hi Arnab,
You have to add them manually by using
just after the list of figures, list of tables command respectively (toc: table of contents).
If your lists take more than a single page, the page number will be wrong, but that should do the trick:
Tom
Hrvoje
Hi, Tom. So happy to find this blog. I have two questions.
1) in my paper, i use head/footrule, which must be included on every page but title page. when i used
in preamble, i lost head/footruler on first 3 odd pages, which include toc, lof and lot. on 7th page i have first section, and from there on everything is just fine.
2)my figure captions can be quite long, so it takes more than one line to write them. this is what i get in that case
figure 1.2 texttexttexttexttexttexttexttexttexttext
texttexttext………………………………n
and this is what i want
figure 1.2 texttexttexttexttexttexttexttexttexttext
texttexttext………………………..n
Thanks in advance!
Best regards
tom
Hi Hrvoje,
Sorry for the late response and thanks for your comment. To answer your questions:
1) You can force header and footer with fancyhdr using the
addtocontents
command. The following example shows how to do it for the toc:2) I’m surprised you are having this problem. By default, multi-line entries in the index should be aligned. Try updating your LaTeX distribution if you haven’t done so for a while. If that doesn’t help, please send a minimal example.
Thanks, Tom.
magya
Hi Tom,
when I generate the list of figures, the list comes out with:
Figure 4.1:. figure caption….
Figure 4.2:.
How do I get rid of either the : or the . from Figure 4.1:. ?
I have only used \caption and nothing out out the ordinary.
thanks
M.
tom
Hi Magya,
Try specifying the separator yourself using the
tocloft
package:If that doesn’t help, please send me a minimal code example that illustrates the issue.
Thanks, Tom.
Ankit
Hi Tom,
I am using following packages,
When i give
\listoffigures
, latex makes list of figure as,1.1 Captio
but when it becomes 1.10 it shows, 1.10Caption, i want to add space in between and when i use tocloft, it gives me a bunch of error.
Thanks,
Ankit
tom
Hi Ankit,
I’m not sure, why you only have space for “three digits”. I tried and this only happens when my chapter and section both are two digit numbers. But there is another way to solve your problem actually and you were on the right track. You can still use the
tocloft
package, but you’ll have to load it with thesubfigure
option:It shouldn’t matter in what order you load the packages.
Good luck! Tom.
Ankit Srivastava
Hi Tom,
Thanks for the reply.
The problem is because i am defining
and this was creating an error
I did huge trial and error and modified the following line in amsbook.cls
which was initially
I don’t know why but it solved my problem, also i am not able to use
It again gives me a lot of error. But i will get back to you later right now somehow its working. 🙂
I really appreciate your help. This is a very useful blog, I learned a lot.
Thanks again,
Regards,
Ankit
isharp2
hi Tom,
You have helped so many. I am writing a thesis and the requirement for the \tableofcontents is that when the table of contents spans multiple pages (which mine does), I must find a way to put a title on each new page that says “TABLE OF CONTENTS (continued)”. By default, “TABLE OF CONTENTS” is only printed on the starting page, and I dont know how to change the name of the title on pages after the first page”
I have already done:
\renewcommand{\contentsname}{\begin{center}TABLE OF CONTENTS\end{center}}
any advice on how to do this?
tom
Hello!
Thanks for that question!
I attached a piece of code. Just save it to a Latex style file (e.g. toccontd.sty) and copy it into your document directory. Finally, add
\usepackage{toccontd}
to your preamble. Feel free to change it according to your needs. It won’t be compatible with any other packages modifying the table of contents or at least I didn’t check.Hope it helps!
Cheers, Tom.
isharp2
Hi Tom,
Thanks for writing this.
When I try it, I get the error:
\table@of@cont …tyle {plain} \@makeschapterhead
{TABLE OF CONTENTS} \@star…
l.104 \tableofcontents
tom
Hi there! Please provide a minimal example so I can reproduce the error. Thanks, Tom.
Flaces
hello Tom
I am writing a paper using
\documentclass[journal]{IEEEtran}
by default, it makes the contents inside \begin{abstract}..\end{abstract} bold, which I dont want. There is a IEEEtran.cls file which perhaps is making it bold. I tried to comment out a few lines which I thought are making the abstract as bold, but it did not work. Perhaps I need to do some more steps, before it would be visible in my document. Could you please guide how I can get rid of this bold and make it instead italic?
I am using WinEdt/Miktex/Latex.
Thanks in advance.
best regards
Flaces
tom
Hi Flaces,
I downloaded the class-file (IEEEtran.cls) from here CTAN and copied it to my document directory.
If you go to the abstract definition in IEEEtran.cls (line 3709) you’ll see a
\bfseries
on line 3711 which makes the abstract bold. Replace it with\itshape
.That worked for me. Cheers, Tom.
Flaces
Thanks Tom; it works when I put the IEEEtran.cls in my document directory. I guess it would be possible to make it permanent by doing the same step in
C:\Program Files\MiKTeX 2.9\tex\latex\ieeetran\IEEEtran.cls
I tried, but it did not work; I did Refresh FNDB in MikTex, but still it does not work. Am I missing some step?
thanks in advance.
regards
Flaces
tom
Hi Flaces,
Unfortunately, I am not very familiar with MiKTeX and it’s directory structure. This manual might provide some help…
Cheers, Tom.
marianie
Hi Tom
I want to leave an empty space of =5cm at the top beginning of my chapter (On the first page of my chapter only). The rest of that chapter’s pages should have top margin=3cm. How can I do that?
I tried, but I got top margin=5cm for the whole chapter.
tom
Hi Marianie,
Please have a look at the LaTeX / Page Layout on Wikibooks. If this does not help, you may want to send a minimal example to help me understand your problem.
Thanks, Tom.
Divya
Hi,
I need to remove the page numbers that come in front of each figure caption after using \listoffigures.
How do i do that?
Thanks
Divya
tom
Hi Divya,
I’m not sure I understand your question. By page numbers, do you mean the figure number in front of the caption? Depending on your document class, this would be “chapter.figure” or “section.figure”. You can redefine the command using:
\renewcommand\thefigure{}
. But this would obviously delete the figure number throughout your document. See the caption package documentation for more details.If this is not what you were looking for, please provide more details or a minimal example.
Thanks, Tom.
Divya
Hi,
I mean when we use \listoffigures command, we get the figure number, caption alongwith the page number on which the figure appears. So I want to remove the page numbers which it automatically shows.
e.g. List of Figures
1. Caption of figure——————-Page number(on which it appears)
So what shd i be doing to remove the page numbers as indiacted above?
tom
Hi Divya,
Here is how you can suppress the page number in your list of figures:
Cheers, Tom.
flaces.edn@gmail.com
hello Tom
I have an issue with vertical alignment of text within cells of tables, which is always aligned to top. I need to vertically align it in the middle so that it looks better; I am using:
In this case, $U$ aligns to the top of its cell and looks bit not ok.
Thanks.
Flaces
tom
Hi Flaces,
The easiest solution would be to use the array package and its
m{width}
column type:If this is not good enough, try the
tabularx
package or see this table summary document, which has nice examples.Best, Tom.
flaces.edn@gmail.com
Hello Tom
thanks.
your code runs fine, but the providing widths manually is bit cumbersome, as I have too many tables. Even in my case, the text/maths is crowded to the top/bottom horizontal lines, and looks not ok.
Seems tabularx is a way to go, as apparent from the tables given in the link, but somehow the code gives errors in my IEEEtran document. I am interested to generate Table.14 in my doc, which hopefully will fulfill my need. So could you please sent a code of a single row with cells aligned center hori/vert. both.
thanks in advance.
Isa
Hi Tom,
When I try to include a list of figures, I get an error “bad math environment delimiter”.
But, there is no math environment in my captions. I already tried to rename all caption with simple numbers, but I still got the error.
The point is that everything was okay an hour before, and I really do not know what I might have changed.
I use this header:
Do you have any idea what the problem might be?
Thanks, Isa
Isa
Me again, I still do not know what the problem was, but I opened the .lof file and deleted some things that might cause troubles and now everything is fine again 🙂
Sorry to trouble you, but I was just so frustrated…
tom
Hi Isa,
No worries. It is often a good idea to delete all meta files latex generates if you get errors that do not seem related to what you just changed. Just make sure you keep the source files :-)!
Cheers, Tom.
flaces.edn@gmail.com
hello Tom
I have a problem with Table numbering; there is one main table, and two subtables; when I refer to the sub tables, it gives number IIa, IIb, while I expect Ia, Ib.
If I change caption=true, then the problem is solved but the figure caption is no more footnotesize, which is not desired.
Please help; thanks in advance.
regards
Flaces
——
tom
Hi Flaces,
Interesting, it works fine when I run you code, so you may have an older version of the IEEEtrans class file (or me). Have you tried
\subref{t1}
?This may also be helpful, they propose to load the caption package as a sub fig option (see Errata):
Actually, I see double table numbers when using the command above. So hopefully, it will remove it in your case :-).
Tom.
Yallen
Hi Tom,
Ask you for help again. It is about the page numbers after entries in the list of figures. For a multiline entry, the corresponding page number is placed after the last line. My question is how to put it after the first line of entry (like the following way).
Chapter 1 word word word word page #
word word word
Thank you!
Yallen
Dayo
I am writing my thesis using the memoir class. I put my nomenclature list immediately after the List of Table. However, the top of the second page of my nomenclature is still showing as if it is part of the List of Table. How do I solve this problem
Dayo
Hi Tom,
It is me again, When I say the top of the second page I mean the header of the second page of the nomenclature list is showing List of Tables rather than nomenclature. Thank you for your assists.
tom
Hi Dayo
It’s hard to help without seeing your code. It would be helpful if you provided a minimal example. Nevertheless, I can give you a place to start. I assume you are aware, that you have to generate the Nomenclature index using
makeindex
and you have the *.nls-file along with your *.tex-file. Now one thing I can think of and you might want to try is to start a new page after your table of contents. This will make sure, the table of contents is completed:You may also want to have a look at the first few pages of the package documentation.
Cheers, Tom
christi
so helpful! you can’t imagine for how long i was looking for it! a grand thank you!
Fred Durao
Hi Tom,
I guess you can help me with this post:
http://tex.stackexchange.com/questions/28512/how-to-align-the-captions-in-the-list-of-figures
Thanks in advance,
Fred Durao
tom
There you go:
Found here 😉
Cheers, Tom.
Fred Durao
Many Thanks Tom,
And I have to confess that I ve been to “here” few minutes ago. :))
Have a nice day.
Fred
Jacob
Hi Tom,
I have problem getting the page number of TOC right. When I add \listoffigures, the page number in TOC becomes incorrect (My list of figures is about 6 pages long). Even if I don’t include `list of figures’ in TOC, the numbering in TOC of the subsequent chapters is still wrong. If I exclude \listoffigures, everything is fine. Do you possibly know what could be the problem? Thanks!
Jacob
tom
Jacob, I answered this question before. Hope it works for you as well. Cheers, Tom.
Alan
Hi Tom,
I have a problem on my list of figure page. The figures with a long caption are out of right margin. In other words, it won’t change lines for captions. And I don’t want to create shorter version of captions. Please help me on this. Thanks.
Alan
tom
Hi Alan,
Usually, I would expect LaTeX to automatically add line-breaks. If you are using the
hyperref
package, try loading it with this option:If not, you would need to provide a short code example so I can reproduce the issue.
Best, Tom.
Afshin
Hey Tom
I am writing my thesis and have a problem with list of figures. How can I shrink the length of figs caption to avoid interfering between number and caption? I used what you suggested before {\usepackage{tocloft}}, but it makes errors saying that I already used cft…, but I didn’t use. Is there any package which is not compatible with this one? Thanks in advanced
tom
Hi Afshin,
In your list of figures, the long captions should not reach over their defined margin, LaTeX adds linebreaks automatically. You can get alternative short captions using:
You don’t need the
tocloft
package to do that. In case you are using thehyperref
package, load it with this option:breaklinks=true
.I’m not sure why you get that error you were describing. I would need to see a minimal code example to be able to reproduce it and help you.
Cheers, Tom.
Hui
Hi Tom,
I am writting my thesis.
I have a very long table using \deluxtable. It occupies several pages. As a result, in the `List of Tables’, it looks like this.
4.2 Secondary Paschen- emitting candidates . . . . . . . . . . . . . . . . . . . . . . . . . . . 80
4.2 Secondary Paschen- emitting candidates . . . . . . . . . . . . . . . . . . . . . . . . . . . 81
4.2 Secondary Paschen- emitting candidates . . . . . . . . . . . . . . . . . . . . . . . . . . . 82
4.2 Secondary Paschen- emitting candidates . . . . . . . . . . . . . . . . . . . . . . . . . . . 83
4.2 Secondary Paschen- emitting candidates . . . . . . . . . . . . . . . . . . . . . . . . . . . 84
4.2 Secondary Paschen- emitting candidates . . . . . . . . . . . . . . . . . . . . . . . . . . . 86
So how can I remove the extra citations here (for example page 81 to 86) and just looks like this
4.2 Secondary Paschen- emitting candidates . . . . . . . . . . . . . . . . . . . . . . . . . . . 80
Thanks.
Best wishes!
Hui
tom
Hi Hui,
I suggest you use
longtable
rather thandeluxetable
. You won’t have that problem with your “List of Tables” and it’s well documented. For a short introduction and some sample code see my post here.Best, Tom.
Hui
Hi Tom,
I have solved the problem by using ‘longtable’, instead of ‘deluxetable’. Thanks very much for your help!
Best wishes!
Hui
Matt
Hi,
I have a problem with listoffigures which I cant see the figures with subfigures (I used minipage), so I I have added:
and changed minipage to subfigure method.
But my compiler doesn’t like this package. I dont underestand whats the problem 🙁
tom
Hi Matt,
The
subfig
andsubfigure
are two different packages. Thesubfigure
package was replaced by the more recentsubfig
package. The floating environment is calledsubfloat
for both, figures and tables. See my post on that topic.I hope that solves your issue. Best, Tom.
Sper
Hi, Tom,
First thanks a lot for your previous answers – they have helped me a lot.
I wanted to know if it’s possible to stop LaTeX from including in the list of figures the captions of all subfigures. I am currently using the subfig package:
and I would only want in the list of figures the main caption of the figures.
I hope I worded my question sufficiently clear, if not, please ask.
Thanks in advance for taking the time!
Sper
tom
Very clear :-).
You can either use an option when loading the package or set the depth later on:
or
Best, Tom.
Sper
Thanks so much! You’re a life saver 🙂
Cheers,
Sper
Didi
Hi Tom!
Thanks a lot! I managed to insert the table of contents, list of figures and of tables reading your comments.
I have just a small question: for the figures and tables I have a quite long explanation of what they are (3-4 rows), and this is inserted in the caption section. When I run the list of tables and figures, I obtain all the explanation inserted in the caption, and it is too long to be shown in the section list of figures/tables. Therefore my question is: is it possible to have 2 titles for the figures/tables so that I can write the short title in one caption and the long in another one?
Thanks for your help!
tom
Hi Didi!
Use the optional parameter of
caption
.Best, Tom.
pma
Hi there Tom !
First thanks for all the good work ! Your blog is a goldmine :p
Had a question … didn’t manage to find this one (evnthough it ghad been asked before here ..)
I’d like to divide mi LoF and LoT by Part and chapters…
A picture worth a thousand word so …
Now I have :
List of Figures
1.1 xxxxxxx
1.2 xxxxxxxx
1.3 xxxxxxxx
2.1 xxxxxx
2.2 xxxxx
2.3 xxxxxx
1.1 xxxxx
1.2 xxxxx
1.3 xxxxxx
And i would like to obtain
List of Figures
Part 1
Chapter 1
1.1 xxxxxxx
1.2 xxxxxxxx
1.3 xxxxxxxx
Chapter 2
2.1 xxxxxx
2.2 xxxxx
2.3 xxxxxx
Part 2
Chapter 1
1.1 xxxxx
1.2 xxxxx
1.3 xxxxxx
Hope I’m clear enough ?!
Any clue ?
tom
One way I can think of is using the command
addcontentsline{}{}{}
. You could for example create a\mychapter
command which in addition to creating a chapter also adds itself to the list-of-figures.Whenever there is a figure in a specific chapter, you use
\mychapter
instead of\chapter
. It’s still somewhat manual, but it does the trick.Best, Tom.
pma
Yay ! thanks that’s perfect Tom 🙂 You rock !
Natasha
Many thanks for this useful write up I had indeed been facing some issues but thus was very helpful indeed 🙂
raquel
I didn’t make any questions but I’d like to thank tou Tom! Your tips helped me a lot!!
Didi
Hi Tom!
Sorry for disturbing you again.. I decided to put all tables and figures at the end of the paper, and would like to have a format like this:
(centered and fat)
Table 1
(title) The effect of option illiquidity
space
This table reports… (explanation of 2-3 rows)
space
table results
Because if I write the explanation in the caption, I do not get the title anymore (The effect of option illiquidity).
Thanks a lot!
Dijana
tom
Hi Dijana,
Have a look at the code below. It’s probably not perfect, but a start. Hope it’s what you were looking for. Best, Tom.
khushboo
Hey Tom,very helpful topic..Thanks a ton!!
But i am facing a problem,between the toc and lof and lot there are pages that are left blank.plus the numbering is not consistent and shifts from right to left. I need the contents numbering to come consistently and laso remove the extra pages.Extra pages are left even between two chapters at random,as not between every two chapters. Thank you for time…
tom
Hello!
Which
documentclass
are you using? There is a reason for (almost) everything that Latex does. For examples chapters in books always start on odd pages so whenever a chapter ends on an odd page, Latex leaves one page blank. Concerning the shifts from right to left, it seems you are using thetwoside
option. Have a look at this Wikibooks entry for more information ondocumentclass
options. You can change headers/footers in different parts of your document using the\pagestyle
command.Hope this helps,
Tom
khushboo
Hey !! the wiki book thing helped…and you were right the page being left was because my document class was book,i changed it to a Report and its all sorted :)thank you !!
Mike
Hi Tom,
Thanks so much for your posts. I’ve followed your answer to one of the previous questions in relation to list of figures and list of tables, but ended up with a new problem that I am not sure how to solve…
I have a template that uses the following code to generate the LOF and LOT:
I want to add Figure and Table in the LOF and LOT respectively (as in Figure 2.2 or Table 2.2 etc). I added your suggestion
\usepackage{tocloft}
\renewcommand{\cftfigfont}{Figure }
\renewcommand{\cfttabfont}{Table }[\sourcecode]
in the preamble. This solves my problem but the LOF and LOT do not appear on separate pages. I want them to start on separate pages.
How do I incorporate this into the above code or how to I modify it to include Figure and Table in the LOF and LOT and still have them start on new pages?
Thank you in advance,
Mike
tom
Hi Mike,
There is an easy answer to your question. The only thing you have to do is to end the page before creating the next index, i.e.:
Best, Tom.
Didi
Hi Tom!
Thanks so much for your help!
Another small questions: I would like to create subfigures, 4 small graphs on one page, do you think this programming is correct?
I believe there is something wrong as I receive an error message.
Thanks a lot!
Dijana
tom
Hello Dijana,
Your code is perfectly fine. Do you load the necessary packages,
subfigure
andgraphicx
, in your preamble?You may also want to consider using the more recent subfig package which replaces the subfigure package.
Tom.
Mike
Hi Tom,
Thanks for your tip, its worked perfectly when I modified the code with addition of \newpage..
Thank you!
Cheers
Mike
vagner
Hi, Tom!
I’ve been also trying to print the words Figure and Table in my ToCs, right before the object’s number. The code you’ve provided earlier works fine for that, but the page numbers just disappear from the ToCs. Furthermore, my chapter headers lose their formatting (just after including \package{tocloft} in the source). I’m using a template (which uses fancyhdr package) and I’m not experienced with latex. Could you help me, please? Thanks in advance!
Best,
vagner
tom
Hi Vagner,
There does not seem to be any conflict between the
tocloft
andfancyhdr
packages.You can try this:
If that doesn’t help, please post a minimal example that illustrates the problem.
Shah
Hi Tom,
I have also some problems to fix in my thesis appearance. I hope you can help me in this matter.
1. I want the List of figures and list of tables to appear at the end after Bibliography instead of having them before the TOC. To achieve this objective, I have moved the lines \listoffigures and \listoftables just before the \end{document}. When I compile my .tex document, both lists appear where I want them but they DO NOT appear in the TOC. How to fix it?
2. I want my Appendices to appear in TOC as Appendix A (Name), Appendix B (Name), and so on. I used
to achieve the goal. I get the following in TOC,
Appendices
Appendix A (Name of Appendix) (Page #)
Appendices
Appendix B (Name of Appendix) (Page #)
How to get rid of this extra “Appendices”? appendixA.tex is my file in sub-folder AppendixA of the main folder Thesis.
I really appreciate your time and interest. Thank you very much.
tom
Hi Shah,
Thanks for your questions. Here is what I think:
1. Easiest is to add them manually, just after your
\listoffigures
call add:However, in case the list is several pages long, you’ll have to use the tocbibind package to get the page number in doc right.
2. It seems you are using the appendix package. Here is what I did:
In my TOC there is neither “Appendices” nor “Appendix”. I’m not sure why you get these additional words in you table of contents, but you can try without using the
appendix
package (\begin{appendix}...\end{appendix}
) or provide a minimal example for me to reproduce your problem.Hope it helps. Best, Tom.
Arknodee
Hi, Tom.
So happy to find this blog. I have one question.
I want to this “list of contents”:
CONTENTS
Subject Page
Subject 1 …………………………………………………………………………………1
Subject 2 …………………………………………………………………………………2
Subject 3 …………………………………………………………………………………3
…
Hope I’m clear enough and thanks for your hints and tips :).
tom
Hi there,
Have a look at this post that shows how you can define your own “List of Something” using the
tocloft
package. It’s straight forward.Best, Tom.
Flavio
Hi, Tom.
This is a very good blog. I have one question related with figures.
I changed the numeric sequence of the images and how they apear in the List of Figures.
Code below.
Now when I do
and
\ref{fig:figura1}
the number that appears is the default (Something like 3.2).How can I do to appear my new number for figure in
\ref
Thanks for your hints
tom
Hi Flavio,
Thanks for the comment. The first thing I noticed, you define a new counter (
myfigure
) but you don’t use it. In your case, I think, you don’t actually need another counter, you can use the figure counter change the way the it’s printed.Here is a minimal example that illustrates it:
Best, Tom.
elfo
Hello,
Im trying to use minitoc in my master thesis but I cannot see any minitoc at all…
I used
\usepackage{minitoc}
before\usepackage{hyperref}
\dominitoc
before\tableofcontents
and I also used
\adjustmtc
at the end of all\chapter*
and\section*
What Im doing wrong?
elfo
Hi,
I appreciate all your help but I think that my problem is solved.
I was playing around with
\adjustmtc
and I discovered that it should be used only in\chapter*
that also use\addcontentsline{toc}{chapter}
command and not all\chapter*
.Now, if you don’t mind I have three more questions relative to style issues that I couldn’t solve yet…
1 – In minitoc, I dont want to have de “Contents” word, I would like to have no word at all.
2 – I dont want to have the horizontal lines above “Contents” and at the end of minitoc.
3 – There is any simple way to have my minitoc with the style looking the same used by my main table of contents generated by \tableofcontents command?
tom
Hi elfo,
minitoc
package is quite flexible. I’m not sure however, how much you would have to change to make it look exactly like the toc. Please refer to the manual for details.Best, Tom.
elfo
Thank you very much 😀
drwoodblock
Tom,
How do I modify your solution for adding ‘Page’ before the page numbers in the TOC to extend to the LOF and LOT?
tom
Hi there,
Simply re-new the same for figure and table by replacing
cftsecleader
withcftfigleader
andcfttableader
:Best, Tom.
Esdras
Hi Tom,
I want to get a question about how to organize the Latex bibliography, you may already have had the same problem. In my work the bibliography is arranged in order of citation, but as the list of figures and tables comes before the first chapter, the order of citations starts in the list of figure that has citations. Then, in the first chapter, the first citation does not correspond to the first of the bibliography because the first is the first that appears in the list of figures.
To the order of the bibliography starts with the first chapter of the text, list of figures and tables would have to come last. But this way the lists will appear at the end of the document, and I don’t want this.
Do you know how I can solve this problem?
Thanks for help.
tom
Hi Esdras,
If you don’t want citations in the listoffigures, use the optional caption argument:
If you wish your references to appear in the listoffigures, try the
notoccite
package.Best, Tom.
Shah
Hey Tom,
I have a problem due to running head in my thesis draft. The Summary and Acknowledgements follow immediately Bibliography. The running head on Summary and Acknowledgements pages is also “Bibliography”. The running head in the rest of the thesis until Bibliography is ok and there is no such problem. How to solve this?
I really appreciate your help and time. Thank you very much.
Shah
tom
Hi Shah,
Use
\chapter{}
or\section{}
depending on whether you are writing areport
orarticle
. Another way would be to define environments by redefiningabstract
, e.g.:Cheers, Tom.
Shah
HI Tom,
It has not solved the problem. I tell you what exactly I am doing to help you read the situation.
I have main file thesis.tex file and I include acknowledgments.tex by the following code line in thesis.tex following the
line.
The file acknowledgments.tex starts with the following two lines.
With this, when I compile the running head on Acknowledgments and Summary pages is “Bibliography” instead of Acknowledgments and Summary. I hope I have explained the situation clearly!
How to resolve this problem?
Thank you very much for your time and help.
Shah
tom
Hi Shah,
You can use the command
\markboth{left head}{right head}
. Also, you’ll have to inverse the order of\chapter
and\addcontentsline
to get the page number right.Here is a minimal example.
Please provide a minimal example next time, it will save us both time and I can help you on the first attempt. Also, you may even solve your problem while creating it.
Thanks, Tom.
Rosa
Dear Tom
This might be a silly question, but when I create the list of tables and the list of figures the figures and tables of the different chapters of my thesis appear in different blocks, separated by a space, while the tables and figures of the appendix appear immediately after the tables of the last chapter. For example
List of tables
1.1 table 1 of chapter 1
1.2 table 2 of chapter 1
1.3 table 3 of chapter 1
2.1 table 1 of chapter 2
2.2 table 2 of chapter 2
2.3 table 3 of chapter 2
and then
3.1 table 1 of chapter 3
3.2 table 2 of chapter 3
3.3 table 3 of chapter 3
A.1 table 1 of appendix
A.2 table 2 of appendix
A.3 table 3 of appendix
Any suggestions?
Many thanks
Rosa
tom
Dear Rosa
Which
documentclass
do you use? I tried to reproduce the problem you describe, and in my list-of-figures and list-of-tables, the appendices are separated by a space.Have a look at the minimal example below:
Best, Tom.
Rosa
Dear Tom
Thanks a lot for your reply. I review the code after your example and it seems to be working now,
I have another question however: is it possible to add the chapter name or just “Chapter 1” etc before the block of tables or figure in the lof/lot?
Thanks
Rosa
tom
Hi Rosa,
I’m glad my previous solution worked. Sorry for not getting back to you earlier. Here is my proposal for your question. Define a new command that creates a chapter and adds itself to the lists. The code below will add “Chapter 1” to the list of figures / tables. I included both, one example with page number (lof) and the other without (lot). You can modify it, depending on your preference.
Best, Tom
Akim Demaille
Hi Tom,
I am trying to get all my chapters numbered, and appearing as numbering in the PDF bookmarks. This looks like a task for tocbibind, but apparently it does not do that, and it is unclear to me whether this is a bug, or I misunderstand the documentation.
So basically, bellow, I would like to get the toc, tof and tot numbered.
I have found the definition of listoftables in book.cls, so I can easily use \chapter instead of \chapter*, but you might have better ideas.
Cheers!
Akim Demaille
FWIW, I also note that there is a slight difference between the handling of tableofcontents on the one hand, and listoffigures and listoftables on the other hand: in one case the typesetting of the headers (\@mkboth) is in the chapter command, not in the other one. I have no idea whether it changes something.
Akim Demaille
This is what I decided to do.
tom
Thanks for posting this. Appreciate it. Best, Tom.
Steve
This was a big help. Thanks very much.
Judging by the number of comments here, there is a real hunger for some expert LaTeX help on this topic. You are very kind to provide it.
tom
Hi Steve, thanks for your comment. I’m happy that my site was helpful to you. Best, Tom.
Frederico
Tom, your blog is very helpful. Thank you very much.
Apologizes for my bad text and if my question have already been answered before, but I want ask to you how I can solve a small trouble.
When I use the command \listoffigures, my big captions crosses the end of page and not continues in the next line below. An only possible solution is using the \caption[]{} command?
Thanks
tom
Hi Frederico,
There is no need to apologize, I’m happy to help. Generally, LaTeX automatically breaks lines in the list of figures. However, there might be packages (e.g.
hyperref
) that interfere. In order for me to help, please provide a minimal example that illustrates the problem with as few lines of code as possible. I can then reproduce the issue and suggest a solution…Best, Tom.
Anna
Hi Tom, great info. I have a problem with the list of figure of my thesis document, my captions are a little too long so that when they appear in the list there is a lot of text. How can I do in order to have just a ‘title’ of the figure in the list instead all the caption?
Thanks in advance
tom
Hi Anna,
Just use the optional argument of caption:
Best, Tom.
Frederico
Uau! Without my code, you found the problem. When I use the hyperref package, the problem appears. If I don’t use it, this problem disappears, but another problem is created. Without the hyperref package, the references in captions don’t work and the question mark (“?”) appears in its place. I didn’t send my code yet because I am using a brazilian macro for master thesis named “abntex”. This macro is used for make master thesis in accord with University’s rules. I didn’t ask this question to them because they are a open-code project that don’t have support.
Anyway, thank’s a lot.
Regards
tom
Hey Frederico!
Almost always you are not the first to encounter a certain problem and many people, like you, write about it, luckily. A quick google search revealed this. I’m not sure if it solves your problem, but you may want to give it a try…
Good luck,
Tom.
Frederico
Hi Tom,
This page didn’t help me to fix that problem. But, looking in this page (http://en.wikibooks.org/wiki/LaTeX/Hyperlinks#Hyperref) I found the solution. When I use \usepackage[breaklinks]{hyperref} in preamble, the problem vanishes.
Thanks again.
tom
Hey Frederico, I’m glad you figured out how to solve your problem. Thanks for posting the solution to your problem and good luck with your document. Tom.
dung nguyen
This is a great blog.
I have a question about my TOC, LOT and LOF.
My TOC is something like
List of Table……………..i
List of Figure…………….ii
Abstract
Chapter
1. Something……….
1.1. Something…..
2. Something….
2.1. Something….
How can I remove the word “Chapter” in the TOC?
My LOT and LOF is something like
1.1.Something…………………….
1.2.Something………………………..
2.1. Something…………………………
2.2.Something………………………….
How can I remove the double space between 1.2 and 2.2 ?
In addition, there is no page number in my LOT and LOF page even I am using
I also would like to have the identical vertical space from the top of the page to the heading of Table of Content, List of Table, List of Figure, Abstract, Chapter 1, etc and indentical vertical space from these headings to the text body.
Could anyone please help me with that.
tom
Hi there!
Please provide a minimal example that illustrates the issues. It’s makes things much easier than with just the output.
Usually, people place the
abstract
before thetableofcontents
, so it generally doesn’t appear in the list. Do you use:in your code? That may also solve the issue with the word chapter.
Which page number are you referring to, the page number of the figures or the page number of the list-of-figures?
To remove the white space between chapters in the list-of-figures/tables, try the following code. It redefines the chapter and adds a negative vertical space, removing 10pts added to lof/lot after every chapter (see here)
Concerning the spacing, here is a nice Q&A that explains how to change space before and after chapters. For the toc/lof/lot, I suggest the tocloft package.
Best,
Tom.
dung nguyen
Hi Tom,
Thanks very much for your reply.
Regearding the page number: Right now, on LOT and LOF pages, the page numbers are blank. I want them to show up.
Regarding the TOC: I want the word “Chapter” in TOC to be removed.
Please see blow for my minimal example.
Thanks
D
[…]Code removed by Tom.[…]
tom
Hmmm, that was more a maximal example if anything like that even exists. Please remove all non-standard packages (e.g. sw20utah) and any code/text that is not required to illustrate the issue. It shouldn’t be more than the bare minimum, usually only a few lines of code which I can run in my editor.
Thanks, Tom.
Neil
Hi Tom,
I have few questions if you could please answer them with your expertise.
a. The chapter heading in the toc is touching the page number in the right hand side of the page. How can I make the heading in two lines when it is long enough to touch the page number in the right?
b. I am able to manage the double spacing between the chapter heading, section heading and subsection heading but unfortunately, not able to make a double spacing between a sub-sub-section in the toc. How can I get a double spacing for all in toc?
c. The captions of the figures are italics in my document. The captions also has a citation for example: Figure 2.1 Figure Caption [2] (but all of these are italic). I want the entire caption to be italic except the citation. How can I get the citation a normal text with caption italic?
Thank you for wonderful support the latex learners like me.
Neil
tom
Hi Neil,
hyperref
package, which is the more likely cause. Use the following option to fix it:report
document class, I only get white spaces between chapter entries. Can you please provide a minimal example that illustrates white spaces forsection
, etc.To change the caption back to normal text use:
Best,
Tom.
Nam
Hello,
I’m having an issue where for the “List of Figures”, the entries over-run the bottom of the page, spilling into the bottom page number and out of the established “text area”. Is there a reason for this? Should I “renewcommand” the text area for this page in particular?
Any help would be greatly appreciated.
Sincerely,
N.
tom
Hey Nam,
I need to see what packages/documentclass and other commands you use. In general, LateX will break the list-of-figures automatically. You could manually add a page break, but I’m sure there is a cleaner way to do it.
So please provide a minimal example. Thanks!
Best, Tom.
Nam Nguyen
Much thanks for the prompt response!
Attached is the relevant code that produces the same issue.
(Minimal example shortened by Tom.)
————————————————–
I had thought that this section:
Had caused the problem. I want to double-space the LOF entries and so I tried commenting it out and simply putting \begin{doublespace}. While it did add the spacing, the entries still ran off the page.
Any help would be great. I really appreciate all that you’re doing to help myself and others.
N.
tom
Hi Nam,
You were right, this is indeed the part that causes the problem. I suspect that you didn’t see the difference after commenting it out because you only compiled the document once. Is that possible? For lists, you always have to typeset them twice, first all entries are collected and then updated. There is no way for TeX to know about changes at the beginning of the document during the first run.
So briefly, just replace the code you already identified by:
That should do the trick. See the tocloft package documentation for further details.
Another minor thing, the right documentclass option is
letterpaper
. Check the log-file, there should be a warning.Best, Tom.
Nam Nguyen
Hi Tom,
I have tried previously tried using the tocloft package before, and it repeatedly gave errors of:
“! LaTeX Error: Command \c@lofdepth already defined.”
Hence why I went with the solution I had before. It appears I already have the tocloft package in the Texworks, I am reviewing the tocloft literature, but no solution appears.
N.
tom
Hey Nam,
I can’t remember if you are loading the
subfigure
orsubfig
package. If so, please try loading thetocloft
package with the following option:Let me know if that helped.
Best, Tom.
Allan
Hi Tom,
I am writing an article and need to submit an appendix online (separate from the main manuscript). Figures have to be labelled Fig. A1, Fig. A2 and so forth, but when I run the script I get these labels: Fig A1, Fig. B2. Here is my script:
Any ideas of why the numerical counter is constant (when it should not be), and the alphabetical counter isn’t constant (when it should be)?
Thanks
Allan
tom
Hi Allan,
Would it be an option to just add an “A” and forget about the counters:
Let me know if you have several appendices (section A, B, etc.) and I will help you with that.
Best, Tom.
Allan
Hi Tom,
Yes, that is certainly a good idea. Have no idea why that option slipped my mind…
As always, thanks.
Allan
tom
Glad I could help. Best, Tom.
Dominic
Hi Tom,
I’m using ctable package to generate tables, and I have a few “continued” table As mentionned in ctable document (http://ftp.ktug.or.kr/tex-archive/macros/latex/contrib/ctable/ctable.pdf) in order for the table not to be rementionned in the LoT i have to put an empty field in the mention “cap” but it does a dotted line in the list of table and the page number. Is there a way to go around this?
tom
Hi Dominic,
Thanks for your comment. I created a minimal example and you seem to be right, I had the same problem with the
cap
option of thectable
package. I’ll contact the author. In the meantime, you may want to use thecaption
package as a quick-fix:Best, Tom.
Dominic
Just to let you know, as soon as I used the caption package the problem with the cap option of the ctable package was solved.
THK!
tom
You are right, thanks for the update! Tom.
Ilknur
I have a question about list of figures. In the dissertation style description, it says “List of figures: If an entry takes up more than one line, break up the entry about three-fourths of the way across the page and place the rest of it on a second line, single spacing the two lines. Double-space between entries. ” How can I do that for list of figures. I don`t have to change the captions under the figures. I have to change the captions in the list of figures. Thanks
tom
Hey,
Jeffrey J. Harden provides a template that solves the single-space problem. You can copy the relevant part of the sty-file into your preamble if you don’t want to use the template. However, I’m not sure how to change the length of the first line for multiline entries.
Best, Tom.
Daniel Meyer
Hello Tom,
great blog. You seem to know a lot about LaTeX. I have the following problem, which is driving me crazy. Any help would be very much appreciated.
In the list of figures (generated by \listoffigures) there doesn’t seem to be enough space for the figure-numbers allocated. This means the figure-numbers partially overwrite the captions. The document class that I’m using is “surv-l”. This is provided by the AMS (for their “Surveys and Monograph” series), which is a modified “amsbook” documentclass. The problem is that this seems to be incompatible with “tocloft”. Just including \usepackage{tocloft} (without any actual usage of the package) results in an error
ERROR: Missing } inserted.
— TeX said —
}
l.33 \tableofcontents
As I said before: I would be extremely grateful for any help. Best,
Daniel.
tom
Hi Daniel,
Thanks for your question. Please send a minimal example for me to reproduce the issue.
Thanks, Tom.
Kaur
Hi,
basically i am to submit my report table of contents page in the format shown below.Plz guide
INDEX
Chapter Page No.
1. Introduction
1.1 : Introduction to your domain
1.2 : Problem statement
1.3 : Project objective
1.4 : System requirement.
2. Literature survey
2.1:
2.1:
2.3:
….
i also need to display list of figures and list of tables title in center line in bold and uppercase format.
Another prblm i am facing is i dont knw how to make list of abbreviation.
Plz guide.
Thanks.
tom
Hi Kaur,
I’m not sure I understand the details of your question.
To change the title for the lists, use:
To add the word Page No., see this post.
This post will help you to define a list of abbreviations. Or, use the nomencl package as shown here.
Hope it helps. Let me know if you have any other question.
Best, Tom.
Neil
Hi Tom,
I am using a \documentclass[12pt]{report} for my thesis along with \listoftables and \listoffigures to generate the LOT and LOF.
The output is like:
FIGURE 1.1: This is the first figure in my thesis with heading more
than two lines. 3
FIGURE 1.2: This is the second figure in my thesis with heading more
than two lines. 5
But I want this to look like:
FIGURE 1.1: This is the first figure in my thesis with heading more 3
than two lines.
FIGURE 1.2: This is the second figure in my thesis with heading more 5
than two lines.
Note: Where 3 and 5 are the page numbers.
The thesis guideline is that the page numbers has to be on the right end of the first line of the figure headings and table headings.
Could you please help me to get this?
Thank you in advance.
Neil.
tom
Hi Neil,
Try the following code. It redefines the list of figure entry style using a tabular. Not very elegant, but it works.
I found the code here.
Best, Tom.
Neil
Hi Tom,
Your reply solved the part of the problem. The LOF now has a single space through out. But I would like to have a double spaced between the entries.
FIGURE 1.1: The first figure 3
FIGURE 2.1: This is the first figure of chapter 5
two with a double line heading.
The spacing between FIGURE 1.1 and FIGURE 2.1 has to be double and the spacing within the FIGURE 2.1 has to be a single spaced.
Could you please tell me what part of the following code need to be changed to get this?
Thank you for your help. I really appreciate.
Neil
tom
Hi Neil,
Please read my answer to a previous, similar question.
Best, Tom.
Neil
Hi Tom,
Thank you. Problem solved.
Neil
tom
Glad you managed to solve your problem. Best, Tom.
Jimena
Hi Tom!
I am using a {book} document class for my thesis and I have used \textmd in all my sections to remove the bold formatting on the titles. However, I don’t know how to remove the bold formatting from “List of Figures” so it doesn’t appear bold in the TOC. Can you help me?
Thanks a lot
Jimena
tom
Hi Jimena,
The tocloft package provides a lot of flexibility with the toc/lof/lot formatting. Use the following commands to make the chapter headings in the TOC
normalfont
.Also, see this TeX FAQ on how to change section heading style.
Best, Tom.
Sofía J.
Hi, I’ve inserted the same figure twice, but I don’t want the second one to be shown in the TOF.
How do I do that?
Thanks 😉
tom
Hi!
The caption package will do the trick.
Sofía J.
Wow, I didn’t expect such a fast and simple solution…guess I need to learn more about LaTeX.
Thanks for the quick response 🙂
Sofía.
tom
No worries 🙂
Tom.
Whotee
Dear Tom
I need upright (non-italic) and bold \theta, \lamba, \nu, \omega such that I can still have normal variants of these greek letters. I have tried solutions given at, but they does not work for small greek letters:
http://tex.stackexchange.com/questions/30550/force-upright-greek-letters-with-isomath
Thanks in advance.
tom
Hi! I suggest you give the
textgreek
package a try. See my post for more details.Cheers, Tom.
Whotee
Thanks Tom. It works for text mode only, though I have to use them inside maths mode. Consequently I use them like this:
Not sure if the usage is correct?
tom
I couldn’t find a package that implements
straighttheta
.Seems you need bold in addition. Try this:
Cheers, Tom.
Whotee
Thanks again.
It seems that
works, while
gives variable theta (straight and bold). I think it looks ok now.
tom
Ohh, I see,
straighttheta
, along with a few others, is implemented in the textgreek package.Your code seems ok.
For normal text in math mode use:
For bold use:
Whotee
Thanks Tom. It works fine now.
gilberto
I have a problem with \ listoffigures when working with figures use the extension eps and the command \ listoffigures dosen’t work
tom
Hi Gilberto,
This works for me with
pdflatex
:Best, Tom.
gilberto
Thanks tom
Emivan
Hello, good morning.
To put the word “Figure” before the number in the list of figures I used the command:
\ renewcommand {\ cftfigfont} {Figure }
But, I had problem: I would like the result to be like this:
Figure 1 A new way to write a text
without worrying 10
Figure 2 New Horizon 22
What was obtained as follows:
Figure 1 A new way to write a text
without worrying 10
Figure 2 New Horizon 22
How do I push the word “without” forward?
Emivan
To clarify the above question. I would like the word “without” has start under the letter A, ie w stand under A.
tom
Hi and thanks for your question.
I suggest using the
cftfigpresnum
command instead to add the word “Figure” in front of the number. The rest is nicely documented in the tocloft package documentation.catherine phaneuf
I have a problem with \minilof
I am making a list of figure at the end of every chapters. In my list of figure the page number is wrong. Figure 1.1 is on page 43 and in the list of figure the figure page number is 45.
How can I fix this problem. Could I manually give my figure their page number ?
Thank you
tom
Hi Catherine,
Thanks for your comment. The minitoc package generally gives the correct page number. I suppose the problem is elsewhere. Take a look at the minimal working example below and consider reading my post on the topic. If the problem persists, please provide a minimal example similar to the one below to illustrate you issue.
Thanks, Tom.
Emivan
Hello tom thank you for your valuable help.
You are fantastic.
tom
Thanks! You are welcome. Tom.
Emivan
Tom, in the previous example how do I decrease the space between the word and the list of figures Figure?
tom
Hi!
Just play with the parameter
\mylen
. Try5em
for example:Cheers, Tom.
Emivan
Thank you Tom
Whotee
Dear Tom
I have three types of names (algorithm, Protocol, Functions) for pseudocode, so I use following lines to change the default name (algorithm):
\floatname{algorithm}{Protocol}
\begin{algorithm}
—
\end{algorithm}
Things work well, except that there is one counter for all three, while I need separate counters for them. I guess somehow I have to define new floats for them separately. I have no idea how to do it? I hope the solution would be such as to support building their lists such as:
List of Algorithms
List of Protocols
List of Functions
Second question: do you also support questions on Tikz, or know some other forum?
Thanks in advance, and best regards
Whotee
tom
Hi Whotee,
Thanks for your comment. I suggest you define your own
list of ...
for protocol and functions. I wrote an article on that topic some time ago.I’m only beginning to learn TikZ, but I will definitely try to help you if you post a question here. The best resources for TikZ are TeXample (examples) and tex.SX (support).
Hope this helps,
Tom.
Whotee
hi Tom, thanks.
I have a question on Tikz arrow head: how to make stealth type arrow head bigger without drawing a thicker line, i.e. how to control arrow head size independently.
kind regards
Whotee
tom
Hi Whotee,
This discussion should help you answer the question.
Best, Tom.
Daniel
Hi Tom
I’m using a documentclass[a4paper,12pt,oneside]{report} and I want all the pages are not numbered until chapter Introduction.
When I generate a list of figures (listoffigures) and summary (tableofcontents), the first page is numbered and the other not. For example, the list of figures comprises three pages, the first is numbered and not the other two.
I am using the following commands:
Well, I thank your help.
tom
Hi Daniel,
This should work.
Best, Tom.
Jonas
Hi,
I’m writing my thesis using LED and the scrartcl documentclass. However, when including the \listoffigures and/or the \listoftables command I receive an error message saying
Package etoolbox Error! Boolean ‘\ifciterequest’ undefined.
1.1 \boolfalse {citerequest}
\boolfalse {citetracker} \boolfalse {pagetracker}
Does anybody have an idea about how to solve this?
Thanks in advance!
Regards
Jonas
tom
Hi Jonas,
I would need to see some code to be able to help. Please provide a minimal working example.
Do you have the latest version of etoolbox and biblatex?
Thanks, Tom.
Jonas
Hi Tom, thanks for your quick answer.
As for my biblatex and etoolbox, I have no idea about the current version I’m using. will check that immediately
my header and some lines of code as a minimum example.
tom
Hi Jonas,
I have no problems running the code. Please try updating the aforementioned packages to their latest version. Not sure which LaTeX distribution you are using, TeXLive comes with tlmgr, which is a nice tool to update packages.
To check the version and update packages, use:
From my system:
HTH, Tom.
Whotee
hi Tom
I have an equation on three lines, with a single number.
I need to centralize the first line, while second line should align the first line on left side. This works well. The third line should align the second line on the right side. This does not work. I have tried other options like using align, but it does not work.
Thanks in advance.
Kind regards
Whotee
tom
Hi Whotee,
Try the following code and let me know if that’s not what you needed. Best, Tom.
Whotee
hi Tom
thanks. I sent some very simple code to let you know my question. In reality these lines of code are bit more complex and not all terms are of equal width. I make one more example to clarify my point, in which this does not work (lines 1,2 to be left aligned, lines 2,3 to be right aligned)
I really need this solution for any characters and math symbols.
Thanks, and best regards
tom
I see. It seems that you are trying to use an alignment point for only a subset of the equations. One work-around could be the
\phantom
command, which inserts a blank space of the size of its argument. Try this:What do you think?
Whotee
Thanks Tom.
Please have a look at this code:
For third row, I need to go extreme right of second row MINUS the width of the third row — so that right side of second and third rows are aligned. How can we create white space of the size of difference of two phantoms?
Thanks in advance.
tom
Hi Whotee,
I just found this on tex.SX.
Btw., you didn’t specify what
\bp{}
does or which package needs to be loaded, so I removed it in the code below.james
Hi Tom
How do I change the names of the figures appearing in the list of figures without changing their reference/caption in the actual body of text?
Cheers
James
tom
Hi James,
Use the optional argument of the
caption
command.james
Thanks Tom!
Cesar
Hi Tom,
I hope that this is not a repeated question, I’ve tried to found it here but couldn’t.
I have two commands which are relevant:
\tableofcontents
\listoftables
I do not want the table counter on. I was able to turn it of for the sections using \setcounter{secnumdepth}{0} but I am not able to disable this for the table *(using \setcounter{lotdepth}{0}. To help, what I actually have is
S1 Geometry of hydrogen bonds and short intramolecular contacts. . . . . . . . . . . S3
S2 Crystallographic data of complexes 2 and 4 . . . . . . . . . . . . . . . . . . . . . S4
S3 Crystallographic data of complexes 7 and 8 . . . . . . . . . . . . . . . . . . . . . S5
S4 Crystallographic data of complexes 9, 10 and 11 . . . . . . . . . . . . . . . . . . . S7
and what I want is
Geometry of hydrogen bonds and short intramolecular contacts. . . . . S3
Crystallographic data of complexes 2 and 4 . . . . . . . . . . . . . . . . . . . . . S4
Crystallographic data of complexes 7 and 8 . . . . . . . . . . . . . . . . . . . . . S5
Crystallographic data of complexes 9, 10 and 11 . . . . . . . . . . . . . . . . . S7
Is there a way of doing this?
Thanks!!!!
tom
Hi Cesar,
Just set the table counter to “nothing” and use the tocloft package to get rid of the additional white space reserved for the number in the list-of-tables.
HTH,
Tom
Cesar
Thanks for your answer!!!!
tom
You are welcome! Tom.
pahadiNirmalya
Dear Tom,
I am using \listoftables, \listoffigures and \tableofcontents to generate the LOT, LOF and TOC. I am including the various chapters in my thesis as separate \included tex files. I also have appendices. My problem is the TOC, LOF, LOC – all of them appends a “Figure” to the numbers.
e.g. in TOC instead of Chapter 1, it shows as Figure 1, instead of Section 1.1 it is Figure 1.1, Table 1.1 becomes Figure 1.1, and the appendices show as Appendix Figure A, etc. etc.
What am I doing wrong. Thanks for your help
pahadi
Only the list of Figures appears correctly – as Figure 1.1, Figure A.1 etc .etc.
tom
hi pahadi!
Thanks for your comment. Please provide a minimal working example, like the one below, to illustrate what you are describing. My example only shows numbers in TOC, LOF and LOT.
Thanks,
Tom
pahadi
Tom,
Thanks for your reply. I managed to fix the problem. It was arising out of multiple bib style files, one in the main file and one a few lines below it – a remnant from one of the include files.
Talk about individualism regarding styles !
tom
Cool, glad you solved your problem!
Emivan
Hello, my name is Emivan.
I’ve got two problems to finish my thesis in latex. I use TeXnicCenter to type my texts and am using the document class ABNT.
1 – In the abstract of the title references, appendices and indexes are not aligned with chapter titles and the library does not accept if not all aligned.
2 – Within the text, titles of sections and subsections are different from those that were placed in the summary. In size and font. How can I solve this?
If you can help me I appreciate it.
tom
Hi Emivan,
Please provide a minimal working example that illustrates your problem with as few lines of code as possible. Is this the document-class you are using?
Thanks,
Tom
Emivan
Yes, it is.
Ahmad
hey all, I am writting my thesis an dI have some problems in list of figures,
the caption of figures exceed the page width like:
3.2 Achieved sum rate for one way and two way AF and DF ….39
3.3 The achieved sum rate of the proposed GA, the ES algorithm, and the optimal solution
how can I make the second figure as:
3.3 The achieved sum rate of the proposed GA, the ES
the optimal solution …………………………………………………..40
Thanks in Advance
tom
Hi Ahmad,
The problem might occur in certain cases when using the hyperref package. You might find the discussion on this site useful. In case that doesn’t solve your problem, please send a minimal working example.
Thanks,
Tom
Whotee
hi Tom
I have a problem for rowcolor for multirow. As you will see, Carrots and 10 are half hidden by late arrival of rowcolor. This is part of a big table, in which I need to control rowcolor for multirow situation.
Thanks in advance.
Kind regards
Whotee
tom
Hi Whotee,
Thanks for your question. The text is half hidden, because the color is added after the text. You can solve this problem by adding the text from the lower cell using a “negative multi row number”. Here is your example as a MWE:
Whotee
Thanks Tom! it works.
Whotee
hello Tom
Please see this code:
It has two problems:
1. There is extra space after =. I want + of line 2 to appear after = of line 1, but without extra space. The equations after = and + should be left aligned, as they are now.
2. I want line 3 to right align with line 2.
Overall, all eqs are central.
Earlier I posted about it, but still I am looking for solutions to these issues.
Thanks in advance.
regards
whotee
tom
Hi Whotee,
Below is a simplified version of your equation. You just have to replace the dummy content with your code.
1. You just have to put the ‘&’ in the right places
2. I define
\mylength
and set it to the width of line 2. Then I define a box of that width and right-align the equation of line 3 in that box.Hope it works!
Whotee
Thanks Tom. The technology works. In my case, I have to calculate width of $\textgamma$ like symbols, for which
is giving error. Without much knowing, I tried
which luckily works. Maybe you can enlighten.
Thanks a lot.
Whotee
tom
Hi Whotee,
If this works it means you are loading a package that implements
\getWidth{}{}
which does exactly what you need. I wasn’t able to figure out which package though. If you are interested, you can create a minimal working example and add packages until you don’t get the error “Undefined control sequence \getWidth”.Your code is very similar to what I published on my blog (changed it a few times after I submitted the original reply you saw). Instead of
\getWidth{}{}
, I use\settowidth{}{}
, a command provided by TeX/LaTeX. I suspect the error you get when using the original command is due to the back and forth between math and non-math ($\textgamma$
produces a non-math gamma character). The calc package might not like that. But that’s just a guess.Hope this helps,
Tom
Emivan
Please, I need to reference an article conference and would like the document compiled after she got well:
BERTOLDI, O.; CICORA, R. The loden program: a linear methodology for the automatic selection of long-term-expansion alternatives, with security constraint, is a power transmission systems. In: POWER SYSTEM COMPUTER CONFERENCE, 8., 1984 Helsiski. Proceedings … Helsiski: [s.n.] 1984.
tom
Hi Emivan,
If you are new to bibliographies in LaTeX, take a look at the biblatex package. You might also find this post useful. Citation (bibtex) can be downloaded from google scholar.
HTH,
Tom
Robin Ahmed
Tom
I am using report class to make my own style file. I used \listoftables and \listoffigures command. They appear in first two lines of my TOC with page numbers. But according to my thesis requirement, these two lines should be removed from TOC (they I need lof and lot to just after my TOC). Can you pls help me?
tom
Hi!
I suggest to load the tocbibind package with the following options:
See the package documentation for a complete list of options.
Sriram
Hi Tom,
I’m using a report class for my final year thesis.
The problem is, the Nomenclature, Unnumbered Chapter “Introduction” and Abstract are being shown as subsections in the List of Tables, like:
List of Figures
List of Tables
– List of Tables
– Nomenclature
– Abstract
– Introduction
This happens when I compile as PDF, and open with any PDF reader. In the sections pane on the left, Nomenclature, Abstract, Introduction and List of Tables are being shown as SUBSECTIONS to a section named List of Tables.
How do I make Nomenclature, Abstract, Inroduction appear as separate topics in the section tree on a PDF reader?
Thanks.
tom
Hi Sriram,
I tried, but couldn’t reproduce the problem (see code below). Please send a minimal working example that I can compile and look at in Adobe Reader.
Thanks, Tom
hanen
Hi Tom,
thanks for your quick answer.
I had a problem with the \listoffigures and \listoftables comand. They not appear (they are empty), what can I do? Thank you very much for any help you can give me.
Here are some lines of my code :
tom
Hi Hanen,
I removed most code, since it was really long. Just kept the part where the problem lies. You are missing captions in your figure environment. Captions produce the list entries. Below is a stub showing how to include figures (similar for tables). The label is optional if you don’t reference the figure.
Another thing, you load several package multiple times (color, hyperref). Try cleaning up your preamble.
HTH, Tom
hanen
Hi Tom,
Yes, i integrates the figures with this structure in the chapter,
but in the main page (The code that I have already sent), when I made
\listoffigures
, it appears empty.Can you please help me?
Thanks in advance.
tom
Hi!
Just a few question/suggestions that might help to locate and fix your problem:
– Do the figures show in the document?
– Did you compile the document twice to get list-of-figures/tables?
– Take a look at the log file. What warnings does it show?
– If these things don’t help, I suggest you start with a very simple tex-document, remove all packages, add a single figure and keep adding stuff until the list-of-figure entries disappear. Always typeset twice. When I ran your original code, after removing a few packages (algorithm related) that I didn’t have, the list-of-figures was produced normally.
– Finally, I’d place
caption
andlabel
withincenter
-environment. There is extra whitespace between figure and caption the way you did it.HTH, Tom
hanen
Hi Tom,
Thanks for your advice, i succeed to find the solution
it’s just scheduling of \usepackage in the main page.
Thanks a lot.
tom
Great, I’m glad you found a solution. Best, Tom
Xin Jin
Hi Tom,
I am trying to creat a report with content table, list of figures and list of tables. The first two works fine. But I couldn’t get a list of tables (there’s space created for it but it’s a blank page). Other parts of the report work fine.
I tried created a seperate file of only tables to see if my table codes are OK and they are. I used the same packages in preamble, copied and pasted the table contents to a different .tex file, and used xeLatex to compile, and it worked.
It’s only when the table codes are in the report that xeLatex cannot generate a list of tables. I checked the .aux file and see:
“\@writefile{lot}{\contentsline {table}{\numberline {1.1}{\ignorespaces \bfseries Overview of Crude Oil Prices Persistence\relax }}{23}{table.1.1}}
\providecommand*\caption@xref[2]{\@setref\relax\@undefined{#1}}
\newlabel{tab:adftest}{{1.1}{23}{\bfseries Overview of Crude Oil Prices Persistence\relax \relax }{table.1.1}{}}”
but the lot file is actually empty.
Any suggestions? Thanks in advance.
tom
Hi!
Not sure why your table of contents isn’t produced in the document.
Please send a minimal working example and I will take a look.
Cheers, Tom.
leucat
Thank you for the reply. I have figured out what’s going on. It’s because of the specific .sty file the report uses…
tom
Good to hear. Thanks, Tom.
clemens
Hi,
I am trying to use the LoF/LoT short name as part of the caption label.
So the following:
should result in:
Figure 1.1: Short name. Long version of the caption.
I’ve scrolled through the comments and haven’t found anything applicable yet. Any advice would be appreciated.
Cheers, Clemens.
tom
Hi Clemens,
You could redefine the way captions are typeset (see code below). In case you are using
\caption*
of the caption package, things will get more complicated, at least with this solution.Best, Tom
clemens
Thanks for the advice. Based on your code, the following does exactly what I wanted (caption short title in bold):
Thank you Tom and cheers, Clemens.
tom
Hi Clemens,
Many thanks for posting the exact solution here. Appreciate it! Tom.
djurikom
Hi Tom,
I am trying to make my Abstract, Contents, LoF and LoT titles centered and uppercase. Now, I managed to do it for Contents with
However I can not do it for the rest for some reason. The best I could do was make it uppercase, as here:
Is there a way to do it for the remaining titles as well? Thanks!
tom
Hi there!
In case you have the latest version of the tocloft package, you can use
\hfil
as shown below to center the titles.Vicente
Hi Tom.
I want to include twice a list of a new float, after the table of contents of the book and after the cover of a part of the book. If I type \listof{…} in these places, it appears only the first time, and not the second. How do I fix it?
Thank you.
Vicente
tom
Hi Vincente,
Thanks for your question. If I understand correctly, your aim is to have a list of figures and tables for each part of your book. I can think of two possible ways to do this. You could either define a new float type for the second part of the book (caption package), or use the minitoc package and specifically
\partlof
and\partlot
.If you need help with either of these, please provide a minimal working example and I’ll be happy to look into it.
Cheers, Tom
Christian
Almost done putting the finishing touches to my thesis, now there is only one formatting issue left:
I have three different lists, that need to come at the end of my document. Using the report class, each of these should be a section within one chapter “Lists”: list of tables and bibliography (which are generated automatically) and another list that I did manually.
I having trouble removing the title of my list of tables. I’m supposed to have a structure like this:
5. Lists
5.1 List of tables
5.2. Other list
5.3 Bibliography
I managed to get rid of the “Bibliography” title but my structure (in the text itself) still looks like this:
5. Lists
5.1 List of tables
List of tables
5.2 Other list
5.3 Bibliography
The numbered entries I created myself with \section, the second “List of tables” entry however LaTeX creates automatically. I found a workaround to remove the title itself, by defining it as empty, but this still leaves me with a lot of white space and makes the whole thing look pretty silly.
Any help would be really appreciated. Thanks!
tom
Hi Christian,
Thanks for your question. Please provide a minimal working example to illustrate the issue and I’ll be happy to take a look. You can post the code here.
Thanks, Tom
Christian
Tom, thanks for getting back to me so quickly.
This is my MWE (first time I’m doing this, I hope it’s minimal enough :))
See how the unnumbered “List of tables” chapter title is added? Also the list itself should of course not start on an extra page but right below 3.1. Thanks again for your help!
tom
Hi Christian,
Thanks for your MWE! I think what you want to do is redefine the toc, lof, and lot commands. Take a look at my code and let me know if you have further questions.
Tom.
Christian
Tom, this is amazing! From your MWE this seems to be exactly what I was looking for. Will need to test it in my actual document, but this could very well be the solution. I’ll let you know! Christian
Flaces
hi Tom
Please help on keeping capitalization of Title string in references. I have too many references to edit each one using {} to keep Title text as it is. I have tried two ways:
1.
Title capitalization is not preserved.
2.
Title capitalization is preserved but many of my references are broken, and I get many error messages.
Originally I am using the first way. Is there some option or style that I can use to keep title capitalization as it is, without having to edit my hundreds of references for the thesis?
Thanks in advance.
Kind regards
Flaces
tom
Hi there,
You could use regex to enclose capital letters in curly brackets. However, I’d recommend moving to biblatex. Please provide a minimal working example and I’ll be happy to help you sort out the error messages.
Best, Tom
Flaces
Hi Tom
thanks for a quick reply. I have a project in WinEdit for a book. I am sending the setting which is creating this error and the error message. If this is not enough then I create some mwe. Perhaps, due the error, or otherwise, there are no references in pdf.
Thanks in advance.
kind regards
Flaces
——–
The error message is:
This is BibTeX, Version 0.99dThe top-level auxiliary file: main.aux
A level-1 auxiliary file: ch1_intro/introduction.aux
A level-1 auxiliary file: ch2_conceptualmodel/conceptualmodel.aux
A level-1 auxiliary file: ch3_systemtraceanalysis/systemtraceanalysis.aux
A level-1 auxiliary file: ch4_stochasticmodel/stochasticmodel.aux
A level-1 auxiliary file: ch5_channelutilimprovement/channelutilimprovement.aux
A level-1 auxiliary file: ch6_autonomicopt/autonomicopt.aux
A level-1 auxiliary file: ch7_conclusions/conclusions.aux
A level-1 auxiliary file: postch/postch.aux
I found no \citation commands—while reading file main.aux
I found no \bibdata command—while reading file main.aux
I found no \bibstyle command—while reading file main.aux
(There were 3 error messages)
——-
Instead of the above setting, when I use these commands, I have NO errors and references are added to the pdf. But the Title capitalisation is not preserved, which is what I need.
tom
Again, I recommend using the biblatex package. You can find a good MWE here. Make sure you set
backend=bibtex
and delete all aux-files before you switch tobiblatex
. That should fix the errors you see.HTH, Tom.
Flaces
hi Tom
Thanks, and here is a mwe, sent in two files as follows:
Here is whats happening:
pdflatex: I see cited reference points, but no reference list and no errors
bibtex: I get 9 errors, each with a message: Too many commas in name of “…”
pdflatex: I see cited reference points, reference list and no errors
If I do bibtex again, I get back my 9 errors (same message).
So whenever I do pdflatex, seems it is ok, but whenever I do bibtex, I get those 9 errors.
Thanks in advance.
Kind regards
Flaces
tom
Since you have the
biblatex
package installed, you might as well usebiber
instead ofbibtex
. The only change required is the keywordaddress
has been renamed tolocation
. The minimal example below works usingpdflatex
,biber
,pdflatex
.Cheers, Tom.
Flaces
hi Tom
Thanks for your constant support.
1. I guess by pdflatex, biber, pdflatex, you mean this sequence of commands. I am using winedit 8 and I see only bibtex button only. Cant figure out where is bibex button?
2. I have many address = … entries in my reference.bib file, but only get the errors that I reported earlier. Does it mean to change all ‘address’ to ‘location’?
kind regards
waqar
tom
Hi there,
1. That’s an easy fix, see here for how to change the engine from
bibtex
tobiber
in WinEdt (you’ll have to scroll down a bit).2. That’s right, use find and replace (all). You might want to save a copy of the original bib-file first. See the biblatex documentation (page 19) for an explanation.
Best, Tom
Flaces
hi Tom
Thanks for your reply.
I tried to make the easy fix on the link (putting bibex.exe instead), but it produced many strange errors. Perhaps it could not find bibex.exe. So I restored to previous state.
As I told you, I have many references with address= field, but only three were giving errors. Today I looked deeply into what makes these errors. So what I found is that more than two commas are not allowed in any address field. I changed the three references (removed some commas), as
%address = {Americas Headquarters, Cisco Systems, Inc., 170 West Tasman Drive, San Jose, CA 95134-1706, USA},
address = {Americas Headquarters Cisco Systems Inc., 170 West Tasman Drive San Jose CA 95134-1706, USA},}
I did not change address field name to location of any reference in my big file.
So things are working now.
Please give your feedback on this hit-n-trial correction. thanks
kind regards
Flaces
tom
Heya!
Yeah, as long as you are happy with the result…
Just a few comments on your reply:
The biblatex engine is called biber, so you’d have to replace bibtex.exe with biber.exe, not bibex.exe. When I used the address field, too many commas were converted into “X et al.”, probably not what you want. Did you try running the minimal example I created? You can always go the the commandline, navigate to your project directory and type:
bibtex.exe tex-filename
to run biber.Best, Tom.
Flaces
Dear Tom
Sorry it was a typo. When I use biber.exe, I get this error:
Command Line: biber.exe “main”
Startup Folder: C:\Users\flaces\Desktop\Thesis
Error Launching Console Application BibTeX …
Command Line: biber.exe “main”
Startup Folder: C:\Users\flaces\Desktop\Thesis
The system cannot find the file specified.
When I try to run the mwe you sent, I get an error (unluckily I am not able to get it to the clipboard this time), but it is like:
The ‘backend’ option is load-time only and can not be set after package loading
biblatex2.sty file is opened and highlighted at
% Process preamble options
\blx@processoptions
I have closed winedit and reopened but the error persists.
In my case, I have a project defined, which is not the case in your mwe.
So I am not sure why this error is appearing.
thanks and kind regards
flaces
tom
If you move from bibtex to biber or back, you’ll have to delete all meta-files from the project directory. Just keep input files (tex, bib, figures, etc.). Otherwise, the engine will complain.
Tom
Flaces
Yes, I do delete all other files except the input files. Just to confirm if this is correct:
The error does not go.
thanks
tom
Yes, that’s seems correct. I’m not sure how to help you, really. It seems to be a system-specific problem. If you like, you can post a minimal example (like mine) to reproduce the error and I will try to run it on my computer. Also, you might want to update to the latest LaTeX version.
Tom
Flaces
Dear Tom
I have one more question on cover page of a phd thesis. This includes a cover page, a spline and back cover. Normally people do it in Adobe Illustrator or in page etc, but I wish to do it in latex. I guess it will be less effort, as I do not have time to learn these graphics programs. Any examples and how the covers look like, would be great.
Thanks in advance.
Kind regards
Flaces
tom
You might find this blog post useful. Let me know if you have specific questions about the layout.
Best, Tom
Flaces
Thanks Tom.
Normally printers like a single pdf, which contains front, spine and back. On the spine, the text direction is left to right, as you would already know. I also want to put ISBN no at the back side. On the edges, there are bleed marks (corners) that serve as a cut marks. I could not find something like this or perhaps I could not get to such templates in latex. Please help in this context. A simple template with these specs would do, as a quick start.
I appreciate your quick response, as I am running out of time.
Thanks in advance.
kind regards
Flaces
tom
Hello!
As I have never written an entire book myself, I have little experience with cover design. However, you might find this a useful read.
Cheers, Tom
Flaces
Dear Tom
Thanks many for your replies and help.
Meanwhile I have two more questions:
1. I generate little headings using
Sometimes I see that Heading and text are split on two pages. How to avoid it? There are some solutions for avoiding this situation in section headings. I have tried samepage package but it keeps on asking the samepage.sty file.
2. I have certain size of pages. My text contains quite some maths as well as figures/tables. How can I check automatically if some elements are flowing out of my page text area. Manually it will be hard for a thesis.
Thanks in advance.
Flaces
tom
Heya,
1. You can find a solution to your first question here. You mentioned the
samepage
package. It is not part of the standard LaTeX distribution (e.g. TeXLive) and I couldn’t find anything on the internet. If you can get the style file (i.e.samepage.sty
), just place it in your project directory.2. To check if content reaches into the page margins, take a look at the log file and look for
Overfull hbox
. Also, I like to use the document class optiondraft
, which indicates anyoverfull hbox
in the output PDF as black rectangle. See here for more details.Best, Tom
Flaces
Thanks Tom.
The suggestions for question 1 did not work, so I insert manually \newpage to avoid only \paragraph headings at end of page. The suggestion for question 2 worked very well. I wonder why latex do not calculate the space left on the line before placing maths elements? Any smarter way to avoid maths overflowing the lines?
Kind regards
Flaces
tom
You could try the breqn package. Here is an example taken from the package:
Flaces
Dear Tom
Sorry, but I have yet another question:
I have a bibliography.I also want a separate list of my publications. Please help.
Thanks in advance.
Kind regards
Flaces
tom
You should be able to get two bibliographies with some help from my recent post on the topic.
Cheers, Tom
Flaces
hi Tom
When run as it is, this produce three errors on Bibtex:
I found no \citation commands…
I found no \bibdata commands…
I found no \bibstyle commands…
But I can see the document with citation in it. There is no bibliography produced.
With the code I sent, I have tried defernumbers=true. All is ok but no change to the issue I reported about continuity of list numbers in the Author’s contribution and Article. Perhaps you can repair my code.
Thanks in advance.
kind regards
Flaces
tom
The example only works with
biber
. Therefore, I changed the biblatex option frombackend=bibtex
tobackend=biber
. Is there any reason you usebibtex
and notbiber
?Cheers, Tom.
Flaces
hi Tom
I tried to use Biber, but I could not find a file biber.exe in my system.
regards
Flaces
tom
If you don’t have biber, your LaTeX version is fairly old and you should consider upgrading. Tom.
Ali
Hi Tom,
Thanks for all the good information. I just have a quick question. I set a title and a caption for each figure and table. The title is in boldface. How do I have Latex present the list of figures and tables in normal text (not bold)? Thanks.
Best,
Ali
tom
Hi Ali,
You could use the optional argument to
caption
:Obviously, this leads to double typing effort. Alternatively, you could redefine the
caption
command (or define a new command) and do it automatically as shown in the MWE below. If this is not what you were looking for, please provide a MWE as the one below.Best, Tom
Ali
Thanks tom. Can I apply some commands to the page in which the list of figures is placed to make it all in normal text, like I do for the single spacing?
Here is a MWE:
Thanks again for your time.
Ali
tom
Thanks for the nice MWE. I would think you can do that, but it might depend on the command you intend to apply to the list pages. For example, it is common practise to have a different page number style or even header and footer for these pages.
Let me know if you need help with a specific command and I’ll look into it.
Best, Tom
Ali
Using the following command you can change the title of the list to normal text.
I’m looking for a command like that which applies to the entries as opposed to the title, but I haven’t been able to find the right name for the middle part. Please let me know if you have any thoughts.
Cheers,
Ali
tom
The example below shows how to change the font size for chapter, section and subsection entries in your ToC.
Flaces
hi Tom
In context of my previous problem to obtain multiple bibliographies, I have tried this code:
All goes well, except that the subbibliography restarts numbering, which needs to be continued.
Thanks in advance.
Kind regards
Flaces
tom
I suggest using a keyword to print specific bibliograhies. Also, the
defernumbers=true
option is required. Here is an example:rudolf
Hello, in my list of figures i have something like this:
1.1 Picture 1 18
1.2 Another picture 22
…
I would need something like this:
1.1 Picture 1 …………… 18
1.2 Another picture ….. 22
…
There are no dot’s when i use only \listoffigures.
Could you help me?
Thanks
tom
Hi Rudolf,
You would have to let me know which document class you use or provide a minimal working example. The standard document class
report
produces dots in my example below:Best regards,
Tom
Tor
Hi,
I’m reproducing an old-style technical document (from the seventies), and back then it was common to use
1-1
1-2
2-1
2-2
..
instead of
1.1
1.2
2.1
2.2
in table of contents and in chapter titles. I have the document itself sorted out, but can’t find a way to change the number style in the toc (I use tocloft to massage the toc, this is the only part I can’t figure out). Is there a way to change the style to 1-1?
Thanks in advance
tom
Hi Tor,
Thanks for this question. You won’t need the tocloft package here, since you change the way the section counter is printed rather than the ToC entry. Hence, all you have to do is redefine
\thesection
:You can redefine
subsection
andsubsubsection
accordingly.Cheers, Tom
Tor
Thanks Tom, that worked great! I wasn’t fully aware of how
\arabic
(or the other variants) could be used this way. Simple when demonstrated.. 🙂.-Tor
tom
Glad it worked! Best, Tom
wouter
I qot a question,
I’m playing around with the list of figures, I want it to look like this:
1 Balblabla ………. 5
2 dfgsdgfdg …….. 6
etc,
But whenever I’m using a figure in a NEW chapter, it starts over at 1 again.
In order to get 1, 2 etc i used:
How do I fix this?
tom
Hi there,
Your approach will not work, because the figure counter is still reset at every new chapter. For continuous figure numbering, use the chngcntr package. Below is an minimal working example.
Cheers,
Tom
wouter
Thanks, that helps!
Any idea how to get rid of the blank lines between figures of different chapters in the LOF?
tom
Redefine the macro which adds the line space between entries using:
Xin Wen
I would like to create a list of tables for my report but the command doesn’t work. I researched at some websites and one of it says that if I used tabular, latex is unable to print the list out. Do you have any solutions? Here’s my code:
tom
Hi Xin Wen,
Thanks for getting in touch. Your table looks fine. Just replace the manual caption with the macro provided by LaTeX,
\caption{}
. With that, the table will automatically appear in the list of tables. I used the caption package to format the caption according to the style in your example. Let me know if you have any more questions.ahmed4kernel
Hello
I have strange problem listoffigure, listoftable, tableofcontent are all not working. I am using the latex tempelate for thesis from http://www.latextemplates.com/cat/theses.
Any suggestion !!
Thanks in advance
tom
You would have to be a bit more specific. Please provide a minimal working example and I’ll see what I can do.
ahmed4kernel
Thanks a lot, the problem have been solved. Thanks again
tom
Glad to hear. Cheers, Tom
Kerstin
Hi there
I have a problem with the indentation in my list of figures and list of tables. The indentation is not right when there is a second line of caption in the list of figures… I use the article class and I have tried a number of things mostly with the tocloft package and none have turned out right. Im relatively new to latex and I think I might just be overlooking something…
So I use the simple command
to generate the list of figures at the beginning of my document… within the text I have multiple figures, which I caption like the following
And the “text for the list of figures” shows up nicely in the actual list of figures but looks like this when a caption is longer than one line:
Fig. 1 blablablablablablablablablablablablablablablablablablablablabla . . . . . . . . 4
Fig. 2 blablablablablablablablablablablablablablablablablablablablablablablabla
blablablablablablablablablablablablablablablablablablablablablabla . . . . . . . . . . . 6
How can I make the second line at the same indentation as the first? So it looks like this:
Fig. 1 blablablablablablablablablablablablablablablablablablablablabla . . . . . . . . 4
Fig. 2 blablablablablablablablablablablablablablablablablablablablablablablabla
blablablablablablablablablablablablablablablablablablablablablabla . . . . . . 6
Thanks for your answer, I really appreciate it!!
Kerstin
tom
Hi Kerstin,
Thanks for your question. I can’t reproduce it, however. In the example below, multiline captions are properly indented in the list of figures. Would you mind sending a minimal working example, similar to the one below?
Cheers, Tom.
Pat
Hey I am using the package
I have
The numbering works but there are two listed
List of Figures………………….vi
List of figures………………….. .ix
Why am I getting two in the TOC?
any suggestions?
tom
Well,
tocbibind
adds the list of figures and you also add it manually through\addcontentsline
. That explains why you see two entries. However, I’m not sure why you see two different page numbers. Either remove\addcontentsline
or load the package this way:Please see the package documentation for more details.
Satheesh
Dear Friends,
Can you suggest, How to align caption “List of Table” and “List of figures” as centre
tom
Hi Satheesh,
Try the tocloft package. The minimal working example below centers all three headings (TOC, LOF, and LOT). For more information, see the tocloft package documentation.
QY
How to create customized “List of …” (e.g. List of Equations) for my thesis WITHOUT using tocloft package? And what to insert in the equation environment so that latex recognize that it is equation and create an entry for the equation in the “List of Equations”. I use book document class of Thesis.cls template that uses @starttoc method. My PDF output does have a page of “List of Equations” but it is empty. FYI, i use both “equation” and “IEEEeqnarray” environment for my equations.
Thank you
tom
Hi QY,
I’m not sure if I can help with that. Is there an issue using tocloft together with thesis.cls? If so, maybe you can find a way around it. If that doesn’t work, you might have to do it manually. Take a look at how it is implemented in the tocloft package (
\newlistof
and\newlistentry
).HTH, Tom
QY
Hi Tom,
when tocloft package is used in thesis.cls, my table of contents and list of figures and list of tables disappear although i run it three times. I think it is conflicting with the caption package i used. If there’s a conflict, a big revamp would be needed for my whole document if i were to use tocloft package which i wish to avoid.
Is there a way to do what i want using the caption package?
Thank you..
tom
Hi QY,
Please take a look at the solution to a similar question here. If that doesn’t help, post a minimal working example here and I’ll be happy to provide some help.
Best, Tom
QY
Hi Tom,
Thank you for your reply.
Managed to get a solution via http://www.latex-community.org/forum/viewtopic.php?f=44&t=6343. It seems that the caption package offers the option to define customized “list of …” via “DeclareCaptionType” function.
Regards,
tom
Great, thanks for posting a link to the solution that worked for you. Cheers, Tom.
san
hi, i have a question. I am using Lyx and i was trying to configure my TOC,LOF,LOT ect. in roman numbers. i used \frontmatter,\pagenumering{roman} etc which i could find in the web. It seems my TOC is in roman but no LOT or LOF pages. How can i get a continuous roman number from TOC to LOT.
Thanky in advance
tom
Hi San,
The code stub below shows how to organize the document such that the lists have roman numbering. Hope this helps, Tom.
Urska
Hello,
I’m writing in \documentclass{amsart}. I inserted \listoffigures but the vertical spacing between the captions of figures is too large (looks like there is an empty line between every two of them). Is there a way to remove the empty space, so basically pull the captions closer together?
Thanks, Urska
tom
Dear Urska,
Thanks for your comment. Please provide a minimal working example to illustrate the problem.
Thanks, Tom
Urska
My list of figures looks like this:
Figure 1 3
Figure 2 4
Figure 3 5
but I would like it to look like that:
Figure 1 3
Figure 2 4
Figure 3 5
So I would like to remove the vertical spaces.
I hope this is helpful,
Thanks,
Urska
tom
Thanks Urska — With minimum working example I mean a code example to reproduce the issue. Please see my recent comment here. If this doesn’t help, please provide a code example.
Thanks again,
Tom
Robin
Hi,
My question is related to LIST OF FIGURES
I don’t want the information of a particular figure to appear in the LIST OF FIGURES but still I want to keep it in the document. (The figure I not want to show is actually the signed certificate regarding to the document, not actually the work so should not be in the list of figures)
So, is it possible to keep a figure in the document and simultaneously not listing it in the LIST OF FIGURE while all the other figures are there in the list.
Thanks in advance,
@ROBIN
tom
Hi Robin,
You can use the caption package together with an empty LOF caption to suppress the figure from appearing the the figure index. See the example below.
Best, Tom
Robin
Thank you Tom.
Regards@Robin
Piyush Patel
Hello…!
How one can align the text in the list of figures or list of tables.
example:
Figure 1.1 How to align the long caption in
the list of figures.
Where, I need
Figure 1.1 How to align the long caption in
the list of figures.
I am using nottoc package \usepackage[nottoc]{tocbibind.
Additionally, I used an option available in caption command (ie. hang) but it is not working in my case as well as I also used \usepackage{tocloft}. but still the problem persist.
tom
Hi there,
Thanks for your comment. I recently got a similar question related to headings.
I adapted the solution for figures in the MWE below. You can add the code for tables accordingly.
HTH,
Tom