The R Project SVN R

Rev

Rev 13792 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 13792 Rev 14558
Line 20... Line 20...
20
# Suite 330, Boston, MA  02111-1307  USA.
20
# Suite 330, Boston, MA  02111-1307  USA.
21
 
21
 
22
use Getopt::Long;
22
use Getopt::Long;
23
use R::Utils;
23
use R::Utils;
24
 
24
 
25
my $revision = ' $Revision: 1.20 $ ';
25
my $revision = ' $Revision: 1.21 $ ';
26
my $version;
26
my $version;
27
my $name;
27
my $name;
28
 
28
 
29
$revision =~ / ([\d\.]*) /;
29
$revision =~ / ([\d\.]*) /;
30
$version = $1;
30
$version = $1;
Line 166... Line 166...
166
    if (/^\.SE/) { &section(0, "\\section\{Side Effects\}\{"); }
166
    if (/^\.SE/) { &section(0, "\\section\{Side Effects\}\{"); }
167
    if (/^\.SH/) {
167
    if (/^\.SH/) {
168
      if ($word[1] =~ /REFERENCE/) {
168
      if ($word[1] =~ /REFERENCE/) {
169
	&section(0, "\\references\{");
169
	&section(0, "\\references\{");
170
	$inReferences = 1;
170
	$inReferences = 1;
-
 
171
      } elsif ($word[1] =~ /AUTHOR/) {
-
 
172
	&section(0, "\\author\{");
171
      } elsif ($word[1] =~ /NOTE/) {
173
      } elsif ($word[1] =~ /NOTE/) {
172
	&section(0, "\\note\{");
174
	&section(0, "\\note\{");
173
      } elsif ($word[1] =~ /SOURCE/) {
175
      } elsif ($word[1] =~ /SOURCE/) {
174
	&section(0, "\\source\{");
176
	&section(0, "\\source\{");
175
	$inReferences = 1;
177
	$inReferences = 1;
176
      } elsif ($word[1] =~ /SUMMARY/) {
178
      } elsif ($word[1] =~ /SUMMARY/) {
177
	&section(0, "\\description\{");
179
	&section(0, "\\description\{");
-
 
180
      } elsif ($word[1] =~ /WARNINGS/) {
-
 
181
	&section(0, "\\section{Warnings}\{");
178
      } elsif ($word[1] =~ /Warning/) {
182
      } elsif ($word[1] =~ /WARNING/) {
179
	&section(0, "\\section{Warning}\{");
183
	&section(0, "\\section{Warning}\{");
180
      } elsif (join(" ", @word[1..2]) =~ /DATA DESCRIPTION/) {
184
      } elsif (join(" ", @word[1..2]) =~ /DATA DESCRIPTION/) {
181
	&section(0, "\\usage\{\ndata($fun)");
185
	&section(0, "\\usage\{\ndata($fun)");
182
	&section(0, "\\format\{");
186
	&section(0, "\\format\{");
183
      } else {
187
      } else {
184
	# This line may be of the form .SH "A B C"
188
	# This line may be of the form .SH "A B C"
185
	($tmp = join(" ", @word[1..$#word])) =~ s/\"(.*)\"/$1/;
189
	($tmp = join(" ", @word[1..$#word])) =~ s/\"(.*)\"/$1/;
186
	&section(0, "\\section\{$tmp\}\{");
190
	&section(0, "\\section\{$tmp\}\{");
187
      }
191
      }
188
    }
192
    }
189
    if (/^\.sp/) { output("\n"); }
193
    if (/^\.sp/) {
-
 
194
      if($word[1] == 0) {
-
 
195
	output("\\cr")
-
 
196
      } else {
-
 
197
	output("\n")
-
 
198
      }
-
 
199
    }
190
    if (/^\.TL/) {
200
    if (/^\.TL/) {
191
      print("\\name\{$fun\}\n");
201
      print("\\name\{$fun\}\n");
192
      print("\\alias\{", join("\}\n\\alias\{", @aliases), "\}\n");
202
      print("\\alias\{", join("\}\n\\alias\{", @aliases), "\}\n");
193
      &section(0, "\\title\{");
203
      &section(0, "\\title\{");
194
      $inVerbatim = 1;
204
      $inVerbatim = 1;