Skip to content

Thoughtscript/latex_docker

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

25 Commits
 
 
 
 
 
 
 
 

Repository files navigation

LaTeX Docker

  • Setup the necessary LaTeX dependencies
  • Mount files
  • Generate a PDF
  • Host the PDF through a static file server
  • Support for uploading text through the browser
  • Support for regenerating the pdf within the container
  • Support for writing LaTeX in the browser (and rendering it)
  • Support for saving LaTeX in the browser to paper.tex
  • Better styling
  • Better editing
  • Better navigation
  • Tweak some JS and HTML functionality around redirects, rerendering, and prevent default
docker-compose up

# If using Docker Compose Engine V2:
docker compose up

View the PDF and write LaTeX:

  1. https://localhost/public/
    • A view, into the container (can also get the PDF from Docker Desktop > Container Files). (Experimental)
  2. https://localhost/public/editor.html
    • A compressed view into the container to edit and modify LaTeX. (Experimental)
    • Lacks support for many commonly used libraries like amsmath (but does support basic LaTeX to some extent).
    • This is mostly to explore the limits of the LATEX.js
  3. https://localhost/public/viewer.html
    • A compressed view into the container to compile and view pdf's.
  4. https://localhost/public/pdfeditor.html
    • Slightly more reliable way to edit and render text live.
    • Use this view by default.
    • Has supprt for amsmath and most other commonly used libraries.

API Endpoints

  1. https://localhost/api/pdf/make - POST endpoint that'll regenerate the PDF file without having to restart the container. Is called from the view above.
  2. https://localhost/api/pdf/upload - POST endpoint that'll allow a file to be uploaded to overwrite paper.tex so it can be recompile (allows raw .tex files to uploaded to the container to be compiled into .pdf).
  3. https://localhost/api/latex/save - POST endpoint to save inputted text to paper.tex (better UI and Nav features to be added to provide basic but fuller text editor support).

Note: all of the commands assume paper.tex is the relevant filename and filetype.

Resources and Links

  1. https://wch.github.io/latexsheet/latexsheet-0.png
  2. https://linuxconfig.org/how-to-install-latex-on-ubuntu-20-04-focal-fossa-linux
  3. https://www.latex-project.org/help/documentation/usrguide-historic.pdf
  4. https://askubuntu.com/questions/1034019/18-04-cannot-install-texlive-full
  5. https://tutorialedge.net/golang/go-file-upload-tutorial/
  6. https://opensource.com/article/18/6/copying-files-go

About

LaTeX in Docker with client to view, edit

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published