.\" Automatically generated by Pod::Man 4.07 (Pod::Simple 3.32) .\" .\" 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 .. .if !\nF .nr F 0 .if \nF>0 \{\ . de IX . tm Index:\\$1\t\\n%\t"\\$2" .. . if !\nF==2 \{\ . nr % 0 . nr F 2 . \} .\} .\" ======================================================================== .\" .IX Title "FREETABLE 1" .TH FREETABLE 1 "2016-09-25" "perl v5.24.1" "Freetable" .\" 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" freetable \- tool for making HTML tables generation easier .SH "VERSION" .IX Header "VERSION" This manpage describes version 2.3 of \fBfreetable\fR. .PP It might be not 100% accurate if you use different version. .SH "SYNOPSIS" .IX Header "SYNOPSIS" \&\fBfreetable\fR \fI[options]\fR \fIfilename\fR .PP or .PP \&\fBfreetable\fR \fI[options]\fR .PP Possible options are : .PP \&\fI\-h\fR, \fI\-\-help\fR Print usage info and exit .PP \&\fI\-V\fR, \fI\-\-version\fR Print version information and exit .PP \&\fI\-c\fR, \fI\-\-comment\fR Insert comment before every cell to point its location .PP \&\fI\-b\fR, \fI\-\-no\-nbsp\fR Do not insert \fI \fR to empty cells for lowered\-3D apperance .PP \&\fI\-w\fR, \fI\-\-warning\fR Print a warning before each generated table that you should not change it. You should change its source. .PP \&\fI\-l\fR, \fI\-\-location\fR Substitute \fI\fR and \fI\fR flags inside table with correct cell's location .PP \&\fI\-m\fR, \fI\-\-macro\fR \fI[program]\fR Use macro procesor to proces cells content (default: \fBm4\fR) .SH "WARNING" .IX Header "WARNING" .Vb 3 \& DO NOT USE MACRO PROCESSOR OVER UNSURE SOURCE \& M4 MAY BE USED TO COMPROMISE YOUR SECURITY \& FOR MORE INFORMATION ON THIS EXEC : .Ve .PP \&\fIinfo m4 '\s-1UNIX\s0 commands' syscmd\fR .SH "DESCRIPTION" .IX Header "DESCRIPTION" This is free replacement of \fBwwwtable\fR .PP \&\s-1HTML\s0 is great language, but have one horrible flaw : tables. I spent many hours looking at \s-1HTML\s0 source I just written and trying to guess which cell in source is which in browser. .PP If this also describes you, then read this manpage and your pain will stop. .PP Program read \s-1HTML\s0 source from either \fIstdin\fR or file. Then it searches for line starting table: .PP .Vb 1 \& .Ve .PP Then it analyzes table, put correct \s-1HTML\s0 table in this place and continue searching for the next table. .SH "TABLE SYNTAX" .IX Header "TABLE SYNTAX" It is very easy: .PP .Vb 7 \& wwwtable : \& \& [preamble] \& [cell] \& [cell] \& ... \& .Ve .PP wwwtable_options will be passed to \fI\fR tags. There is no magic inside preamble. It can be any \s-1HTML\s0 text. It will be simply put in front of table. .PP cell is either normal_cell (\fIset to adress of curent cell .PP row and col are either numbers locating cells, expressions relative to previous cell or regular expresions to match few of them. Unlike \fBwwwtable\fR, \fBfreetable\fR can use regular expresions for header cells. Also \fI*\fR can be used, and it mean \fI.*\fR really. .PP Relative expressions are : .PP \&\fI=\fR or empty means : the same as previous .PP \&\fI+\fR or \fI+X\fR means : one and X more than previous .PP \&\fI\-\fR or \fI\-X\fR means : one and X less than previous .PP If many definisions adress the same cell all options and contents are concatenated in order of apperance. .PP If you want to use only regular expresions you must tell program about the last cell : .PP .Vb 7 \& \& (*,1) \& these are colums 1 \& (1,*) \& these are rows 1 \& (4,4) \& .Ve .SH "ALTERNATIVE CELL ADDRESS SYNTAX" .IX Header "ALTERNATIVE CELL ADDRESS SYNTAX" It is inconvenient to specify cell address as regular expression. So in \fBfreetable\fR 2.0 two new methods were introduced. Both can be used to either normal or header cells. .PP Full bakward compatibility is preserved. To preserve it, new syntax had to be introduced. Unfortunatelly, you can't specify row address using one method, and column address using another. To come around this, both new methods are very liberal and allow you to use \fI=\fR, \fI+\fR, \fI\-\fR, \fI+X\fR \fI\-X\fR and null string with the same meaning as they have in old addressing method. .PP Unlike regular expression method, new methods will find out the last cell automatically. .SS "\s-1EXPLICIT RANGES\s0" .IX Subsection "EXPLICIT RANGES" .Vb 2 \& (rowrange;colrange) cell_options \& cell_content .Ve .PP Syntax for both rowrange and colrange is like: 1\-2,4\-7,9,12. Duplicates will be eliminated. For purpose of relative addresses last given number is used. So if you write .PP .Vb 4 \& (1\-100,32;1) \& foo \& (+,) \& bar .Ve .PP Cell (33,1) will contain `foobar' and all others only `foo'. .SS "\s-1ARBITRARY PERL CODE\s0" .IX Subsection "ARBITRARY PERL CODE" .Vb 2 \& ({code for rows},{code for tables}) cell_options \& cell_content .Ve .PP You can use arbitrary Perl one-liner as long as it matches our not very intelligent regular expressions and evaluates to list. Unfortunatelly there isn't any regular expression for Perl code, but as long as it doesn't contain \fI},{\fR and \fI})\fR it should work. Example: .PP .Vb 4 \& \& ({grep {$_%3 == 1} 1..100},{1..2,4}) \& foo \& .Ve .PP Will evaluate to 100 rows x 4 columns table with `foo' in every 1st, 2nd and 4th column of every row with number equal 1 modulo 3. .PP If you want to use \*(L"arbitrary code\*(R" in one part of address and explicit range in the other, change \fI\-\fR into \fI..\fR in defenition of range, and put in between \fI{\fR and \fI}\fR. .PP If you want to use \*(L"arbitrary code\*(R" in one part of address and regular expression in the other, you have to write \&\fI{grep {/expression/} from..to}\fR. Unfortunatelly, in this case you have to specify size of the table explicitely. .SH "INCOMPATIBILITIES WITH WWWTABLE" .IX Header "INCOMPATIBILITIES WITH WWWTABLE" If you was formerly user of \fBwwwtable\fR and want to change your tool, you should read this. Most of this is about regexps handling. Notice also that \fBwwwtable\fR couldnt do location tags substitution nor macroprocesing. .PP Option \fI\-w\fR has completely oposite meaning. We dont print warnings by default, and \fI\-w\fR or \fI\-\-warning\fR is used to force warnings. .PP Table header fields can be specified by regexps ex : .PP .Vb 1 \& ((1,*)) .Ve .PP It was impossible in \fBwwwtable\fR. .PP Axis counters are 100% orthogonal. This mean that code : .PP .Vb 5 \& (*,1) width=30 \& (*,2) width=35 \& (*,3) width=40 \& (=,=) \& Foo .Ve .PP Foo will appear in 3rd column. If you wanted it to be in 1st you should write : .PP .Vb 5 \& (*,1) width=30 \& (*,2) width=35 \& (*,3) width=40 \& (=,1) \& Foo .Ve .PP or .PP .Vb 5 \& (*,) width=30 \& (*,+) width=35 \& (*,+) width=40 \& (=,1) \& Foo .Ve .PP In \fBfreetable\fR 2.0 two new methods o specifying cell address were introduced. They are completely incompatible with \fBwwwtable\fR. .SH "BUGS" .IX Header "BUGS" \&\*(L"Arbitrary Perl Code\*(R" cell address will fail on very complex Perl code. .SH "SEE ALSO" .IX Header "SEE ALSO" \&\fB\f(BIm4\fB\|(1)\fR .SH "AUTHOR" .IX Header "AUTHOR" Tomasz Wegrzanowski
\fR tag) or header_cell (\fI\fR tag). At least it was this way in freetable 1.x. See the next section for alternative cell address syntax. .PP .Vb 3 \& normal_cell : \& (row,col) cell_options \& cell_content \& \& header_cell : \& ((row,col)) cell_options \& cell_content .Ve .PP cell_options will be passed to cell tag. There is magic inside \&\fIcolspan\fR and \fIrowspan\fR keys are parsed to make correct table. .PP cell_content can be anything. It may contain text, tags, and even nested wwwtables. .PP If you use \fI\-m\fR (or \fI\-\-macro\fR) option, it will be passed thru \fIm4\fR\|(1), with and