Here is a super-short org mode file ready to export to pdf C-c C-e l o
. It is a sample file to demonstrate long tables and the issue I am facing with the auto generated index of tables by org-mode.
#+TITLE: Testing out =longtable=
# below gets rid of the red boxes drawn around the links
# `hyperref' package is already included in org-latex-default-packages-alist
#+LaTeX_HEADER: \hypersetup{
#+LaTeX_HEADER: colorlinks,%
#+LaTeX_HEADER: citecolor=black,%
#+LaTeX_HEADER: filecolor=black,%
#+LaTeX_HEADER: linkcolor=blue,%
#+LaTeX_HEADER: urlcolor=blue
#+LaTeX_HEADER: }
#+TOC: tables
#+CAPTION: This is a long table
#+ATTR_LaTeX: :environment longtable
#+NAME: tab:longtable
|----------+----------|
| Header 1 | Header 2 |
|----------+----------|
| 1 | Item 1 |
| 2 | Item 2 |
| 3 | Item 3 |
| 4 | Item 4 |
| 5 | Item 5 |
| 6 | Item 6 |
| 7 | Item 7 |
| 8 | Item 8 |
| 9 | Item 9 |
| 10 | Item 10 |
| 11 | Item 11 |
| 12 | Item 12 |
| 13 | Item 13 |
| 14 | Item 14 |
| 15 | Item 15 |
| 16 | Item 16 |
| 17 | Item 17 |
| 18 | Item 18 |
| 19 | Item 19 |
| 20 | Item 20 |
| 21 | Item 21 |
| 22 | Item 22 |
| 23 | Item 23 |
| 24 | Item 24 |
| 25 | Item 25 |
|----------+----------|
Using latex specific attributes, I am specifying org-mode to use the longtable
latex package for creating that table.
The table renders fine, but the issue is that for each page the long table spans, an extra entry is created in the TOC for tables. The below example is short, but if I have a table spanning 5 pages, 5 entries are created in the TOC with the same table title!
Below screenshots show the 2 pdf pages:
How can I make org-mode put only one TOC entry per table (and not per table per page)?