.\" Automatically generated by Pod::Man 4.14 (Pod::Simple 3.40) .\" .\" 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 .\" .\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2). .\" Fear. Run. Save yourself. No user-serviceable parts. . \" fudge factors for nroff and troff .if n \{\ . ds #H 0 . ds #V .8m . ds #F .3m . ds #[ \f1 . ds #] \fP .\} .if t \{\ . ds #H ((1u-(\\\\n(.fu%2u))*.13m) . ds #V .6m . ds #F 0 . ds #[ \& . ds #] \& .\} . \" simple accents for nroff and troff .if n \{\ . ds ' \& . ds ` \& . ds ^ \& . ds , \& . ds ~ ~ . ds / .\} .if t \{\ . ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u" . ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u' . ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u' . ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u' . ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u' . ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u' .\} . \" troff and (daisy-wheel) nroff accents .ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V' .ds 8 \h'\*(#H'\(*b\h'-\*(#H' .ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#] .ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H' .ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u' .ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#] .ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#] .ds ae a\h'-(\w'a'u*4/10)'e .ds Ae A\h'-(\w'A'u*4/10)'E . \" corrections for vroff .if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u' .if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u' . \" for low resolution devices (crt and lpr) .if \n(.H>23 .if \n(.V>19 \ \{\ . ds : e . ds 8 ss . ds o a . ds d- d\h'-1'\(ga . ds D- D\h'-1'\(hy . ds th \o'bp' . ds Th \o'LP' . ds ae ae . ds Ae AE .\} .rm #[ #] #H #V #F C .\" ======================================================================== .\" .IX Title "HTMLFIX 1" .TH HTMLFIX 1 "2020-11-29" "EN Tools" "EN Tools" .\" 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" htmlfix \- Fixup HTML markup code .SH "SYNOPSIS" .IX Header "SYNOPSIS" \&\fBhtmlfix\fR [\fB\-o\fR \fIoutputfile\fR] [\fB\-F\fR \fIfixes\fR] [\fB\-S\fR \fIfixes\fR] [\fB\-v\fR] [\fIinputfile\fR] .SH "DESCRIPTION" .IX Header "DESCRIPTION" The \fIhtmlfix\fR program reads \fIinputfile\fR or from \f(CW\*(C`stdin\*(C'\fR and performs the following actions (name of each fixup is within parentheses): .IP "(\fBimgsize\fR) : \fBAdding \s-1WIDTH\s0 and \s-1HEIGHT\s0 attributes to \s-1IMG\s0 tags\fR" 4 .IX Item "(imgsize) : Adding WIDTH and HEIGHT attributes to IMG tags" For all \f(CW\*(C`IMG\*(C'\fR tags which don't already have both \f(CW\*(C`WIDTH\*(C'\fR and \f(CW\*(C`HEIGHT\*(C'\fR attributes (matched case insensitive), the size of the image (taken from the \&\f(CW\*(C`SRC\*(C'\fR attribute) is determined and the missing ``\f(CW\*(C`width=X\*(C'\fR'' and/or ``\f(CW\*(C`height=Y\*(C'\fR'' is added to the list of attributes. The intention is to speedup the layouting of the final webpage. .Sp Don't intermix this with a size checker: \fIhtmlfix\fR will only \fIadd\fR missing width/height attributes and don't adjust ones with wrong dimensions. This is because else the user wouln't be able to scale images (used a lot by webdesigners via 1pt dot-images). .Sp There is a special case: When the \f(CW\*(C`WIDTH\*(C'\fR or \f(CW\*(C`HEIGHT\*(C'\fR attribute already exists and has a value of ``\f(CW\*(C`*\*(C'\fR'' this asterisk is replaced by the physical value instead of appending a new attribute. Use when you want the attributes at a certain position, i.e. use this variant as a placeholder. .Sp HTMLfix supports one additionl feature in conjunction with \f(CW\*(C`WIDTH\*(C'\fR and \&\f(CW\*(C`HEIGHT\*(C'\fR: \f(CW\*(C`SCALE=\*(C'\fR\fIfactor\fR and \f(CW\*(C`SCALE=\*(C'\fR\fIpercent\fR\f(CW\*(C`%\*(C'\fR. This can be used to scale the given or determined width and height values by multiplying with \&\fIfactor\fR or multiplying with \fIpercent\fR/100. .IP "(\fBimgalt\fR) : \fBAdding \s-1ALT\s0 attribute to \s-1IMG\s0 tags\fR" 4 .IX Item "(imgalt) : Adding ALT attribute to IMG tags" For all \f(CW\*(C`IMG\*(C'\fR tags which don't already have a \f(CW\*(C`ALT\*(C'\fR tag an \f(CW\*(C`ALT=""\*(C'\fR attribute is added. The intention is to both make \s-1HTML\s0 checkers like \&\fBweblint\fR\|(1) happy and to demystify the final webpage for \fBlynx\fR\|(1) users. .IP "(\fBsummary\fR) : \fBAdding \s-1SUMMARY\s0 attribute to \s-1TABLE\s0 tags\fR" 4 .IX Item "(summary) : Adding SUMMARY attribute to TABLE tags" This attribute helps non-visual rendering of tables by adding a hint on its contents, and it makes \fBtidy\fR\|(1) quiet. .IP "(\fBcenter\fR) : \fBChanging proprietary \s-1CENTER\s0 tag to standard \s-1DIV\s0 tag\fR" 4 .IX Item "(center) : Changing proprietary CENTER tag to standard DIV tag" All proprietary (Netscape) \f(CW\*(C`CENTER\*(C'\fR tags are replaced by the \s-1HTML 3.2\s0 conforming construct ``\f(CW\*(C`
\*(C'\fR''. .IP "(\fBspace\fR) : \fBFix trailing spaces in tags\fR" 4 .IX Item "(space) : Fix trailing spaces in tags" Appendix C of the \s-1XHTML\s0 Specification recommends putting a space before closing simple tags to help rendering by old browsers. This space is automatically added when this fixup is used. On the other hand, all spaces before a right-angle bracker are suppressed. .IP "(\fBquotes\fR) : \fBAdding missing quotes for attributes\fR" 4 .IX Item "(quotes) : Adding missing quotes for attributes" All attributes of the form ``\f(CW\*(C`...=xyz\*(C'\fR'' are replaced by ``\f(CW\*(C`...="xyz"\*(C'\fR''. Furthermore all (color) attributes of the form ``\f(CW\*(C`...="XXYYZZ"\*(C'\fR'' (\s-1XX,YY,ZZ\s0 elements of set {0,..,9,a,..,f} are fixed to ``\f(CW\*(C`...="#XXYYZZ"\*(C'\fR''. .IP "(\fBindent\fR) : \fBIndenting paragraphs\fR" 4 .IX Item "(indent) : Indenting paragraphs" Paragraphs enclosed in \f(CW\*(C`\*(C'\fR...\f(CW\*(C`\*(C'\fR containers are indented by N*S spaces. When N=0 then the whitespace block in front of the paragraph is removed. Default is a 4 space indentation (N=1, S=4). .IP "(\fBcomment\fR) : \fBOut-commenting tags\fR" 4 .IX Item "(comment) : Out-commenting tags" Sometimes it is useful to temporarily out-comment a tag instead of completely removing it. This can be done by just adding a sharp (``\f(CW\*(C`#\*(C'\fR'') character directly to the end of the tagname. The result is that the complete tag is commented out. For container-tags you have to comment out the end-tag explicitly, too. Example: ``<\f(CW\*(C`a# href="..."\*(C'\fR>''. .IP "(\fBtagcase\fR) : \fBMarkup-code case-conversion\fR" 4 .IX Item "(tagcase) : Markup-code case-conversion" Some people like their \s-1HTML\s0 markup code either to be all uppercase or all lowercase. This tag case-conversion is supported by the internal \&\f(CW\*(C`\*(C'\fR...\f(CW\*(C`\*(C'\fR container tag from HTMLfix. Use \f(CW\*(C`case=upper\*(C'\fR to translate the \s-1HTML\s0 tags in its body to uppercase (default) or \f(CW\*(C`case=lower\*(C'\fR to translate them to lowercase. .SH "OPTIONS" .IX Header "OPTIONS" .IP "\fB\-o\fR \fIoutputfile\fR" 4 .IX Item "-o outputfile" This redirects the output to \fIoutputfile\fR. Usually the output will be send to \&\f(CW\*(C`stdout\*(C'\fR if no such option is specified or \fIoutputfile\fR is "\f(CW\*(C`\-\*(C'\fR". .IP "\fB\-F\fR \fIfixes\fR" 4 .IX Item "-F fixes" This option specifies which specifix fixups are performed. Its argument is a comma separated list of fixup names, and by default all fixups are performed. .IP "\fB\-S\fR \fIfixes\fR" 4 .IX Item "-S fixes" This option does the inverse job, it skips specified fixups. .IP "\fB\-v\fR" 4 .IX Item "-v" This sets verbose mode where some processing information will be given on the console. .SH "AUTHORS" .IX Header "AUTHORS" .Vb 3 \& Ralf S. Engelschall \& rse@engelschall.com \& www.engelschall.com \& \& Denis Barbier \& barbier@engelschall.com .Ve