From: Günter M. <mi...@us...> - 2021-12-29 12:46:13
|
- **status**: open --> pending-remind - **Comment**: Thank you for the report and patch. The warning in the source (introduced 2010-02-05 in [r6255]) other places (beginning, caption) result in LaTeX errors. makes me hesitating to change the current behaviour. OTOH, it may be outdated. Currently standard Docutils does not write `\ref` macros. How do you get a table number in the document? Can you provide your test file (and info about how it is converted)? Did you try your patch with the Docutils test suite? Here, I get `FAILED (failures=4, errors=21, skipped=1)` and a lot of additional (spurious) labels **after** longtables. --- ** [bugs:#440] longtable labels in the wrong place** **Status:** pending-remind **Created:** Tue Dec 21, 2021 11:39 PM UTC by Erik Hansen **Last Updated:** Wed Dec 22, 2021 04:10 AM 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 doc...@li... 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. |