Hi all, I've recently released dvi-decode, a Javascript module for decoding LuaTeX dvi files.
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.
Viewers for PDF, PS, and DVI ⇒ New opensource software for rendering dvi files generated by LuaTeX
- Stefan Kottwitz
- Site Admin
- Posts: 10290
- Joined: Mon Mar 10, 2008 9:44 pm
New opensource software for rendering dvi files generated by LuaTeX
Hi Matt,
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
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
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
LaTeX.org admin
New opensource software for rendering dvi files generated by LuaTeX
Thanks Stefan,
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.
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
dvi-decode has been updated to extract image references from the postscript 'specials' if they exist in the dvi file.
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
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
A further update for anyone interested.
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
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