aslushnikov / latex-online

Online latex compiler. You give it a link, it gives you PDF
http://latexonline.cc
MIT License
492 stars 89 forks source link

latexonline: missing packages #58

Closed moriarty closed 3 years ago

moriarty commented 4 years ago

First- thanks again for the useful package and https://latexonline.cc

Problem

Our project isn't compiling because of an missing dependency. But cloning looking into this repo seems like it should be okay and pulling from docker and running locally it works fine.

https://latexonline.cc/compile?git=git%3A%2F%2Fgithub.com%2FRoboCupAtHome%2FRuleBook.git&target=Rulebook.tex

pdflatex -interaction nonstopmode -recorder -output-directory latex.out /tmp/downloads/tmp_106/Rulebook.tex
/usr/share/texlive/texmf-dist/tex/latex/siunitx/siunitx.sty: warning: extra `}' in log; file names may be wrong
/usr/share/texlive/texmf-dist/tex/latex/siunitx/siunitx.sty: warning: extra `}' in log; file names may be wrong
/usr/share/texlive/texmf-dist/tex/latex/siunitx/siunitx.sty: warning: extra `}' in log; file names may be wrong
setup/packages.tex:19: warning: [scrbook] Usage of package `fancyhdr' together with a KOMA-Script class is not recommended. I'd suggest to use package `scrpage2' or `scrlayer-scrpage'. Nevertheless, using requested package `fancyhdr'
setup/packages.tex:69: error: File `doclicense.sty' not found
      at <read *>
    from ^^M
setup/packages.tex: Fatal error (no output file produced)
There were errors; /tmp/storage/compilation_14/output.pdf not updated

Trying to diagnose

  1. what provides doclicense.sty ?

    apt search doclicense
    Sorting... Done
    Full Text Search... Done
    texlive-latex-extra/bionic,bionic 2017.20180305-2 all
      TeX Live: LaTeX additional packages
  2. check Dockerfile yep it's there:

    https://github.com/aslushnikov/latex-online/blob/3f387ab96afde24c295a1f7eb4541034ee8ca6b3/Dockerfile#L24

  3. Check the version https://latexonline.cc/version says it's running master #54 which AFAIK comes from https://github.com/aslushnikov/latex-online/blob/3f387ab96afde24c295a1f7eb4541034ee8ca6b3/util/docker-entrypoint.sh#L12

    https://github.com/aslushnikov/latex-online/blob/3f387ab96afde24c295a1f7eb4541034ee8ca6b3/app.js#L90-L95

  4. pull the latest image

     docker pull aslushnikov/latex-online
  5. checked inside container docker run -it aslushnikov/latex-online:latest bash if docklicense.sty exists

    root@5761505e5640:/# dpkg -S /usr/share/texlive/texmf-dist/tex/latex/doclicense/doclicense.sty
    texlive-latex-extra: /usr/share/texlive/texmf-dist/tex/latex/doclicense/doclicense.sty
    root@5761505e5640:/# exit
  6. run the container docker run -d -p 2700:2700 -t aslushnikov/latex-online and visit http://localhost:2700/compile?git=git://github.com/RoboCupAtHome/RuleBook.git&target=Rulebook.tex The project compiles fine

Questions

  1. Is the production env of not running a docker image based on Dockerfile?
  2. Is there need for two version endpoints? one latexonline.cc/version and latexonline.cc/env-version
aslushnikov commented 3 years ago

Missing packages was a big burden, so LatexOnline migrated over to official texlive distributions.

The new https://texlive2020.latexonline.cc should support everything

Is the production env of not running a docker image based on Dockerfile?

It does! Sometimes the deployment lags slightly behind though.

Is there need for two version endpoints? one latexonline.cc/version and latexonline.cc/env-version

It's hard to version environments though, so hopefully it won't be needed anymore with the texlive2020 environment.