diff options
author | Norbert Preining <norbert@preining.info> | 2019-09-02 13:46:59 +0900 |
---|---|---|
committer | Norbert Preining <norbert@preining.info> | 2019-09-02 13:46:59 +0900 |
commit | e0c6872cf40896c7be36b11dcc744620f10adf1d (patch) | |
tree | 60335e10d2f4354b0674ec22d7b53f0f8abee672 /indexing/makeindex/troff |
Initial commit
Diffstat (limited to 'indexing/makeindex/troff')
-rw-r--r-- | indexing/makeindex/troff/ixmac | 6 | ||||
-rw-r--r-- | indexing/makeindex/troff/makeind | 23 | ||||
-rw-r--r-- | indexing/makeindex/troff/sample.idx | 4 | ||||
-rw-r--r-- | indexing/makeindex/troff/sample.ilg | 7 | ||||
-rw-r--r-- | indexing/makeindex/troff/sample.ind | 72 | ||||
-rw-r--r-- | indexing/makeindex/troff/sample.txt | 14 | ||||
-rw-r--r-- | indexing/makeindex/troff/troff.ist | 54 |
7 files changed, 180 insertions, 0 deletions
diff --git a/indexing/makeindex/troff/ixmac b/indexing/makeindex/troff/ixmac new file mode 100644 index 0000000000..7205947fad --- /dev/null +++ b/indexing/makeindex/troff/ixmac @@ -0,0 +1,6 @@ +. +.de IX +.ie '\\n(.z'' .tm IX: \\$1 \\$2 \\$3 \\$4 \\$5 \\$6 \\$7 \\$8 \\$9 {\\n(PN} +.el \\!.IX \\$1 \\$2 \\$3 \\$4 \\$5 \\$6 \\$7 \\$8 \\$9 {\\n(PN} +.. + diff --git a/indexing/makeindex/troff/makeind b/indexing/makeindex/troff/makeind new file mode 100644 index 0000000000..a3621f0c6b --- /dev/null +++ b/indexing/makeindex/troff/makeind @@ -0,0 +1,23 @@ +#!/bin/sh + +extract="ptroff -ms -t" +grep=egrep +in=$1 +out=/dev/null +base=`echo $in | sed 's/\(.*\)\..*/\1/'` +idx=$base.idx +tmp=/tmp/$idx +cmd='^IX:' +sty = troff.ist + +echo -n "Extracting index terms from $in..." +$extract $in > $out 2> $tmp +echo "done" + +echo -n "Writing index terms to $idx..." +$grep $cmd $tmp > $idx +rm -f $tmp +echo "done" + +makeindex -s $sty $idx + diff --git a/indexing/makeindex/troff/sample.idx b/indexing/makeindex/troff/sample.idx new file mode 100644 index 0000000000..1ac7603a64 --- /dev/null +++ b/indexing/makeindex/troff/sample.idx @@ -0,0 +1,4 @@ +IX: {indexing!programs!C language} {1} +IX: {makeindex@\fImakeindex\fP(1L)} {1} +IX: {Knuth} {2} +IX: {typesetting!computer-aided} {2} diff --git a/indexing/makeindex/troff/sample.ilg b/indexing/makeindex/troff/sample.ilg new file mode 100644 index 0000000000..5b65bbba86 --- /dev/null +++ b/indexing/makeindex/troff/sample.ilg @@ -0,0 +1,7 @@ +This is makeindex, portable version 2.6 [7-14-88]. +Scanning style file troff.ist..........................done (26 attributes redefined, 0 ignored). +Scanning input file sample.idx....done (4 entries accepted, 0 rejected). +Sorting entries....done (9 comparisons). +Generating output file sample.ind....done (71 lines written, 0 warnings). +Output written in sample.ind. +Transcript written in sample.ilg. diff --git a/indexing/makeindex/troff/sample.ind b/indexing/makeindex/troff/sample.ind new file mode 100644 index 0000000000..48fdd068f2 --- /dev/null +++ b/indexing/makeindex/troff/sample.ind @@ -0,0 +1,72 @@ +.\" start of index output + +.SH +.ce +\s+2INDEX\s-2 + +.2C +.de IS +.sp 0.5 +\s+2\fB +.ce +.. +.de IE +.sp 0.5 +\s-2\fP +.. +.de I1 +.ti 0.25i +.. +.de 1I +.ti 0.25i +.. +.de I2 +.ti 0.5i +.. +.de 2I +.ti 0.5i +.. + + + +.IS +I +.IE + +.br +indexing +.1I +programs +.2I +C language, 1. +.sp + + +.IS +K +.IE + +.br +Knuth, 2. +.sp + + +.IS +M +.IE + +.br +\fImakeindex\fP(1L), 1. +.sp + + +.IS +T +.IE + +.br +typesetting +.1I +computer-aided, 2. + +.\" end of index output
\ No newline at end of file diff --git a/indexing/makeindex/troff/sample.txt b/indexing/makeindex/troff/sample.txt new file mode 100644 index 0000000000..a30633e6d3 --- /dev/null +++ b/indexing/makeindex/troff/sample.txt @@ -0,0 +1,14 @@ +. +.de IX +.ie '\\n(.z'' .tm IX: \\$1 \\$2 \\$3 \\$4 \\$5 \\$6 \\$7 \\$8 \\$9 {\\n(PN} +.el \\!.IX \\$1 \\$2 \\$3 \\$4 \\$5 \\$6 \\$7 \\$8 \\$9 {\\n(PN} +.. + +This is a sample file to test the \fImakeindex\fP(1L) program, and see +.IX {indexing!programs!C language} +.IX {makeindex@\fImakeindex\fP(1L)} +.bp +.rs +.IX {Knuth} +.IX {typesetting!computer-aided} +how well if functions in the \fItroff\fP(1) environment. diff --git a/indexing/makeindex/troff/troff.ist b/indexing/makeindex/troff/troff.ist new file mode 100644 index 0000000000..9e0df84d40 --- /dev/null +++ b/indexing/makeindex/troff/troff.ist @@ -0,0 +1,54 @@ +keyword "IX:" +preamble +".\\\" start of index output + +.SH +.ce +\\s+2INDEX\\s-2 + +.2C +.de IS +.sp 0.5 +\\s+2\\fB +.ce +.. +.de IE +.sp 0.5 +\\s-2\\fP +.. +.de I1 +.ti 0.25i +.. +.de 1I +.ti 0.25i +.. +.de I2 +.ti 0.5i +.. +.de 2I +.ti 0.5i +..\n" +postamble "\n\n.\\\" end of index output\n" +setpage_prefix "\n.nr % 1\n" +setpage_suffix "" +group_skip "\n.sp" +headings_flag 1 +heading_prefix "\n\n\n.IS\n" +heading_suffix "\n.IE\n" +item_0 "\n.br\n" +item_1 "\n.I1\n" +item_2 "\n.I2\n" +item_01 "\n.I1\n" +item_x1 "\n.1I\n" +item_12 "\n.I2\n" +item_x2 "\n.2I\n" +delim_0 ", " +delim_1 ", " +delim_2 ", " +delim_r "-" +delim_t "." +encap_prefix "\\fB" +encap_infix "" +encap_suffix "\\fP" +indent_space " " +indent_length 8 |