(Answering my own question to preserve this information, but would still welcome better answers…)
Yes, NTS is usable, if you have some basic binaries of the TeX ecosystem like kpsewhich
, and certain “data” like plain.tex
, fonts, and other files. These you can get from installing TeX Live (or a similar system).
Here are the steps which seem to work (tested on Mac and Linux).
Prerequisites: make sure the kpsewhich
and java
commands exist and work. You can do the former by installing TeX Live (skip this step if you already have a working TeX system). For example on Ubuntu:
$ sudo apt install texlive-binaries
$ sudo apt install default-jre
Get the NTS sources and unzip them:
$ mkdir nts && cd nts
$ wget http://mirrors.ctan.org/systems/nts/ntsbase-1.0-beta.zip
$ unzip ntsbase-1.0-beta.zip
Make one of the nts
scripts executable (I think it doesn't really matter which), and optionally try to run it:
$ chmod +x ./bin/i386-linux/nts
$ ./bin/i386-linux/nts
nts: NTS Java Executable nts.rt.jar or Nts.class not found.
Move to the directory that contains the .jar
file:
$ cd texmf/nts/base
Optionally: try to run it:
$ ../../../bin/i386-linux/nts
nts: Can't find requested NTS .nfmt file >nts<.
Dump format file:
$ ../../../bin/i386-linux/nts -ini plain '\dump'
This is NTS, Version 1.00-beta
NTS comes with ABSOLUTELY NO WARRANTY.
This is free software, and you are welcome to redistribute
it under certain conditions; for details see the file
COPYING in the distribution
(/usr/share/texlive/texmf-dist/tex/plain/base/plain.tex
Preloading the plain format: codes, registers, parameters, fonts, more fonts,
macros, math definitions, output routines, hyphenation
(/usr/share/texlive/texmf-dist/tex/generic/hyphen/hyphen.tex))format file stored in 689 milliseconds
No pages of output.
Transcript written on plain.log.
Now it is usable!
$ ../../../bin/i386-linux/nts -fmt=plain '\input story \bye'
This is NTS, Version 1.00-beta
NTS comes with ABSOLUTELY NO WARRANTY.
This is free software, and you are welcome to redistribute
it under certain conditions; for details see the file
COPYING in the distribution
./plain.nfmt loaded in 1120 milliseconds
(/usr/share/texlive/texmf-dist/tex/plain/knuth-lib/story.tex [1])
Output written on story.dvi (1 page, 668 bytes).
Transcript written on story.log.
This story.dvi
has our familiar beloved story:

I tried this with some other bigger plain TeX files, such as gentle.tex
, the source to the book A Gentle Introduction to TeX. It works.
It is noticeably slower (even in 2017): while tex gentle.tex
takes 0.05 seconds, ../../../bin/i386-linux/nts -fmt=plain gentle.tex
takes 3.71 seconds. This may be acceptable though. Note that although the font files and other files are loaded from the TeX Live installation (probably after being looked up with kpsewhich
), the actual code that does the typesetting is all Java code.
The curious thing is that the dvi files produced by nts
and by tex
(the one from TeX Live) are slightly different: you can run dvitype
on the respective DVI files to see that the calculated positions have tiny differences and even different order of commands. So I'm curious about the "passed trip test" remark (but perhaps the trip test doesn't require identical DVI files either). Nevertheless, visually there is no difference in line breaks or page breaks, or the positions of characters, as best as I can see.
java -jar texmf/nts/base/nts.rt.jar test.tex
to compile your sample INI-TeX document (there are not formats provided). Also the output will be pretty boring as there are no fonts provided either.