groff-commit
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Groff-commit] groff/src/roff/grog grog.man grog.pl


From: Bernd Warken
Subject: [Groff-commit] groff/src/roff/grog grog.man grog.pl
Date: Mon, 06 Nov 2006 17:57:22 +0000

CVSROOT:        /cvsroot/groff
Module name:    groff
Changes by:     Bernd Warken <bwarken>  06/11/06 17:57:22

Modified files:
        src/roff/grog  : grog.man grog.pl 

Log message:
        Fix src/roff/grog/grog.pl.
        Add an example to src/roff/grog/groff.man.

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/groff/src/roff/grog/grog.man?cvsroot=groff&r1=1.11&r2=1.12
http://cvs.savannah.gnu.org/viewcvs/groff/src/roff/grog/grog.pl?cvsroot=groff&r1=1.16&r2=1.17

Patches:
Index: grog.man
===================================================================
RCS file: /cvsroot/groff/groff/src/roff/grog/grog.man,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -b -r1.11 -r1.12
--- grog.man    6 Nov 2006 12:33:32 -0000       1.11
+++ grog.man    6 Nov 2006 17:57:21 -0000       1.12
@@ -699,6 +699,41 @@
 .RE
 .
 .
+.Topic
+.B grog
+can also handle files using the
+.I chem
+language.
+.
+The example
+.RS
+.IP
+.Shell_cmd "grog chAh_brackets.chem"
+.P
+outputs
+.IP
+.ft CR
+chem chAh_brackets.chem | groff \-pe
+.ft
+.P
+So
+.B chem
+is run first and
+.B groff
+is appended.
+.
+The option
+.B \-p
+for
+.B pic
+is implied automatically by
+.BR chem .
+Additionally, the file uses
+.I eqn
+with
+.BR \-e .
+.
+.
 .\" --------------------------------------------------------------------
 .SH "SEE ALSO"
 .\" --------------------------------------------------------------------

Index: grog.pl
===================================================================
RCS file: /cvsroot/groff/groff/src/roff/grog/grog.pl,v
retrieving revision 1.16
retrieving revision 1.17
diff -u -b -r1.16 -r1.17
--- grog.pl     6 Nov 2006 12:33:32 -0000       1.16
+++ grog.pl     6 Nov 2006 17:57:22 -0000       1.17
@@ -44,7 +44,8 @@
   $Prog = $f;
 }
 
-my $Sp = "[\\s\\n]";
+#my $Sp = "[\\s\\n]";
+my $Sp = qr([\s\n]);
 
 my @Command;                   # stores the final output
 my @Mparams;                   # stores the options -m*
@@ -123,8 +124,10 @@
     return;
   }
   while (<FILE>) {
+    chomp;
     s/^[.']\s*/./;
     s/^\s+|\s+$//g;
+    s/$/\n/;
 
     if (/^(.cstart)|(begin\s+chem)$/) {
       $Groff{'chem'}++;




reply via email to

[Prev in Thread] Current Thread [Next in Thread]