line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Pod::PseudoPod::DOM::App::ToLaTeX; |
2
|
|
|
|
|
|
|
# ABSTRACT: helper functions for bin/ppdom2latex |
3
|
|
|
|
|
|
|
|
4
|
1
|
|
|
1
|
|
1216
|
use strict; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
33
|
|
5
|
1
|
|
|
1
|
|
5
|
use warnings; |
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
24
|
|
6
|
1
|
|
|
1
|
|
5
|
use autodie; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
8
|
|
7
|
|
|
|
|
|
|
|
8
|
1
|
|
|
1
|
|
6587
|
use Pod::PseudoPod::DOM; |
|
1
|
|
|
|
|
10
|
|
|
1
|
|
|
|
|
36
|
|
9
|
1
|
|
|
1
|
|
5
|
use Pod::PseudoPod::DOM::App qw( open_fh ); |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
378
|
|
10
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
sub process_files_with_output |
12
|
|
|
|
|
|
|
{ |
13
|
0
|
|
|
0
|
0
|
|
for my $file ( @_ ) |
14
|
|
|
|
|
|
|
{ |
15
|
0
|
|
|
|
|
|
my ($source, $output) = @$file; |
16
|
|
|
|
|
|
|
|
17
|
0
|
|
|
|
|
|
my $parser = Pod::PseudoPod::DOM->new( |
18
|
|
|
|
|
|
|
formatter_role => 'Pod::PseudoPod::DOM::Role::LaTeX', |
19
|
|
|
|
|
|
|
filename => $output, |
20
|
|
|
|
|
|
|
); |
21
|
|
|
|
|
|
|
|
22
|
0
|
|
|
|
|
|
my $fh = open_fh( $output, '>' ); |
23
|
0
|
|
|
|
|
|
$parser->output_fh($fh); |
24
|
|
|
|
|
|
|
|
25
|
0
|
|
|
|
|
|
$parser->no_errata_section(1); # don't put errors in doc output |
26
|
0
|
|
|
|
|
|
$parser->complain_stderr(1); # output errors on STDERR instead |
27
|
|
|
|
|
|
|
|
28
|
0
|
0
|
|
|
|
|
die "Unable to open file\n" unless -e $source; |
29
|
0
|
|
|
|
|
|
$parser->parse_file( open_fh( $source ) ); |
30
|
0
|
|
|
|
|
|
my $doc = $parser->get_document; |
31
|
0
|
|
|
|
|
|
print {$fh} $doc->emit; |
|
0
|
|
|
|
|
|
|
32
|
|
|
|
|
|
|
|
33
|
0
|
|
|
|
|
|
while (my ($name, $contents) = each %{ $doc->tables }) |
|
0
|
|
|
|
|
|
|
34
|
|
|
|
|
|
|
{ |
35
|
0
|
|
|
|
|
|
my $fh = open_fh( $name, '>' ); |
36
|
0
|
|
|
|
|
|
print {$fh} $contents; |
|
0
|
|
|
|
|
|
|
37
|
|
|
|
|
|
|
} |
38
|
|
|
|
|
|
|
} |
39
|
|
|
|
|
|
|
} |
40
|
|
|
|
|
|
|
|
41
|
|
|
|
|
|
|
1; |
42
|
|
|
|
|
|
|
|
43
|
|
|
|
|
|
|
__END__ |
44
|
|
|
|
|
|
|
|
45
|
|
|
|
|
|
|
=pod |
46
|
|
|
|
|
|
|
|
47
|
|
|
|
|
|
|
=encoding UTF-8 |
48
|
|
|
|
|
|
|
|
49
|
|
|
|
|
|
|
=head1 NAME |
50
|
|
|
|
|
|
|
|
51
|
|
|
|
|
|
|
Pod::PseudoPod::DOM::App::ToLaTeX - helper functions for bin/ppdom2latex |
52
|
|
|
|
|
|
|
|
53
|
|
|
|
|
|
|
=head1 VERSION |
54
|
|
|
|
|
|
|
|
55
|
|
|
|
|
|
|
version 1.20210620.2004 |
56
|
|
|
|
|
|
|
|
57
|
|
|
|
|
|
|
=head1 AUTHOR |
58
|
|
|
|
|
|
|
|
59
|
|
|
|
|
|
|
chromatic <chromatic@wgz.org> |
60
|
|
|
|
|
|
|
|
61
|
|
|
|
|
|
|
=head1 COPYRIGHT AND LICENSE |
62
|
|
|
|
|
|
|
|
63
|
|
|
|
|
|
|
This software is copyright (c) 2021 by chromatic. |
64
|
|
|
|
|
|
|
|
65
|
|
|
|
|
|
|
This is free software; you can redistribute it and/or modify it under |
66
|
|
|
|
|
|
|
the same terms as the Perl 5 programming language system itself. |
67
|
|
|
|
|
|
|
|
68
|
|
|
|
|
|
|
=cut |