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

Missing packages -- how to add them? #22

Open ocram opened 9 years ago

ocram commented 9 years ago

When I call \usepackage{...} with some fancier packages, it usually fails due to a missing file.

Examples: tabu.sty, booktabs.sty, xcolor.sty, setspace.sty, changepage.sty, url.sty

I think this wiki section is there to help. But I still have some open questions:

Do I need to compile something with emscripten whenever I want to add new packages?

Or is it enough if I just add the original .sty files to texlive/texmf-dist/tex/latex/ and then add the filename to supported_packages in website/texlive.js?

Can someone who has successfully added packages help? Thanks!

manuels commented 9 years ago

No, compilation should not be necessary.

ocram commented 9 years ago

I've added all the .sty files from my local TeXLive to texlive.js but I'm still seeing the same error.

Moreover, I wasn't able to add the filenames to the supported_packages array as described here because that file doesn't even exist in the repository anymore.

So texlive.js must be checking and loading packages dynamically, right?

Any chance there's just a small bug preventing texlive.js from finding my tabu.sty which is actually there?

Another error message:

! Package babel Error: Unknown option `ngerman'. Either you misspelled it

(babel)                or the language definition file ngerman.ldf was not foun

d.

Seems to belong to the same class of problems. The file ngerman.ldf is actually there, but texlive.js just doesn't find it, apparently.

ocram commented 9 years ago

What about commands like texhash (that you normally run whenever you added new files) or updmap-sys --enable Map=fontname.map (that you normally run whenever you added a font with a .map file)? Can we execute them in texlive.js as well? Maybe that will be the solution :)

manuels commented 9 years ago

I'd suggest using strace -e open pdlatex ... to figure out the path where latex looks up ngerman.ldf

swenzel commented 8 years ago

I managed to include the package setspace.

What I did was copying setspace.sty to texlive/texmf-dist/tex/latex/setspace/setspace.sty and adding it both to texlive/texmf-dist/ls-R and to texlive.lst.

Later I found out that you can update texlive.lst by running make texlive.lst and an ls-R file can be updated by navigating into its directory and running ls -R -1 > ls-R.

Zabeth29 commented 3 years ago

Hello :) Is there any news about how to install packages such as xltabular.sty on a texlive.js environement ? I already tested what swenzel suggested but it didn't work for me. Thank you !!