summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorwlemb <wlemb>2000-05-01 23:47:44 +0000
committerwlemb <wlemb>2000-05-01 23:47:44 +0000
commit2c0949ae3971f828dada200411e9ed5bc10bbee2 (patch)
tree6ca387a5c346301d8d77c0331edf65fa8f1cdbcd /src
parent9488c96501d04584e4e0f47b142fa49e3e865ce2 (diff)
downloadgroff-2c0949ae3971f828dada200411e9ed5bc10bbee2.tar.gz
Added grap support to grog.
* src/roff/grog/grog.sh, src/roff/grog/grog.pl: Implement it. * src/roff/grog/grog.man: Document it. * doc/groff.texinfo, NEWS: Add info about grap support. Add new man pages comptributed by Bernd Warken <bwarken@mayn.de> (with slight fixes by me). * tmac/groff_tmac.man: New file documenting tmac mechanism. * tmac/Makefile.sub: Add groff_tmac.man. * man/roff.man: New file giving overview of roff system. * man/troff.man: A short reference of troff. * man/Makefile.sub: Add roff.man and troff.man. Added grap support to groff. * src/roff/groff/groff.cc: Implement it. * src/roff/groff/groff.man: Document it.
Diffstat (limited to 'src')
-rw-r--r--src/roff/groff/groff.cc11
-rw-r--r--src/roff/groff/groff.man19
-rw-r--r--src/roff/grog/grog.man2
-rw-r--r--src/roff/grog/grog.pl12
-rw-r--r--src/roff/grog/grog.sh8
5 files changed, 44 insertions, 8 deletions
diff --git a/src/roff/groff/groff.cc b/src/roff/groff/groff.cc
index 04ae853b..d301e207 100644
--- a/src/roff/groff/groff.cc
+++ b/src/roff/groff/groff.cc
@@ -52,7 +52,8 @@ extern "C" {
const int SOELIM_INDEX = 0;
const int REFER_INDEX = SOELIM_INDEX + 1;
-const int PIC_INDEX = REFER_INDEX + 1;
+const int GRAP_INDEX = REFER_INDEX + 1;
+const int PIC_INDEX = GRAP_INDEX + 1;
const int TBL_INDEX = PIC_INDEX + 1;
const int GRN_INDEX = TBL_INDEX + 1;
const int EQN_INDEX = GRN_INDEX + 1;
@@ -115,7 +116,7 @@ int main(int argc, char **argv)
command_prefix = PROG_PREFIX;
commands[TROFF_INDEX].set_name(command_prefix, "troff");
while ((opt = getopt(argc, argv,
- "abCd:eEf:F:ghiI:lL:m:M:n:No:pP:r:RsStT:UvVw:W:XzZ"))
+ "abCd:eEf:F:gGhiI:lL:m:M:n:No:pP:r:RsStT:UvVw:W:XzZ"))
!= EOF) {
char buf[3];
buf[0] = '-';
@@ -138,6 +139,9 @@ int main(int argc, char **argv)
case 'g':
commands[GRN_INDEX].set_name(command_prefix, "grn");
break;
+ case 'G':
+ commands[GRAP_INDEX].set_name(command_prefix, "grap");
+ break;
case 'e':
commands[EQN_INDEX].set_name(command_prefix, "eqn");
break;
@@ -164,6 +168,7 @@ int main(int argc, char **argv)
case 'C':
commands[SOELIM_INDEX].append_arg(buf);
commands[PIC_INDEX].append_arg(buf);
+ commands[GRAP_INDEX].append_arg(buf);
commands[TBL_INDEX].append_arg(buf);
commands[GRN_INDEX].append_arg(buf);
commands[EQN_INDEX].append_arg(buf);
@@ -215,6 +220,7 @@ int main(int argc, char **argv)
break;
case 'M':
commands[EQN_INDEX].append_arg(buf, optarg);
+ commands[GRAP_INDEX].append_arg(buf, optarg);
commands[GRN_INDEX].append_arg(buf, optarg);
commands[TROFF_INDEX].append_arg(buf, optarg);
break;
@@ -569,6 +575,7 @@ void help()
"-p\tpreprocess with pic\n"
"-e\tpreprocess with eqn\n"
"-g\tpreprocess with grn\n"
+"-G\tpreprocess with grap\n"
"-s\tpreprocess with soelim\n"
"-R\tpreprocess with refer\n"
"-Tdev\tuse device dev\n"
diff --git a/src/roff/groff/groff.man b/src/roff/groff/groff.man
index a09a71e9..23dbf8e7 100644
--- a/src/roff/groff/groff.man
+++ b/src/roff/groff/groff.man
@@ -41,7 +41,7 @@ groff \- front end for the groff document formatting system
.ie \\n(.$-1 .RI "[\ \fB\\$1\fP" "\\$2" "\ ]"
.el .RB "[\ " "\\$1" "\ ]"
..
-.OP \-abeghilpstvzCENRSUVXZ
+.OP \-abeghilpstvzCEGNRSUVXZ
.OP \-w name
.OP \-W name
.OP \-m name
@@ -118,6 +118,8 @@ The default device is
It can optionally preprocess with any of
.BR @g@pic ,
.BR @g@eqn ,
+.BR @g@grn ,
+.BR grap ,
.BR @g@tbl ,
.BR @g@refer ,
or
@@ -147,6 +149,9 @@ Preprocess with @g@tbl.
.B \-g
Preprocess with @g@grn.
.TP
+.B \-G
+Preprocess with grap.
+.TP
.B \-p
Preprocess with @g@pic.
.TP
@@ -324,6 +329,7 @@ This also applies to
and
.BR soelim .
It does not apply to
+.BR grap ,
.BR grops ,
.BR grodvi ,
.BR grotty ,
@@ -425,6 +431,14 @@ Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
.SH AVAILABILITY
The most recent released version of groff is always available for
anonymous ftp from ftp.gnu.org in the directory gnu/groff.
+.LP
+.B groff
+only supports the freely available
+.B grap
+implementation written by Ted Faber <faber@lunabase.org>.
+The actual version can be found at
+.IP
+\%http://www.lunabase.org/~faber/Vault/software/grap/
.SH "SEE ALSO"
.BR grog (@MAN1EXT@),
.BR @g@troff (@MAN1EXT@),
@@ -432,7 +446,8 @@ anonymous ftp from ftp.gnu.org in the directory gnu/groff.
.BR @g@pic (@MAN1EXT@),
.BR @g@eqn (@MAN1EXT@),
.BR @g@grn (@MAN1EXT@),
-.BR @g@soelim (@MAN1EXT@) ,
+.BR grap (1),
+.BR @g@soelim (@MAN1EXT@),
.BR @g@refer (@MAN1EXT@),
.BR grops (@MAN1EXT@),
.BR grodvi (@MAN1EXT@),
diff --git a/src/roff/grog/grog.man b/src/roff/grog/grog.man
index fa216113..86902d20 100644
--- a/src/roff/grog/grog.man
+++ b/src/roff/grog/grog.man
@@ -43,6 +43,7 @@ options
.BR \-p ,
.BR \-R ,
.BR \-g ,
+.BR \-G ,
.BR \-s ,
and
.BR \-t
@@ -73,4 +74,5 @@ option.
.BR @g@eqn (@MAN1EXT@),
.BR @g@refer (@MAN1EXT@),
.BR @g@grn (@MAN1EXT@),
+.BR grap (1),
.BR @g@soelim (@MAN1EXT@)
diff --git a/src/roff/grog/grog.pl b/src/roff/grog/grog.pl
index 91edefbd..416d5b3d 100644
--- a/src/roff/grog/grog.pl
+++ b/src/roff/grog/grog.pl
@@ -54,6 +54,14 @@ sub process {
$soelim++ if $level;
}
}
+ elsif (/^\.G1/) {
+ $_ = <FILE>;
+ if (!/^\./) {
+ $grap++;
+ $pic++;
+ $soelim++ if $level;
+ }
+ }
elsif (/^\.PS([ 0-9.<].*)?$/) {
if (/^\.PS\s*<\s*(\S+)/) {
$pic++;
@@ -115,10 +123,12 @@ sub process {
close(FILE);
}
-if ($pic || $tbl || $eqn || $grn || $refer) {
+if ($pic || $tbl || $eqn || $grn || $grap || $refer) {
$s = "-";
$s .= "s" if $soelim;
$s .= "R" if $refer;
+ # grap must be run before pic
+ $s .= "G" if $grap;
$s .= "p" if $pic;
$s .= "g" if $grn;
$s .= "t" if $tbl;
diff --git a/src/roff/grog/grog.sh b/src/roff/grog/grog.sh
index 3f61aa2c..ac7a1360 100644
--- a/src/roff/grog/grog.sh
+++ b/src/roff/grog/grog.sh
@@ -20,12 +20,12 @@ do
esac
done
-egrep -h '^\.(P|[LI]P|[pnil]p|sh|Dd|Tp|Dp|De|Cx|Cl|Oo|Oc|TS|EQ|TH|SH|so|\[|R1|GS|PH|SA)' $* \
+egrep -h '^\.(P|[LI]P|[pnil]p|sh|Dd|Tp|Dp|De|Cx|Cl|Oo|Oc|TS|EQ|TH|SH|so|\[|R1|GS|G1|PH|SA)' $* \
| sed -e '/^\.so/s/^.*$/.SO_START\
&\
.SO_END/' \
| $soelim \
-| egrep '^\.(P|[LI]P|[pnil]p|sh|Dd|Tp|Dp|De|Cx|Cl|Oo|Oc|TS|EQ|TH|SH|\[|R1|GS|PH|SA|SO_START|SO_END)' \
+| egrep '^\.(P|[LI]P|[pnil]p|sh|Dd|Tp|Dp|De|Cx|Cl|Oo|Oc|TS|EQ|TH|SH|\[|R1|GS|G1|PH|SA|SO_START|SO_END)' \
| awk '
/^\.SO_START$/ { so = 1 }
/^\.SO_END$/ { so = 0 }
@@ -34,6 +34,7 @@ egrep -h '^\.(P|[LI]P|[pnil]p|sh|Dd|Tp|Dp|De|Cx|Cl|Oo|Oc|TS|EQ|TH|SH|so|\[|R1|GS
/^\.EQ/ { eqn++; if (so > 0) soelim++ }
/^\.(R1|\[)/ { refer++; if (so > 0) soelim++ }
/^\.GS/ { grn++; if (so > 0) soelim++ }
+/^\.G1/ { grap++; pic++; if (so > 0) soelim++ }
/^\.TH/ { TH++ }
/^\.[PLI]P/ { PP++ }
/^\.P$/ { P++ }
@@ -49,11 +50,12 @@ END {
if (files ~ /^-/)
files = "-- " files
printf "groff"
- if (pic > 0 || tbl > 0 || grn > 0 || eqn > 0 || refer > 0) {
+ if (pic > 0 || tbl > 0 || grn > 0 || grap > 0 || eqn > 0 || refer > 0) {
printf " -"
if (soelim > 0) printf "s"
if (refer > 0) printf "R"
if (grn > 0) printf "g"
+ if (grap > 0) printf "G"
if (pic > 0) printf "p"
if (tbl > 0) printf "t"
if (eqn > 0) printf "e"