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

rinohtype not correctly processing document links #373

Closed
1 task done
techauthoruk opened this issue Oct 21, 2022 · 3 comments
Closed
1 task done

rinohtype not correctly processing document links #373

techauthoruk opened this issue Oct 21, 2022 · 3 comments
Labels
faq Something to add a FAQ entry for question

Comments

@techauthoruk
Copy link

Is there an existing issue for this?

  • I have searched the existing issues

PDF produced by rinohtype

If I produce my Sphinx output using LaTeX, internal links are displayed correctly (i.e. they show the correct section/subsection names) as in this example:

latex

When I process the same document using rinohtype, the section link just displays a chapter title:

rinoh

I would expect all the internal links to display in rinohtype in the same way they do in LaTeX.

Source files

See the screenshots above

Versions

rinohtype 0.5.5 (in development)
Sphinx 5.1.1
Python 3.10.6 (main, Aug 10 2022, 11:40:04) [GCC 11.3.0]
Linux-5.10.16.3-microsoft-standard-WSL2-x86_64-with-glibc2.35
@techauthoruk techauthoruk added bad output rinohtype's output is not correct bug labels Oct 21, 2022
@techauthoruk techauthoruk changed the title riohtype not correctly processing document links rinohtype not correctly processing document links Oct 21, 2022
@brechtm brechtm added question faq Something to add a FAQ entry for and removed bug bad output rinohtype's output is not correct labels Oct 24, 2022
@brechtm
Copy link
Owner

brechtm commented Oct 24, 2022

This changed in 0.5.2, as I reasoned this is how references are traditionally made in print (since you didn't have hyperlinks back then). I can see how this can be confusing however, since the output differs from the HTML output. I was wondering how the LaTeX builder handled these!

Please see these links on how to adjust the style sheet to output named links instead:

Closing as duplicate of #244

@brechtm brechtm closed this as completed Oct 24, 2022
@techauthoruk
Copy link
Author

Thanks for this @brechtm

I am obviously making some basic error here. If I add:

[linked reference]
type = custom

to the (global) Sphinx.rts file, the inline references are resolved correctly for my use case. I created a custom file which sits in the Source directory with my content. It's correctly referenced in conf.py, but adding the linked reference part is ignored.

So my conf.py has this:

rinoh_documents = [dict(doc='index',        # top-level file (index.rst)
                        target='manual',
                        template='SEaB.rtt',
                        stylesheet='SEaB.rts',  
                        title='FLEXIBUSTER',
                        author='Operating and Maintenance Manual',
                        logo='img/logo.png')]

In my custom stylesheet I have added:

[STYLESHEET]
name = SEaB custom style
base = sphinx

[linked reference]
type = custom
;this seems to make no difference - only applies from base stylesheet

but it doesn't get applied. Obviously me who is missing something, but I don't know what!

@brechtm
Copy link
Owner

brechtm commented Oct 26, 2022

rinoh_documents doesn't take a stylesheet. You need to set the style sheet in your template configuration file.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
faq Something to add a FAQ entry for question
Projects
None yet
Development

No branches or pull requests

2 participants