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

:numref: not generating reference #441

Open
1 task done
Marttico opened this issue Nov 29, 2024 · 2 comments
Open
1 task done

:numref: not generating reference #441

Marttico opened this issue Nov 29, 2024 · 2 comments
Labels
bad output rinohtype's output is not correct bug

Comments

@Marttico
Copy link

Is there an existing issue for this?

  • I have searched the existing issues

PDF produced by rinohtype

I'm currently trying to automatically number my figure captions in my document using :numfig:. I've followed Sphinx's numref documentation, which generates the following.

Screenshot 2024-11-29 165309

I'm not sure whether this is a bug, or user error. I just cannot seem to find any solution online.

Source files

I cannot share the entire source code directly. Here's a snippet of the code that's generating this issue.

.. _testRef:

.. figure:: images/ot-primer-roles.png
   :width: 200


Figure :numref:`Image of Sphinx (Fig. %s) <testRef>`:

Versions

$ rinoh --versions
rinohtype 0.5.6 (in development)
Sphinx 8.1.3
Python 3.10.12 (main, Nov  6 2024, 20:22:13) [GCC 11.4.0]
Linux-5.15.153.1-microsoft-standard-WSL2-x86_64-with-glibc2.35
@Marttico Marttico added bad output rinohtype's output is not correct bug labels Nov 29, 2024
@brechtm
Copy link
Owner

brechtm commented Dec 6, 2024

Could it be that you're rendering this using rinoh? The numref role is provided by Sphinx, so it cannot be rendered by rinoh which only supports whatever docutils supports.

@brechtm
Copy link
Owner

brechtm commented Dec 6, 2024

Note that rinohtype does not support custom reference text as in :numref:Image of Sphinx (Fig. %s) ` since there is no reliable way to distinguish between a custom title provided by the user and the default numbered reference text generated by Sphinx. See also #244 (comment).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bad output rinohtype's output is not correct bug
Projects
None yet
Development

No branches or pull requests

2 participants