JuliaPackaging / Yggdrasil

Collection of builder repositories for BinaryBuilder.jl
https://binarybuilder.org
Other
303 stars 538 forks source link

Package a LaTeX distribution for BinaryBuilder #1070

Closed aviks closed 3 years ago

aviks commented 4 years ago

This may be difficult (or even impossible) but worth trying?

The minimal system would probably include a working pdflatex

giordano commented 4 years ago

I hoped no one would have ever opened this issue... :sob:

giordano commented 4 years ago

The problem is that the *TeX compilers without thes style files is pretty useless, and entering in the business of managing them is not very entertaining

aviks commented 4 years ago

The problem is that the *TeX compilers without thes style files is pretty useless, and entering in the business of managing them is not very entertaining

True. But for a start, here is what pandoc says it needs, and I think that would be sufficient for the majority of our needs:

When using LaTeX, the following packages need to be available (they are included with all recent versions of TeX Live): amsfonts, amsmath, lm, unicode-math, ifxetex, ifluatex, listings (if the --listings option is used), fancyvrb, longtable, booktabs, graphicx (if the document contains images), hyperref, xcolor, ulem, geometry (with the geometry variable set), setspace (with linestretch), and babel (with lang). The use of xelatex or lualatex as the PDF engine requires fontspec. xelatex uses polyglossia (with lang), xecjk, and bidi (with the dir variable set). If the mathspec variable is set, xelatex will use mathspec instead of unicode-math. The upquote and microtype packages are used if available, and csquotes will be used for typography if the csquotes variable or metadata field is set to a true value. The natbib, biblatex, bibtex, and biber packages can optionally be used for citation rendering. The following packages will be used to improve output quality if present, but pandoc does not require them to be present: upquote (for straight quotes in verbatim environments), microtype (for better spacing adjustments), parskip (for better inter-paragraph spaces), xurl (for better line breaks in URLs), bookmark (for better PDF bookmarks), and footnotehyper or footnote (to allow footnotes in tables).

asinghvi17 commented 4 years ago

There is an R package called TinyTeX which does this, I think. Might be worth looking into.

ViralBShah commented 4 years ago

I think it is best for pandoc to depend on a system provided latex. Does TinyTeX work on all platforms?

ViralBShah commented 4 years ago

Is TinyTeX sufficient for pandoc?

ViralBShah commented 4 years ago

Having read a bit more about TinyTeX, it certainly looks like the way to proceed. It uses tlmgr to download any other tex packages.

It may be some work to get it to live inside the Julia artifacts - but perhaps can help a lot of other packages if we can it going.

aviks commented 4 years ago

perhaps can help a lot of other packages if we can it going.

Documenter and Weave are the two biggest potentials clients for this.

ViralBShah commented 4 years ago

TinyTeX looks straightforward to work with. It basically is a wrapper around tlmgr which it uses to then bootstrap the distribution. They basically have a unix and windows script.

It may not be too difficult to package this up for BB. We should use the upstream provided binaries.

aviks commented 4 years ago

Yeah, I have it mostly working. Should be able to get it out for testing over the weekend

greimel commented 3 years ago

Do you have a WIP repo or PR somewhere?

aviks commented 3 years ago

Do you have a WIP repo or PR somewhere?

Ah, I see I left people hanging with my previous comment, sorry. Soon after that comment, Michael Hatherly published Tectonic.jl which pretty much does what I was planning to do with TinyTex. It's not binary-built, but is still a self contained install. So I'd suggest using that. I'll close this issue.

fredrikekre commented 3 years ago

It's not binary-built, but is still a self contained install.

https://github.com/JuliaPackaging/Yggdrasil/pull/1673

aviks commented 3 years ago

1673

Ah, well, the world moves too fast for me, it seems. I stand corrected. Thanks Fredrik!