.\" Automatically generated by Pod::Man 4.14 (Pod::Simple 3.42) .\" .\" Standard preamble: .\" ======================================================================== .de Sp \" Vertical space (when we can't use .PP) .if t .sp .5v .if n .sp .. .de Vb \" Begin verbatim text .ft CW .nf .ne \\$1 .. .de Ve \" End verbatim text .ft R .fi .. .\" Set up some character translations and predefined strings. \*(-- will .\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left .\" double quote, and \*(R" will give a right double quote. \*(C+ will .\" give a nicer C++. Capital omega is used to do unbreakable dashes and .\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff, .\" nothing in troff, for use with C<>. .tr \(*W- .ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p' .ie n \{\ . ds -- \(*W- . ds PI pi . if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch . if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch . ds L" "" . ds R" "" . ds C` "" . ds C' "" 'br\} .el\{\ . ds -- \|\(em\| . ds PI \(*p . ds L" `` . ds R" '' . ds C` . ds C' 'br\} .\" .\" Escape single quotes in literal strings from groff's Unicode transform. .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" .\" If the F register is >0, we'll generate index entries on stderr for .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index .\" entries marked with X<> in POD. Of course, you'll have to process the .\" output yourself in some meaningful fashion. .\" .\" Avoid warning from groff about undefined register 'F'. .de IX .. .nr rF 0 .if \n(.g .if rF .nr rF 1 .if (\n(rF:(\n(.g==0)) \{\ . if \nF \{\ . de IX . tm Index:\\$1\t\\n%\t"\\$2" .. . if !\nF==2 \{\ . nr % 0 . nr F 2 . \} . \} .\} .rr rF .\" ======================================================================== .\" .IX Title "HTML::Auto 3pm" .TH HTML::Auto 3pm "2022-06-14" "perl v5.34.0" "User Contributed Perl Documentation" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l .nh .SH "NAME" HTML::Auto \- write HTML for common elements .SH "VERSION" .IX Header "VERSION" version 0.09 .SH "SYNOPSIS" .IX Header "SYNOPSIS" Simple example: .PP .Vb 1 \& use HTML::Auto qw/matrix h v/; \& \& my @cols = qw/c1 c2 c3 c4 c5/; \& my @lines = qw/l1 l2 l3 l4 l5/; \& my $data = \& [ [1,2,3,4,5], \& [6,7,8,9,0], \& [1,1,1,1,1], \& [2,2,2,2,2], \& [3,3,3,3,3] ]; \& \& my $m = matrix(\e@cols,\e@lines,$data); \& \& print v( \& h($m,$m,$m), \& h($m,$m), \& ); .Ve .PP Using attributes: .PP .Vb 1 \& use HTML::Auto qw/matrix h v/; \& \& my @cols = qw/c1 c2/; \& my @lines = qw/l1 l2/; \& my $data = \& [ \& [ \& {v => 1, a => { style => \*(Aqbackground: green\*(Aq}}, \& 2 \& ], \& [ \& {v => 3, a => {class => \*(Aqfoo\*(Aq}}, \& {v => 4, a => {style => \*(Aqcolor: red\*(Aq}} \& ] \& ]; \& \& my $m = matrix(\e@cols,\e@lines,$data); \& \& print v( \& h($m) \& ); .Ve .PP With mouse-over span: .PP .Vb 1 \& use HTML::Auto qw/matrix h v/; \& \& my @cols = qw/c1 c2/; \& my @lines = qw/l1 l2/; \& my $data = \& [[1,2], \& [3, \& { v=> 4, \& more_info => "This is a pop\-up!" \& }] \& ]; \& \& \& my $m = matrix(\e@cols,\e@lines,$data); \& \& print v( \& h($m) \& ); .Ve .PP Passing additional \s-1CSS:\s0 .PP .Vb 1 \& use HTML::Auto qw/matrix h v/; \& \& my @cols = qw/c1 c2/; \& my @lines = qw/l1 l2/; \& my $data = \& [ \& [ \& {v => 1, a => { class => \*(Aqwarn\*(Aq}}, \& 2 \& ], \& [3,4] \& ]; \& \& my $options = { css => \*(Aq.warn { background\-color: yellow !important; }\*(Aq }; \& \& my $m = matrix(\e@cols,\e@lines,$data,$options); \& \& print v( \& h($m) \& ); .Ve .SH "FUNCTIONS" .IX Header "FUNCTIONS" .SS "matrix" .IX Subsection "matrix" Build a matrix. Some options are available to pass to the matrix function: .ie n .IP """diagonal""" 6 .el .IP "\f(CWdiagonal\fR" 6 .IX Item "diagonal" Highlight the diagonal of the matrix. .Sp .Vb 1 \& my $m = matrix(\e@cols,\e@lines,$data, {diagonal => 1}); .Ve .ie n .IP """format""" 6 .el .IP "\f(CWformat\fR" 6 .IX Item "format" Pass a string to be used by the \f(CW\*(C`format\*(C'\fR filter in the \s-1TT2\s0 template. .Sp .Vb 1 \& my $m = matrix(\e@cols,\e@lines,$data, {format => \*(Aq%.6f\*(Aq}); .Ve .ie n .IP """ucfirst""" 6 .el .IP "\f(CWucfirst\fR" 6 .IX Item "ucfirst" Option to uppercase first letter in columns and lines labels. .Sp .Vb 1 \& my $m = matrix(\e@cols,\e@lines,$data, {ucfirst => 1}); .Ve .SS "h" .IX Subsection "h" A function to allow horizontal composition. .SS "v" .IX Subsection "v" A function to allow vertical composition. .SH "AUTHORS" .IX Header "AUTHORS" .IP "\(bu" 4 Nuno Carvalho .IP "\(bu" 4 André Santos .SH "COPYRIGHT AND LICENSE" .IX Header "COPYRIGHT AND LICENSE" This software is copyright (c) 2012\-2016 by Project Natura . .PP This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.