eqn: use special chars for mathematical symbols
[troff.git] / README
blob535d78184220d9b3cbeef8c8a76bbaffc5c518d8
1 TROFF TOOLS
2 ===========
4 This is the port of Plan9 troff tools to Linux which probably works
5 in other Unix variants with minor modifications.  The included
6 programs are troff, tr2ps (dpost), eqn, tbl, and pic.
8 SETTING UP
9 ==========
11 Troff needs to access data files like macros and font description
12 files.  These files are not included in this package.  The following
13 commands copy the needed files from a Plan9 root filesystem (the
14 Plan9 installation CD image would work too; just mount it and change
15 P9 to point to its directory):
17   $ # prepareing current directory as the troff data folder
18   $ P9="/path/to/plan9/root"
19   $ cp -r $P9/sys/lib/troff/* .
20   $ mkdir hyphen
21   $ cp -r $P9/sys/lib/texmf/tex/generic/hyphen/hyphen.tex hyphen/
22   $ cp -r $P9/postscript ps
24 All needed files are copied to the current folder.  Now change
25 conf.mk file in the source tree so that TBASE points to this folder.
26 Now it can be compiled:
28   $ for t in troff tr2ps eqn tbl pic; do cd $t; make; cd ..; done
30 Next, you may want to copy the binaries to a directory in your $PATH.
32 Because tr2ps reads a file that maps unicode character ranges in a
33 troff font to 256-entry postscript fonts, the multibyte characters
34 won't get displayed correctly unless suitable fonts are used.  You
35 can instruct ghostscript to use Plan9 LucidaSansUnicode* fonts to
36 display these characters correctly.  You can copy them from Plan9
37 font folder:
39   $ # we are in a directory in the ghostscript font search path
40   $ cp $P9/sys/lib/ghostscript/font/* .
41   $ cp Fontmap Fontmap.p9
42   $ sed "s,/sys/lib/postscript,$P9," <Fontmap.p9 >Fontmap
44 TODO
45 ====
47 * Decide what to do about the way tr2ps maps unicode characters to
48   postscript fonts; the current approach seems too much work when
49   adding new fonts.
50 * Remove the use of lex and yacc in eqn and pic.  I hate lex and yacc
51   as much as I like a well written recursive decent parser.
52 * Some of the tools could be cleaned up considerably