[docutils:bugs] #440 longtable labels in the wrong place

"Günter Milde" via Docutils-develop <[email protected]>
Newsgroups gmane.text.docutils.devel
Message-ID </p/docutils/bugs/440/d82dc75466f6bb1b97baccf5c1b5c12f57225696.bugs@docutils.p.sourceforge.net>
- **status**: pending-remind --> open-fixed
- **Comment**:

Fixed in [r9401]. Thank you for reporting.



---

**[bugs:#440] longtable labels in the wrong place**

**Status:** open-fixed
**Created:** Tue Dec 21, 2021 11:39 PM UTC by Erik Hansen
**Last Updated:** Thu May 25, 2023 12:16 PM UTC
**Owner:** nobody
**Attachments:**

- [0001-Move-longtable-labels-to-table-body.patch](https://sourceforge.net/p/docutils/bugs/440/attachment/0001-Move-longtable-labels-to-table-body.patch) (1.7 kB; text/x-patch)


The latex2e writer outputs `\label{}` for tables after `\end{longtable}`. This is incorrect causing the table referencing to end up with empty reference text rather than the table number. The author of the `longtable` latex package suggest putting the `\label{}` inside the caption itself  `\caption{My caption \label{mylabel}}` or inside the table body. The latter option has the added benefit of working for tables without  a caption. I've attached a proposed fix.

`longtable` package documentation can be found at https://mirror.ox.ac.uk/sites/ctan.org/macros/latex/required/tools/longtable.pdf. See page 4 and 5 about the discussion on labeling.


---

Sent from sourceforge.net because [email protected] is subscribed to https://sourceforge.net/p/docutils/bugs/

To unsubscribe from further messages, a project admin can change settings at https://sourceforge.net/p/docutils/admin/bugs/options.  Or, if this is a mailing list, you can unsubscribe from the mailing list.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.