manuels / texlive.js

Compiling LaTeX (TeX live) in your browser
http://manuels.github.com/texlive.js/
GNU General Public License v2.0
1.25k stars 140 forks source link

Texlive 2012? 15? 16? #52

Open johanneswilm opened 7 years ago

johanneswilm commented 7 years ago

Hey, what is a bit confusing about this package is what version of texlive this really refers to. I can see that the README has been updated to say 2016, but nothing else has, right? So I assume that this is really the 2012 version. if that is the case, could this be stated clearly in the README?

Or is part of this code dump? This file seems to have been minified. Is there a source version of it anywhere: https://github.com/manuels/texlive.js/pull/34/commits/48fca0432a47d37ab1ae0331c47a1ce66620a75f

fzimmermann89 commented 7 years ago

it's complicated ;) pdftex-worker.js is basically the "binary" which is created by emscripten.

The makefile in this repo uses an old pdftex (1.40.11, might be Texlive 2012) and the 2015 texlive packages to create everything.

hope that answers your question

johanneswilm commented 7 years ago

@fzimmermann89 Intersting. Thanks! So there is nothing of TeXLive 2016 in here? We does the Readme say that then?

I don't care too much about what exact versions are used, but I wonder a bit what the reasons are behind using older technologies both on the JS and Tex side: In the tex part, it seems it is using bibtex rather than biber + biblatex. And on the JavaScirpt side, as far as I can tell, there is no module (not CommonJS, nor ES6) one can use, so instead one has to include the JS file coming out of this directly in a webpage. There is no way to import this as a module?

fzimmermann89 commented 7 years ago

maybe something changed since I looked the last time, but the commit changing the readme only changed the readme..

this is mostly a proof-of-concept. texlive 2015 was the latest version when this was compiled the last time. the reason for bibtex might be that it is more similar to pdftex in terms of compiling. i have almost no knowledge of js - you could write all the necessary code for using it as a module if you want

the makefile in fzimmermann/texlive.js uses a newer version of pdftex, you might want to look at other ppl's forks for texlive 2016

johanneswilm commented 7 years ago

but the commit changing the readme only changed the readme..

@chezbgone Can you explain why the Readme was updated and nothing else?

you could write all the necessary code for using it as a module if you want

@fzimmermann89 The learning curve here is a bit steep. The file that will need to be rewritten into ES6 module form would be pdftex.js [1], right?

[1] https://github.com/manuels/texlive.js/blob/master/pdftex.js

fzimmermann89 commented 7 years ago

yes, the *-worker.js files are created by emscripten and pdftex.js is a wrapper around them, so you should change pdftex.js.

i updated the makefile at my fork to use texlive 2016 if you want to use 2016 instead.