2 * Definition for RTF output
3 * Kevin Grover, <grover@wizard.com>
13 print ("{\\colortbl;");
14 for (i = 0; i < length (rgb_values); i = i + 1)
15 print (sprintf ("\\red%d\\green%d\\blue%d;",
25 sub language_color (name)
29 idx = color_index (name);
31 panic ("unknown color `", name, "'");
33 return sprintf("\\cf%d", idx + 1);
36 LANGUAGE_SPECIALS = /[\\{}\n]/;
38 sub language_print (str)
40 str = regsuball (str, /\\\\/, "\\\\");
41 str = regsuball (str, /{/, "\\{");
42 str = regsuball (str, /}/, "\\}");
43 str = regsuball (str, /\n/, "\\line\n");
47 sub language_symbol (symbol)
56 if (current_input_file == 1)
58 print ("{\\rtf\\ansi\\deff0\n");
59 print ("{\\fonttbl{\\f0\\fswiss Courier New;}}\n");
66 if (current_input_file == int (num_input_files))
72 print ("{", name, " ");
82 if (face[boldp] || face[italicp])
93 color_on (face[fg_color]);
100 if (face[boldp] || face[italicp])