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

Support internal links in the PDF version #596

Open
tsalo opened this issue Sep 3, 2020 · 1 comment
Open

Support internal links in the PDF version #596

tsalo opened this issue Sep 3, 2020 · 1 comment
Labels
formatting Aesthetics and formatting of the spec

Comments

@tsalo
Copy link
Member

tsalo commented Sep 3, 2020

Internal linking to entity definitions introduced in #568 does not work in the PDF version of the specification. While we're comfortable with leaving these links as a web-only feature, if anyone does have the time and interest to figure out how to support the links in the PDF version, that would be very helpful.

This stems from #568 (comment).

@tsalo tsalo added the formatting Aesthetics and formatting of the spec label Sep 3, 2020
@sappelhoff
Copy link
Member

sappelhoff commented Sep 8, 2020

+1, would be awesome to get the internal links in the PDF working.

Currently we are explicitly removing all internal links from the MD source as a build step on the way from markdown to PDF, see:

def remove_internal_links(root_path, link_type):

If I remember correctly that is because our internal links often look like this:

[inheritance-principle](../some-file.md#some-section-header)

That is, the internal links are often across different files.

--> This works well for the html generated from the MD source with mkdocs, because the html specification still consists out of several documents (html documents) that stay interlinked that way.

However when building a PDF, we append all the distinct documents into a single document, and the links that were previously across different files stop working, because we have a single file now.

A solution would thus probably be to replace the above linked remove_internal_links function with a function that replaces the cross-file links with links how they are predicted to be once all distinct files have been appended into a single file.


PS: links that may be helpful

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
formatting Aesthetics and formatting of the spec
Projects
None yet
Development

No branches or pull requests

2 participants