Viewers for PDF, PS, and DVI ⇒ New opensource software for rendering dvi files generated by LuaTeX
New opensource software for rendering dvi files generated by LuaTeX
This may be useful to developers out there that need a solution to render LaTeX to the browser.
I have a demo React app running here: DVI Viewer
Happy to answer any questions.
Matt.
Learn LaTeX easily with newest books:
The LaTeX Beginner's Guide: 2nd edition and perfect for students writing a thesis
The LaTeX Cookbook: 2nd edition full of practical examples for mathematics, physics, chemistry, and more
LaTeX Graphics with TikZ: the first book about TikZ for perfect drawings in your LaTeX thesis
- Stefan Kottwitz
- Site Admin
- Posts: 10358
- Joined: Mon Mar 10, 2008 9:44 pm
New opensource software for rendering dvi files generated by LuaTeX
welcome to the forum!
Thank you for sharing this information. That's a very interesting project. Especially as it's based on DVI instead of the usual PDF. I tested it with sample LuaLaTeX files but failed for now, probably because of a missing
Renderer=Opentype
option, but my test files were just plots without text. I used LuaLaTeX for plotting (memory issues), so font loading with Renderer=Opentype
is new to me. No worries, that was just my first try, I will see how it works.By the way, on many sites (this forum and others, TikZ.net and other galleries), we use the compiler at TeXlive.net that has a similar purpose, rendering LaTeX files in a web browser, just including compiling. It may be an interesting combination.
Stefan
New opensource software for rendering dvi files generated by LuaTeX
dvi-decode is still somewhat experimental and does not yet support images. I will add note about this on the demo. I know that the image filenames are written to the dvi file as 'special' commands by LuaTeX, so I will look into extracting that data.
[Renderer=Opentype] is required the ensure the expected character encodings are written to the dvi file. I had noticed variations in encodings produced with different LuaTeX Renderer modes, so to simplify coding I constrained the supported options to the OpenType mode only.
I see the dvi format as a better fit for a web-based rendering pipeline since resources such as fonts and images can easily be served separately. i.e. we don't necessarily require a "portable" document format.
Matt.
New opensource software for rendering dvi files generated by LuaTeX
Referenced EPS files should be converted to SVG for use in browser.
See a new demo including images here https://matjp.github.io/dvi-viewer/
Matt
New opensource software for rendering dvi files generated by LuaTeX
dvi-decode v0.3.0 has been released which removes the dependency on the OpenType renderer. So, you no longer need to re-declare fonts. The default font options should work.
However, there is now a requirement that you build your dvi file on a system with the package 'luaotfload' version >= 3.15
https://github.com/matjp/dvi-decode
Matt