1

I am using the following commands for list of Figures and Tables. I could find both inside of my theory part. But they are not displayed in the contents Part. * Edited

\documentclass[a4paper,11pt,\myPageLayout]{book} 
\begin{document} \fontmatter 
\usepackage[acronym,footnote,nonumberlist]{glossaries}
\usepackage{glossary-mcols}
\mainmatter
\setcounter{secnumdepth}{5}
\setcounter{tocdepth}{5}
{\parskip=0mm \tableofcontents}
\glsaddall
\printglossary[type=acronym,title={List of Figures}]
\listoffigures
\newpage
\glsaddall
\printglossary[type=acronym,title={List of Tables}]
\listoftables
% then comes all chapters content (I have 5 chapters)
\appendix
{
\small
\addcontentsline{toc}{chapter{Index}}
\printindex
}
\end{document}

Any help would be appreciable

  • 1
    What do you want to achieve with \glsaddall etc? They have nothing to do with \listoffigures etc. – user31729 Dec 30 '14 at 18:38
  • @user8162: Now, that you use the class book: Please help us to help you and add a minimal working example (MWE) that illustrates your problem. It will be much easier for us to reproduce your situation and find out what the issue is when we see compilable code, starting with \documentclass{...} and ending with \end{document}. – user31729 Dec 30 '14 at 18:51
  • @user8162: Did you try your minimal document above? I think it misses at least \usepackage{glossaries} – user31729 Dec 30 '14 at 19:03
  • @user8162: What about \myPagestyle??? – user31729 Dec 30 '14 at 19:08
  • '\fancypagestyle{mine}{\pagestyle{\myPageLayout mine}}' – user8162 Dec 30 '14 at 19:11
4

Here's a simple example based on the template you linked to, but adapted for the book class and adjusted in light of karlkoeller's comment. This is actually how I would usually tend to do this, as I don't usually use things like contents in articles.

\documentclass{book}

\begin{document}

  \thispagestyle{empty}

  \tableofcontents

  \cleardoublepage
  \addcontentsline{toc}{section}{\listfigurename}\listoffigures

  \cleardoublepage
  \addcontentsline{toc}{section}{\listtablename}\listoftables

  \newpage

  \pagenumbering{arabic}

  \chapter{First chapter}

  This section contains a figure (\ref{fig:first}).
  \begin{figure}
    first figure
    \caption{first}\label{fig:first}
  \end{figure}

  \chapter{Second chapter}

  This section contains figure \ref{fig:second} and table \ref{tab:first}.
  \begin{figure}
    second figure
    \caption{second}\label{fig:second}
  \end{figure}
  \begin{table}
    first table
    \caption{first}\label{tab:first}
  \end{table}

\end{document}

lof and lot in toc

| improve this answer | |
  • @cfr..Thank u so much.. This answer works perfectly.... – user8162 Dec 31 '14 at 9:55
  • With this solution, the page number is not correct if one the lists spans over more than one page... – karlkoeller Dec 31 '14 at 11:34
  • @karlkoeller You're right, of course. I think because the template used article, I was assuming the lists would be relatively short since the assumption seems to be that they'll all fit on one page. I've switched the class to book which is what the OP seems to possibly be using. (This is how I tend to do this myself, but I don't tend to have ToCs in articles.) Thanks. – cfr Dec 31 '14 at 20:24
4

It's not clear to me how you are generating your "List of Tables" and "List of Figures"...

If you are generating them through \listoftables and \listoffigures, it suffices to load the package tocbibind with the option nottoc (to avoid having the ToC itself in the ToC):

\usepackage[nottoc]{tocbibind}

If, instead, you are using the glossaries package to generate them, you have to use the option toc to add your glossaries in the ToC.

That is, load glossaries as

\usepackage[acronym,footnote,nonumberlist,toc]{glossaries}

Sorry for not providing a MWE, but yours is uncompilable...

| improve this answer | |
1

Try to start from following MWE:

\documentclass[a4paper,11pt]{book}
\usepackage[acronym,footnote,nonumberlist]{glossaries}    
    \begin{document} 
\frontmatter   
    \tableofcontents
    \listoffigures
   \listoftables
\mainmatter
    \chapter{first chapter}
    \section{first section}
        \begin{figure}[h]
some figure
        \caption{Caption of the first figure}
        \end{figure}
    \section{second section}
       \begin{table}[h]
      \caption{first table}
content of table
        \end{table}    
\end{document}

It gives contents, list of figures and list of tables. You now can added your formatting and look, when the list of figures and tables disappear. And read given comments carefully, they are very valued.

| improve this answer | |
  • Thanks for your comment. But even now, I am getting list of tables and figures inside my PDF, but NOT in contents. – user8162 Dec 30 '14 at 20:41
  • I,m sorry, but this request in your post was not clear to me. Meanwhile cfr gives you hint how to do this. – Zarko Dec 31 '14 at 9:25

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.