summaryrefslogtreecommitdiff
path: root/tmac
diff options
context:
space:
mode:
Diffstat (limited to 'tmac')
-rw-r--r--tmac/dvi.tmac18
-rw-r--r--tmac/html.tmac25
-rw-r--r--tmac/lj4.tmac5
-rw-r--r--tmac/ps.tmac23
-rw-r--r--tmac/troffrc7
-rw-r--r--tmac/tty.tmac28
6 files changed, 84 insertions, 22 deletions
diff --git a/tmac/dvi.tmac b/tmac/dvi.tmac
index d404794b..5dc374c8 100644
--- a/tmac/dvi.tmac
+++ b/tmac/dvi.tmac
@@ -2,17 +2,20 @@
.\"
.nr _C \n(.C
.cp 0
+.
.ftr CR CW
.ftr C CW
.ftr CO CWI
.ftr CI CWI
.ftr TT CW
.ftr H HR
+.
.special TR TI
.fspecial TI CWI
.fspecial TBI CWI
.fspecial HI CWI
.fspecial HBI CWI
+.
.\" This uses the dvi-char_1 string in font CW or CWI, dvi-char_0 otherwise.
.char _ \
\R'dvi-char_ ((\\n[.f] == \f[CW]\\n[.f]\f[P]) : \
@@ -23,6 +26,7 @@
.ds dvi-char_0 \Z'\v'.23m'\D'R .54m .04m''\h'.5m'
.\" In font CW and CWI use a real _ character.
.ds dvi-char_1 _
+.
.if !c\[radicalex] .char \[radicalex] \D'R .5m -.04m'\v'.04m'
.if !c\[br] .char \[br] \Z'\v'.25m'\D'R .04m -1m''
.if !c\[ru] .char \[ru] \Z'\v'-.02m'\D'R .54m .04m''\h'.5m'
@@ -59,6 +63,7 @@ D\v'-.33m'\s0\v'.33m'
.if !c\[nb] .char \[nb] \[slashnot]\[sb]
.cflags 8 \[an]
.if !c\[an] .char \[an] \h'-.167m'\[mi]\h'-.167m'
+.
.\" Define some fractions.
.de dvi-frac
. if !c\[\\$1\\$2] \
@@ -66,6 +71,7 @@ D\v'-.33m'\s0\v'.33m'
\v'-.25m'\s[\\\\n[.s]*7u/10u]\\$1\s0\v'.25m'\h'-.2m'\
/\h'-.2m'\v'.25m'\s[\\\\n[.s]*7u/10u]\\$2\s0\v'-.25m'
..
+.
.dvi-frac 1 2
.dvi-frac 3 4
.dvi-frac 1 4
@@ -73,6 +79,7 @@ D\v'-.33m'\s0\v'.33m'
.dvi-frac 3 8
.dvi-frac 5 8
.dvi-frac 7 8
+.
.\" support for ISO Latin-1
.if !c\[S1] .char \[S1] \v'-.2m'\s-31\s+3\v'+.2m'
.if !c\[S2] .char \[S2] \v'-.2m'\s-32\s+3\v'+.2m'
@@ -84,6 +91,7 @@ D\v'-.33m'\s0\v'.33m'
.if !c\[bb] .char \[bb] |
.if !c\[Ye] .char \[Ye] \o'-Y'
.if !c\[Cs] .char \[Cs] \o'\[mu]o'
+.
.de dvi-achar
. \" Note that character definitions are always interpreted with
. \" compatibility mode off.
@@ -99,6 +107,7 @@ D\v'-.33m'\s0\v'.33m'
. \}
. hcode \\$1\\$4
..
+.
.dvi-achar \[`A] \` A a
.dvi-achar \['A] \' A a
.dvi-achar \[^A] ^ A a
@@ -154,6 +163,7 @@ D\v'-.33m'\s0\v'.33m'
.hcode \[,C]c
.if !c\[,c] .char \[,c] \o'\[ac]c'
.hcode \[,c]c
+.
.\" now for color definitions
.\"
.\" this is a composite of MIT's X Consortium red/green/blue (rgb) color
@@ -703,8 +713,10 @@ D\v'-.33m'\s0\v'.33m'
.defcolor yellow2 rgb #eeee00
.defcolor yellow3 rgb #cdcd00
.defcolor yellow4 rgb #8b8b00
+.
.cp \n(_C
-.ie '\*(.T'cp1047' \
-. do mso cp1047.tmac
-.el \
+.
+.do ie '\[char97]'a' \
. do mso latin1.tmac
+.el \
+. do mso cp1047.tmac
diff --git a/tmac/html.tmac b/tmac/html.tmac
index 3ae0e39c..8a82def3 100644
--- a/tmac/html.tmac
+++ b/tmac/html.tmac
@@ -2,7 +2,9 @@
.\"
.nr _C \n(.C
.cp 0
+.
.nroff
+.
.ftr CW CR
.ftr C CR
.ftr CO CI
@@ -11,6 +13,7 @@
.ftr HO HI
.ftr HX HBI
.ftr NX NBI
+.
.if !c\(em .char \(em --
.if !c\(en .char \(en \-
.if !c\(fi .char \(fi fi
@@ -27,11 +30,10 @@
.if !c\(rh .char \(rh ->
.if !c\(bq .tr \(bq,
.if !c\(aq .tr \(aq'
-.\"
+.
.\" Now set any characters defined in devps/S but not in devhtml/S to nul --
.\" these are generated by eqn but not used by grohtml. grops generated
.\" images during the alternative pass.
-.\"
.if !c\(*y .tr \(*y
.if !c\(fa .tr \(fa
.if !c\(te .tr \(te
@@ -202,21 +204,24 @@
.if d oh .oh ''''
.if d eh .eh ''''
.tl ''''
+.
.\" it doesn't make sense to use hyphenation with html, so we turn it off.
.hy 0
.nr HY 0
+.
.\" avoid line breaks after hyphen-like characters.
.cflags 0 -\(hy\(em\(en\[shc]
+.
.pl 99999
+.
.\" now for the color definitions
.\"
.\" html-4.0 colors
.\"
.defcolor white rgb #ffffff
.defcolor fuchsia rgb #ff00ff
-.\"
+.
.\" these colors are compliant with html-3.0 and above
-.\"
.defcolor aliceblue rgb #eff7ff
.defcolor antiquewhite rgb #f9e8d2
.defcolor antiquewhite1 rgb #feedd6
@@ -695,10 +700,18 @@
.defcolor yellow rgb #ffff00
.defcolor yellow1 rgb #fffc17
.defcolor yellowgreen rgb #52d017
+,
.\" set default glyph color to black (leave the background color alone)
\m[black]\c
.
-.if !\n(_C .mso pspic.tmac
.cp \n(_C
-.\"
+.
+.if !\n(_C \
+. mso pspic.tmac
+.
+.do ie '\[char97]'a' \
+. do mso latin1.tmac
+.el \
+. do mso cp1047.tmac
+.
.\" end of file, make sure this is the last line
diff --git a/tmac/lj4.tmac b/tmac/lj4.tmac
index b5644e46..44f097ca 100644
--- a/tmac/lj4.tmac
+++ b/tmac/lj4.tmac
@@ -2,6 +2,7 @@
.\"
.nr _C \n(.C
.cp 0
+.
.ftr CW CR
.ftr C CR
.ftr CX CBI
@@ -12,9 +13,13 @@
.ftr HI UI
.ftr HO UI
.ftr HX UBI
+.
.\" This is designed so that \(ul, \(rn and \(br form corners.
.if !c\[br] .char \[br] \Z'\v'.25m'\D'R .04m -1m''
.if !c\[ru] .char \[ru] \Z'\v'-.02m'\D'R .54m .04m''\h'.5m'
.if !c\[rn] .char \[rn] \Z'\v'-.77m'\D'R .54m .04m''\h'.5m'
.if !c\[ul] .char \[ul] \Z'\v'.23m'\D'R .54m .04m''\h'.5m'
+.
.cp \n(_C
+.
+.do mso latin1.tmac
diff --git a/tmac/ps.tmac b/tmac/ps.tmac
index 5795bba9..36c67b94 100644
--- a/tmac/ps.tmac
+++ b/tmac/ps.tmac
@@ -2,6 +2,7 @@
.\"
.nr _C \n(.C
.cp 0
+.
.ftr AX ABI
.ftr KR BMR
.ftr KI BMI
@@ -22,6 +23,7 @@
.ftr PX PBI
.ftr ZI ZCMI
.ftr C CR
+.
.cflags 8 \(an
.char \[radicalex] \h'-\w'\(sr'u'\[radicalex]\h'\w'\(sr'u'
.char \(mo \h'.08m'\(mo\h'-.08m'
@@ -32,11 +34,12 @@
.char \[parenrighttp] \[parenrighttp]\h'.016m'
.char \[parenrightbt] \[parenrightbt]\h'.016m'
.char \[parenrightex] \[parenrightex]\h'.016m'
+.
.if !c\[va] .char \[va] \o'\[ua]\[da]'
.if !c\[ci] \
-.char \[ci] \v'-.25m'\h'.05m'\D'c .5m'\h'.05m'\v'.25m'
+. char \[ci] \v'-.25m'\h'.05m'\D'c .5m'\h'.05m'\v'.25m'
.if !c\[sq] \
-.char \[sq] \h'.05m'\D'l .5m 0'\D'l 0 -.5m'\D'l -.5m 0'\D'l 0 .5m'\h'.55m'
+. char \[sq] \h'.05m'\D'l .5m 0'\D'l 0 -.5m'\D'l -.5m 0'\D'l 0 .5m'\h'.55m'
.if !c\[ru] .char \[ru] \D'l .5m 0'
.if !c\[ul] .char \[ul] \v'.25m'\D'l .5m 0'\v'-.25m'
.if !c\[br] .char \[br] \Z'\v'.25m'\D'l 0 -1m''
@@ -48,13 +51,14 @@
.if !c\[ij] .char \[ij] ij
.if !c\[IJ] .char \[IJ] IJ
.if !c\[tm] .char \[tm] \s-3\v'-.3m'TM\v'+.3m'\s+3
+.
.\" pic tests this register to see whether it should use \X'ps:...'
.nr 0p 1
+.
.\" now for color definitions
.\"
.\" this is a composite of MIT's X Consortium red/green/blue (rgb) color
.\" specifications, X Consortium version 10.41, 1994.
-.\"
.defcolor black rgb #000000
.defcolor grey rgb #bebebe
.defcolor dimgrey rgb #696969
@@ -599,10 +603,15 @@
.defcolor yellow2 rgb #eeee00
.defcolor yellow3 rgb #cdcd00
.defcolor yellow4 rgb #8b8b00
+.
.cp \n(_C
-.if !\n(.C .mso pspic.tmac
-.ie '\*(.T'cp1047' \
-. do mso cp1047.tmac
-.el \
+.
+.if !\n(.C \
+. mso pspic.tmac
+.
+.do ie '\[char97]'a' \
. do mso latin1.tmac
+.el \
+. do mso cp1047.tmac
+.
.\" make sure that no blank lines creep in at the end of this file.
diff --git a/tmac/troffrc b/tmac/troffrc
index 09ed3a28..f51eb876 100644
--- a/tmac/troffrc
+++ b/tmac/troffrc
@@ -24,8 +24,11 @@
.do rm troffrc!ps troffrc!Xps troffrc!dvi troffrc!X75 troffrc!X75-12 \
troffrc!X100 troffrc!X100-12 troffrc!lj4 troff!lbp troffrc!html
.
-.ie '\*(.T'cp1047' .do tr \[char65]\~
-.el .do tr \[char160]\~
+.\" test whether we work under EBCDIC
+.do ie '\[char97]'a' \
+. do tr \[char160]\~
+.el \
+. do tr \[char65]\~
.
.\" Set the hyphenation language to `us'.
.do hla us
diff --git a/tmac/tty.tmac b/tmac/tty.tmac
index 1c3f14fa..2fde64e0 100644
--- a/tmac/tty.tmac
+++ b/tmac/tty.tmac
@@ -2,16 +2,27 @@
.\"
.nr _C \n(.C
.cp 0
+.
.nroff
+.
.\" Don't warn about non-existent fonts.
.warn \n[.warn]-(\n[.warn]/131072%2*131072)
+.
.po 0
-.if c\[shc] .shc \[shc]
+.
+.if c\[shc] \
+. shc \[shc]
+.
.de tty-char
-.if !c\\$1 .char \\$1 "\\$2
+. if !c\\$1 \
+. char \\$1 "\\$2
..
-.ie c\(pc .tr \(bu\(pc
-.el .if c\(md .tr \(bu\(md
+.
+.ie c\(pc \
+. tr \(bu\(pc
+.el
+. if c\(md \
+. tr \(bu\(md
.tty-char \(bu \z+o
.tty-char \(14 1/4
.tty-char \(12 1/2
@@ -46,6 +57,7 @@
.tty-char \(an -
.tty-char \(eu EUR
.tty-char \(Eu EUR
+.
.\" color definitions
.defcolor black rgb #000000
.defcolor red rgb #ff0000
@@ -55,7 +67,15 @@
.defcolor magenta rgb #ff00ff
.defcolor cyan rgb #00ffff
.defcolor white rgb #ffffff
+.
.cp \n(_C
+.
+.ie '\*(.T'cp1047' \
+. do mso cp1047.tmac
+.el \
+. if '\*(.T'latin1' \
+. do mso latin1.tmac
+.
.\" If you want the character definitions in tty-char.tmac to be loaded
.\" automatically, remove the `\"' from the next line.
.\"do mso tty-char.tmac