Skip to content

Allow for use of ConTeXt writer to generate PDFs #2463

Closed
adunning opened this Issue · 8 comments

3 participants

@adunning

In the search for a more lightweight and reliable method to generate PDFs in parallel to LaTeX (#1839), it occurs to me that ConTeXt offers a solution that is mostly implemented already. I assume that allowing the use of something like pandoc x.md -o x.pdf -t context to generate a PDF without the accompanying log and tuc files would be straightforward (this gives the error cannot produce pdf output with context writer under 1.15.1.1).

For someone who simply wants a decent PDF without any fiddling, this has the advantages that the download is ca. 200 MB, in the same range as BasicTeX, but one doesn't have to worry about missing packages (also included in TeX Live); one doesn't have to worry about Unicode; and the default page layout has margins closer to what a user of MS Word would expect in comparison to the article document class (though less ideal from a design perspective).

@jgm
Owner
@adunning

Brilliant. I'll see what can be done to improve the ConTeXt template.

@jgm jgm added the enhancement label
@jgm jgm added a commit that closed this issue
@jgm Allow use of ConTeXt to generate PDFs.
    pandoc my.md -t context -o my.pdf

will now create a PDF using ConTeXt rather than LaTeX.

Closes #2463.
8193ebc
@jgm jgm closed this in 8193ebc
@jgm
Owner

@adunning I've added a section "ConTeXt variables" to the README. So, if you improve the ConTeXt template (e.g. adding a linkcolor variable and perhaps changing the default away from that garish blue), you can document variables there.

@adunning

Thank you! Will update the README after you evaluate jgm/pandoc-templates#138 (I have also written the ConTeXt list to see whether I can get additional scrutiny for this).

@hftf

Are there any plans to add a few tests for ConTeXt?

@jgm
Owner
@hftf

Yes, that's what I meant. Sorry, I didn't realize there weren't even tests for LaTeX PDF generation.

@jgm
Owner
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.