ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/gvpe/doc/pod2texi
(Generate patch)

Comparing gvpe/doc/pod2texi (file contents):
Revision 1.6 by pcg, Thu Jan 27 06:16:16 2005 UTC vs.
Revision 1.9 by root, Tue Feb 15 13:31:22 2011 UTC

1#!/usr/bin/perl 1#!/usr/bin/perl
2 2
3# TODO: texinfo fails on @cinde xin title elements etc. *sigh* 3# TODO: texinfo fails on @cindex in title elements etc. *sigh*
4 4
5use Pod::POM; 5use Pod::POM;
6 6
7sub escape_texi($) { 7sub escape_texi($) {
8 local $_ = shift; 8 local $_ = shift;
27sub out { 27sub out {
28 $ctx[-1]{out} .= join "", @_; 28 $ctx[-1]{out} .= join "", @_;
29} 29}
30 30
31sub TEX::view_seq_code { "\@t{$_[1]}" } 31sub TEX::view_seq_code { "\@t{$_[1]}" }
32sub TEX::view_seq_file { "\@file{$_[1]}" }
32sub TEX::view_seq_bold { "\@strong{$_[1]}" } 33sub TEX::view_seq_bold { "\@strong{$_[1]}" }
33sub TEX::view_seq_italic { "\@emph{$_[1]}" } 34sub TEX::view_seq_italic { "\@emph{$_[1]}" }
34 35
35sub TEX::view_seq_space { escape_texi $_[1] } 36sub TEX::view_seq_space { escape_texi $_[1] }
36sub TEX::view_seq_text { escape_texi $_[1] } 37sub TEX::view_seq_text { escape_texi $_[1] }
92 out "\n\n\@itemize\n"; 93 out "\n\n\@itemize\n";
93 $walker->($_) for $n->content; 94 $walker->($_) for $n->content;
94 out "\@end itemize\n\n"; 95 out "\@end itemize\n\n";
95 96
96 } elsif ($t eq "item") { 97 } elsif ($t eq "item") {
97 out "\n\n\@item\n\@b{" . $n->title . "}\n\n"; 98 out "\n\n\@item\n" . $n->title . "\n\n";
98 99
99 if ($n->title->present (TXT::) =~ /^\s*([a-zA-Z0-9\-\_]+)\s*=/) { 100 if ($n->title->present (TXT::) =~ /^\s*([a-zA-Z0-9\-\_]+)\s*=/) {
100 out "\@cindex $1\n"; 101 out "\@cindex $1\n";
101 } 102 }
102 $walker->($_) for $n->content; 103 $walker->($_) for $n->content;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines