Get the troff2page distribution from GitHub:
git clone https://github.com/ds26gte/troff2page
This creates a directory troff2page
. cd
to it.
Copy the script bin/troff2page.lua
(bin/troff2page
is a soft
link) to a directory in your PATH.
Copy the file man/man1/troff2page.1
to the man1
subdirectory of a
directory in your MANPATH
.
troff2page can, if it finds them on your system, can make
effective use of the *.tmac
files from the mpca
repo. mpca
is available from https://github.com/ds26gte/mpca. Getting mpca
is
optional: You can still use troff2page fruitfully even
if you have no need for the mpca
features.
The troff2page documentation (in the docs
subdirectory) does
rely on mpca
. However, the Makefile
in the docs
directory
will get the needed macro files for one-off use if it doesn’t
find them on your system.
Note
|
If you do decide to download mpca , include its tmac subdirectory in
your GROFF_TMAC_PATH ; or add the pca*.tmac files in it to
some directory already in your GROFF_TMAC_PATH . In a pinch, if
you don’t want to mess with GROFF_TMAC_PATH , you may simply
copy these *.tmac files to your home directory.
|
You can now consult the man page troff2page(1)
to get started with using troff2page.
man troff2page
troff2page.lua
has been tested on Lua 5.1.5, 5.2.4 and
5.3.3; LuaJIT 2.0.4; RaptorJIT 1.0.0; Neovim 0.5.0-dev; and
LuaTeX 1.12.0.
Note
|
The branch lisp in the troff2page git repository contains
an older implementation in Common Lisp.
|
Documentation for troff2page is available online at http://ds26gte.github.io/troff2page/index.html.
The troff sources for this document, index.ms
and subfiles, are
available in the docs
subdirectory of the distribution. It can
be processed with either groff or troff2page. To convert it into
HTML, you must have installed troff2page, including the macro
files that come with this distribution, as described above.
If calling groff on index.ms
, you will need to run groff twice
in order to pick up all the auxiliary file info. (There will be a
message reminding you to do so.)