Skip to content

WIP - Generate a pdf of the user guide#271

Open
Bluesoul02 wants to merge 1 commit into
jqwik-team:mainfrom
Bluesoul02:main
Open

WIP - Generate a pdf of the user guide#271
Bluesoul02 wants to merge 1 commit into
jqwik-team:mainfrom
Bluesoul02:main

Conversation

@Bluesoul02

Copy link
Copy Markdown

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

jlink commented Dec 7, 2021

Copy link
Copy Markdown
Collaborator

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
Copy Markdown
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

jlink commented Dec 8, 2021

Copy link
Copy Markdown
Collaborator

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
Copy Markdown
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
Copy Markdown
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.

3 participants