0

I am using LyX with the book document class and am trying to include a List of Figures using the following code at the beginning of the page:

\addcontentsline{toc}{chapter}{LIST OF FIGURES}
\renewcommand{\listfigurename}{LIST OF FIGURES}

This is followed by the inserted "List of Figures" from the List/TOC submenu.

The output displays a page titled "List of Figures," but the page is blank (besides the title) even though I have 12 figures included as floats throughout the document.

Do I need to add something to the LaTeX preamble of the document? Do I need to change something about the document settings or the settings of the floats themselves?

Note: I am having the identical problem with the "List of Tables." Everything appears as it should in the table of contents, but the lists of figures and tables have no content.

2

The first line

\addcontentsline{toc}{chapter}{LIST OF FIGURES}

adds an entry for the list of figures in the table of contents, but it does not add a list of figures.

\renewcommand{\listfigurename}{LIST OF FIGURES}

This changes the title of the list of figures, if it would be included.

The lists of figures and tables are included by the commands:

\listoffigures
\listoftables

Further remarks:

  • Package tocbibind makes it easier to include the list of figures, tables, the bibliography to the table of contents.

  • If you are using package babel, then the names are language dependent and are changed in \captions<language>, e.g.:

    \usepackage[english]{babel}
    \addto\captionsenglish{%
      \renewcommand*{\listfigurename}{LIST OF FIGURES}%
    }
    
5
  • Someone had a related problem here: tex.stackexchange.com/questions/132340/… In this case, the problem was that the document class was supposed to automatically detect the presence of tables or figures. In my case, I am using the book class and explicitly invoking \listoffigures – J Forney Jul 11 '14 at 17:42
  • I appreciate the response, but sadly I am still having the same problem (and I would add, the TOC is actually not a problem). Whether I include the list of figures with from the LyX "Insert" menu or by using \listoffigures I still end up with the same result. I have a page titled "List of Figures" (appearing in the correct place), but the page has no content. – J Forney Jul 11 '14 at 17:48
  • @JForney: You have to compile twice. Provide a minimal working example (MWE). – Heiko Oberdiek Jul 11 '14 at 18:07
  • How do you compile twice in Lyx? I think that this may be the issue, but I am a novice and do not know how to change the way that LyX compiles documents. I am also working on putting together an MWE. I will post it as soon as I can. – J Forney Jul 12 '14 at 15:21
  • @JForney: I am not using Lyx at all, thus I cannot help you here. Check its documentation. – Heiko Oberdiek Jul 12 '14 at 15:32
1

I figured it out. The solution relates to an idiosyncratic aspect of how LyX manages Numbering & TOC formatting. A single change needs to be made within the sub-menu: Document - Settings - Numbering & TOC.

In LyX, one has the option of using the Document-Settings menu to specify which environments/fields (e.g. Part, Chapter, Section, Subsection) will appear in the table of contents (TOC) for the compiled document. I had originally opted to include only Part and Chapter environments in my TOC. This was the source of the problem. If one includes in the (TOC) all environments down to the Section (or lower), LyX automatically generates the List of Figures and List of Tables when compiling a PDF of the document. If one only includes the Part and Chapter environments in the TOC, LyX does not automatically generate lists of figures and tables.

This is an odd little glitch, and I do not know how it functions in other document classes. But this is clearly a problem with the book document class. I'm not sure what the workaround would be if you wanted to insist on a minimal TOC that only included Parts and Chapters, but did not include Sections.

2
  • 1
    I think it is rather a problem with LyX, not the book document class. – Paul Gessler Jul 14 '14 at 1:25
  • Definately sounds like a LyX problem, it has nothing to do with the document class. Consider adding a bug report at lyx.org/trac/wiki/BugTrackerHome – Torbjørn T. Jul 14 '14 at 8:37

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.