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

Allow for use of ConTeXt writer to generate PDFs #2463

Closed
adunning opened this issue Oct 19, 2015 · 9 comments
Closed

Allow for use of ConTeXt writer to generate PDFs #2463

adunning opened this issue Oct 19, 2015 · 9 comments

Comments

@adunning
Copy link
Contributor

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
Copy link
Owner

jgm commented Oct 19, 2015

This could be done. It's a bit more complex than with
beamer, because in addition to generating the ConTeXt source
we need to run a different program. But it should be pretty
straightforward to implement this.

+++ Andrew Dunning [Oct 19 15 08:00 ]:

In the search for a more lightweight and reliable method to generate
PDFs in parallel to LaTeX ([1]#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).


Reply to this email directly or [2]view it on GitHub.

References

  1. Groff ms writer #1839
  2. Allow for use of ConTeXt writer to generate PDFs #2463

@adunning
Copy link
Contributor Author

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

@jgm jgm closed this as completed in 8193ebc Oct 20, 2015
@jgm
Copy link
Owner

jgm commented Oct 20, 2015

@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
Copy link
Contributor Author

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

@hftf
Copy link
Contributor

hftf commented Oct 20, 2015

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

@jgm
Copy link
Owner

jgm commented Oct 20, 2015

+++ Ophir Lifshitz [Oct 20 15 09:44 ]:

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

There are tests for context. You mean tests for PDF
generation via context? We don't even currently have
tests for PDF generation via latex.

@hftf
Copy link
Contributor

hftf commented Oct 20, 2015

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

@jgm
Copy link
Owner

jgm commented Oct 20, 2015

It's a bit difficult to write tests for PDF gen,
since the exact binary contents of the PDF may
vary depending on what version of latex is used
to generate it + many other things. That's why
we don't have such tests.

+++ Ophir Lifshitz [Oct 20 15 10:28 ]:

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


Reply to this email directly or [1]view it on GitHub.

References

  1. Allow for use of ConTeXt writer to generate PDFs #2463 (comment)

@alerque
Copy link
Contributor

alerque commented Apr 5, 2016

@jgm Its possible to some testing of PDF's including whether or not two docs are a visual match (no matter what the binary blobs look like. One tool that does this is diff-pdf (not diffpdf).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants