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

WIP - Generate a pdf of the user guide #271

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

Bluesoul02
Copy link

Generate a pdf of the user guide using pandoc

Overview

#108

Details

pandoc and xelatex need to be installed to generate the documentation

the pdf is not looking good for now


I hereby agree to the terms of the jqwik Contributor Agreement.

Generate a pdf of the user guide using pandoc
@jlink
Copy link
Collaborator

jlink commented Dec 7, 2021

I installed pandoc through homebrew and tried to generated the documentation. It failed.

So I cded to documentation/build/docs, which already had user-guide.md and executed

pandoc --pdf-engine=xelatex -s -o user-guide.pdf user-guide.md 

Got the following error:
pandoc: xelatex: createProcess: posix_spawnp: illegal operation (Inappropriate ioctl for device)

Any idea what might be going on?

@Bluesoul02
Copy link
Author

It might be an error specific to Mac OS : jgm/pandoc#7570
it looks like it's a problem with xelatex installation, adding xelatex to the PATH might solve the problem, we'll try to see if we can run it on Mac OS on our side.

@jlink
Copy link
Collaborator

jlink commented Dec 8, 2021

It might be an error specific to Mac OS : jgm/pandoc#7570 it looks like it's a problem with xelatex installation, adding xelatex to the PATH might solve the problem, we'll try to see if we can run it on Mac OS on our side.

I had to install another package that contains xelatex. On mac that's mactex which is actually very large and took half an hour to install.

Do you think there's a way with a smaller footprint for generating a pdf?

@Bluesoul02
Copy link
Author

So I found two alternatives that have a smaller footprint, but I'm still working on getting them to work.
https://github.com/fntsoftware/gradle-plugin-markdown2pdf
https://pypi.org/project/Markdown2PDF/

Comment on lines +102 to +106
dependsOn generateUserGuideToc

workingDir "$buildDir/docs"

commandLine 'pandoc', '--pdf-engine=xelatex', '-s', '-o', 'user-guide.pdf', 'user-guide.md'
Copy link
Contributor

Choose a reason for hiding this comment

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

Should this specify task inputs and task outputs?
Inputs and outputs would enable Gradle to track up-to-date properly, and the task could even become build-cacheable in the future.

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.

None yet

3 participants