Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

LaTeX: footnote marks behaviour regarding page indicators is not consistent #10195

Open
jfbu opened this issue Feb 15, 2022 · 0 comments
Open

Comments

@jfbu
Copy link
Contributor

jfbu commented Feb 15, 2022

Describe the bug

In pdf output, footnote marks sometimes indicate the page number of where the footnote is located, if not on the same page, but the behaviour is not systematic, in particular from inside long tables.

A general solution however will be hard to come by, due to phenomenon described in #10191 (comment)

How to Reproduce

Create project with this index.rst:

Welcome to FOO's documentation!
===============================


Test footnotes in a longtable
-----------------------------

.. raw:: latex

   \vspace{13cm}

.. list-table:: LongTable caption
    :header-rows: 1
    :class: longtable

    * - first ref to B [#b]_
      - auto-numbered 1 [#]_
    * - second ref to B [#b]_
      - only ref to C [#c]_
    * - auto-numbered 2 [#]_
      - first ref to D [#d]_
    * - second ref to D [#d]_
      - b
    * - a
      - b
    * - a
      - b
    * - a
      - b
    * - a
      - b
    * - a
      - b
    * - a
      - b
    * - a
      - b
    * - a
      - b
    * - a
      - b
    * - a
      - b
    * - a
      - b
    * - a
      - b
    * - a
      - b
    * - a
      - b
    * - a
      - b

.. rubric:: Footnotes


.. [#b] B

.. [#c] C

.. [#d] D

.. [#] auto-numbered 1

.. [#] auto-numbered 2

and make latexpdf

Expected behavior

Footnote marks should coherently use or not the page number of footnote.

But in screenshot below we see various problems:

  • footnote from header correctly indicates target page numbers, but for that part of table on last page, it depends whether the footnote was auto-numbered if it detects to be on same page as footnote (without LaTeX: fix footnote marks for multiple references  #10191 merged also auto-numbered footnote do not detect they are on same page)
  • footnote from table cells behave differently if they are mutlply referred to or not, or are auto-numbered

Your project

N/A

Screenshots

This is with current 4.x:
Capture d’écran 2022-02-15 à 12 03 11

And this is with merge of #10191:
Capture d’écran 2022-02-15 à 12 03 53

OS

Mac

Python version

3.8

Sphinx version

4.x at b8789b4 or with #10191 merged

Sphinx extensions

No response

Extra tools

No response

Additional context

Relates #10175

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant