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

build: Fix single-page example generation #1961

Merged
merged 6 commits into from
Jul 29, 2024
Merged

build: Fix single-page example generation #1961

merged 6 commits into from
Jul 29, 2024

Conversation

trisyoungs
Copy link
Member

@trisyoungs trisyoungs commented Jul 26, 2024

Starting off as another attempt to get us PDFs of our examples (pandoc now just crashes, and an alternative in the form of md-to-pdf via npm doesn't work either) this PR just fixes the generation of single-page examples. Users can print those to PDF themselves if required.

@trisyoungs trisyoungs changed the title build: PDF example generation build: Fix single-page example generation Jul 26, 2024
@trisyoungs trisyoungs marked this pull request as ready for review July 26, 2024 15:55
@trisyoungs trisyoungs requested a review from rprospero July 26, 2024 15:55
@trisyoungs trisyoungs added this to the Release 1.6 milestone Jul 27, 2024
pandoc --pdf-engine=xelatex -V 'mainfont:DejaVuSerif.ttf' -V 'sansfont:DejaVuSans.ttf' -V 'monofont:DejaVuSansMono.ttf' index.html -o ../${example}.pdf

# "Fix" image links
sed "s:/img:../../../static/img:g" index.html > index_pdf.html
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

My mind went on quite a trip trying to parse this sed statement before it finally clicked that you were using the colon as the delimited and not the traditional slashes. Which was exactly the right call

@trisyoungs trisyoungs merged commit 202feec into develop Jul 29, 2024
1 check passed
@trisyoungs trisyoungs deleted the test-doc-pdfs branch July 29, 2024 10:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants