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

Broken internal links in STONEWORK-CONFIG.pdf #14

Open
samuel-dudik opened this issue Mar 25, 2022 · 2 comments
Open

Broken internal links in STONEWORK-CONFIG.pdf #14

samuel-dudik opened this issue Mar 25, 2022 · 2 comments
Labels
bug Something isn't working

Comments

@samuel-dudik
Copy link
Contributor

The internal links in the PDF generated from docs/config/STONEWORK-CONFIG.md are broken. The .md file uses <a name=""/> HTML tags for internal links which are supported by Github markdown viewer, but not by pandocs (program used to generate PDFs) default PDF engine pdflatex. Implicit internal links (https://pandoc.org/MANUAL.html#internal-links) can't be used because resulting headers would be too long + add unnecessary noise and header attributes (https://pandoc.org/MANUAL.html#extension-header_attributes) don't seem to be supported by Github markdown.

Currently, the solution is to use a PDF engine that can interpret HTML tags e.g. weasyprint:

pandoc STONEWORK-CONFIG.md -o STONEWORK-CONFIG.pdf --pdf-engine=weasyprint -c style.css

style.css for proper table rendering:

body {
        font-size: 12px;
}

a {
        text-decoration: none;
}

table, th, td {
        border: 1px solid;
        border-collapse: collapse;
}

th, td {
        padding: 3px;
}

The problem is that weasyprint and the pandoc version supporting it aren't included in the Ubuntu 18.04 repositories. 18.04 is currently used for the Docker image responsible for STONEWORK-CONFIG.pdf generation. 20.04 does include all required packages by default. On 18.04 direct download and installation of pandoc and weasyprint binaries is required.

Further information and reference: #12

@ondrej-fabry
Copy link
Collaborator

ondrej-fabry commented Jun 21, 2022

@samuel-dudik this was fixed by #12 correct?

@ondrej-fabry ondrej-fabry added the bug Something isn't working label Jun 21, 2022
@samuel-dudik
Copy link
Contributor Author

No, it wasn't. We ended up adding pdfs to .gitignore, but pdfs generated by Makefile still contain broken links.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants