8 # First: read the base. Make a graph, but also note which
9 # nodes represent line beginnings.
11 my $tradition = Text::Tradition->new(
17 print $tradition->collation->as_svg();
18 print STDERR "DONE\n";
22 foreach my $pos ( $collation_graph->{'positions'}->all ) {
23 my @p_nodes = $collation_graph->{'positions'}->nodes_at_position( $pos );
24 $rows = scalar @p_nodes
25 if $rows < scalar @p_nodes;
26 push( @$matrix, \@p_nodes );
28 print "<html><head><title>A table</title></head><body><table>\n";
29 foreach my $i ( 0 .. $rows-1 ) {
31 foreach my $col( @$matrix ) {
34 $str = $collation_graph->node( $col->[$i] )->label;
36 printf( "\t\t<td>%s</td>\n", $str );
40 print "</table></body></html>\n";