Henri-Paul Indiogine <hindiog...@gmail.com> wrote: > Greetings! > > I am using orgmode with export to LaTeX to write my dissertation. My > thanks to all codes and contributors. Without org-mode it would take > me even more time. > > I am wondering how to have the LaTeX command \listoffigures > automatically added by the export function. > > I have the following from the top of the org file: > > #+TAGS: noexport(n) chp(c) sec(s) subsec(b) temp(t) app(a) > #+LaTeX_CLASS: book > #+LaTeX_header: \usepackage[margin=2.5cm]{geometry} > #+LaTeX_header: \usepackage{appendix} > #+LANGUAGE: en > #+DESCRIPTION: Doctoral dissertation at Texas A&M University > #+TODO: VOID(v) STRT(s) COMP(c) REVD(r) DONE(d) > #+OPTIONS: H:3 num:t toc:t \n:nil @:t ::t |:t ^:nil -:t f:t *:t <:t > #+OPTIONS: TeX:t LaTeX:t skip:nil d:nil todo:nil pri:nil tags:nil > #+EXPORT_SELECT_TAGS: export > #+EXPORT_EXCLUDE_TAGS: noexport > > So, I know how to add packages in the preamble. However, > \listoffigures does not go in the preamble but soon after > \begin{document} and \tableofcontents > > It seems that the "book" LaTeX class automatically adds > \tableofcontents. How can I tweak that to add \listoffigures and > maybe \listoftables ? >
No, it's the exporter itself that adds the \tableofcontents - or not: with #+OPTIONS: toc:nil \tableofcontents will not be generated. In any case, in the same way that you can add something to the preamble with #+LaTeX_header, you can add something to the document with #+LATEX. The trick is to add it first thing so that it goes right after the \tableofcontents: --8<---------------cut here---------------start------------->8--- #+LATEX: \listoffigures * foo foo "a b c" bar --8<---------------cut here---------------end--------------->8--- should work. Nick