The R Project SVN R

Rev

Rev 2195 | Rev 5458 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 2195 Rev 3609
Line 5... Line 5...
5
# The option `-x' makes the program greedily interpret all single-quoted
5
# The option `-x' makes the program greedily interpret all single-quoted
6
# names intended as code names.
6
# names intended as code names.
7
# The option `-n' renders examples non-executable by wrapping them into
7
# The option `-n' renders examples non-executable by wrapping them into
8
# a \dontrun{} environment.
8
# a \dontrun{} environment.
9
 
9
 
10
# Copyright (C) 1997, 1998 Kurt Hornik
10
# Copyright (C) 1997, 1998, 1999 Kurt Hornik
11
#
11
#
12
# This document is free software; you can redistribute it and/or modify
12
# This document is free software; you can redistribute it and/or modify
13
# it under the terms of the GNU General Public License as published by
13
# it under the terms of the GNU General Public License as published by
14
# the Free Software Foundation; either version 2, or (at your option)
14
# the Free Software Foundation; either version 2, or (at your option)
15
# any later version.
15
# any later version.
Line 24... Line 24...
24
# writing to the Free Software Foundation, Inc., 675 Mass Ave,
24
# writing to the Free Software Foundation, Inc., 675 Mass Ave,
25
# Cambridge, MA 02139, USA.
25
# Cambridge, MA 02139, USA.
26
 
26
 
27
# Bug reports to Kurt.Hornik@ci.tuwien.ac.at
27
# Bug reports to Kurt.Hornik@ci.tuwien.ac.at
28
 
28
 
29
$VERSION = "0.3-2";
29
$VERSION = "0.3-3";
30
($NAME = $0) =~ s|.*/||;
30
($NAME = $0) =~ s|.*/||;
31
 
31
 
32
$\ = "\n";
32
$\ = "\n";
33
 
33
 
34
$braceLevel = 0;
34
$braceLevel = 0;
Line 86... Line 86...
86
  if (/^\.KW/) { 
86
  if (/^\.KW/) { 
87
    if ($braceLevel > 0) {
87
    if ($braceLevel > 0) {
88
      &section(0, "");
88
      &section(0, "");
89
      $braceLevel = 0;
89
      $braceLevel = 0;
90
    }
90
    }
-
 
91
    if ($word[1] =~ /sysdata/) {
-
 
92
      &output("\\keyword\{datasets\}");
-
 
93
    } else {
91
    &output("\\keyword\{$word[1]\}");
94
      &output("\\keyword\{$word[1]\}");
-
 
95
    }
92
  }
96
  }
93
  if (/^\.RC/) {
97
  if (/^\.RC/) {
94
    if ($needVal) {
98
    if ($needVal) {
95
      $needVal = 0;	    
99
      $needVal = 0;	    
96
      &section(0, "\\value\{\n$output\n");
100
      &section(0, "\\value\{\n$output\n");
Line 109... Line 113...
109
  }
113
  }
110
  if (/^\.SE/) { &section(0, "\\section\{Side Effects\}\{"); }
114
  if (/^\.SE/) { &section(0, "\\section\{Side Effects\}\{"); }
111
  if (/^\.SH/) {
115
  if (/^\.SH/) {
112
    if ($word[1] =~ /REFERENCE/) {
116
    if ($word[1] =~ /REFERENCE/) {
113
      &section(0, "\\references\{");
117
      &section(0, "\\references\{");
-
 
118
    } elsif ($word[1] =~ /SOURCE/) {
-
 
119
      &section(0, "\\source\{");
-
 
120
    } elsif ($word[1] =~ /SUMMARY/) {
-
 
121
      &section(0, "\\description\{");
-
 
122
    } elsif (join(" ", @word[1..2]) =~ /DATA DESCRIPTION/) {
-
 
123
      &section(0, "\\format\{");
114
    } else {
124
    } else {
115
      # This line may be of the form .SH "A B C"
125
      # This line may be of the form .SH "A B C"
116
      ($tmp = join(" ", @word[1..$#word])) =~ s/\"(.*)\"/$1/;
126
      ($tmp = join(" ", @word[1..$#word])) =~ s/\"(.*)\"/$1/;
117
      &section(0, "\\section\{$tmp\}\{");
127
      &section(0, "\\section\{$tmp\}\{");
118
    }
128
    }