Tidy options

Simon L. Nielsen simon at FreeBSD.org
Wed Sep 3 23:00:40 UTC 2003


Hello

In the DocBook documentation with HTML output when using a package
reference preceded by a character (with no space in between) there are
often inserted spaces which looks odd.  E.g from
http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/video-playback.html

	... codec with MPEG3 audio encoding (  audio/lame is required):

The HTML that gives this problem is:

            the MPEG4 codec with MPEG3 audio encoding (<a
            href="http://www.FreeBSD.org/cgi/url.cgi?ports/audio/lame/pkg-descr">
            <tt class="FILENAME">audio/lame</tt></a> is

The problem is that Tidy is a bit too agressive when trying to make the
HTML look nice, so it inserts newline where it really shouldn't, since
it tries to keep the lines at max 68 characters (the Tidy default
default).

To fix this I propose to remove the -i flag (which indents the HTML)
from the default Tidy arguments and add '-wrap 90'.  This makes the HTML
more "ugly", but I don't really think this matters, since it's still
correct and of course the browsers doesn't care.  If anybody for some
reason still like to generate more readable HTML, they can just use the
TIDYFLAG make variable to override the defaults.

I should also mention that these options make book.html (the complete
handbook in one HTML file) go from 3 986 799 to 3 002 354 bytes.

Any objection to changing this?

-- 
Simon L. Nielsen
FreeBSD Documentation Team
-------------- next part --------------
==== //depot/user/simon/doc/share/mk/doc.docbook.mk#2 - /home/simon/freebsd/p4/simon/doc/share/mk/doc.docbook.mk ====
@@ -226,7 +226,7 @@
 PDFTEX?=	${PREFIX}/bin/pdftex
 GROFF?=		groff
 TIDY?=		${PREFIX}/bin/tidy
-TIDYOPTS?=	-i -m -raw -preserve -f /dev/null -asxml ${TIDYFLAGS}
+TIDYOPTS?=	-wrap 90 -m -raw -preserve -f /dev/null -asxml ${TIDYFLAGS}
 HTML2TXT?=	${PREFIX}/bin/links
 HTML2TXTOPTS?=	-dump ${HTML2TXTFLAGS}
 HTML2PDB?=	${PREFIX}/bin/iSiloBSD
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 187 bytes
Desc: not available
URL: <http://lists.freebsd.org/pipermail/freebsd-doc/attachments/20030904/0ff9cc96/attachment.sig>


More information about the freebsd-doc mailing list