atom feed24 messages in org.freebsd.freebsd-docRe: Tidy and HTML tab spacing
FromSent OnAttachments
Warren BlockJan 18, 2012 2:49 pm 
Hiroki SatoJan 18, 2012 3:44 pm 
Warren BlockJan 18, 2012 5:13 pm 
Hiroki SatoJan 18, 2012 10:57 pm 
Warren BlockJan 20, 2012 12:05 pm.c
Gabor KovesdanJan 21, 2012 3:16 pm 
Warren BlockJan 21, 2012 4:29 pm 
Gabor KovesdanJan 23, 2012 9:07 am 
Warren BlockJan 23, 2012 11:38 am.py
Hiroki SatoJan 24, 2012 5:23 pm 
Gabor KovesdanJan 24, 2012 6:15 pm 
Hiroki SatoJan 24, 2012 6:18 pm 
Warren BlockJan 26, 2012 10:20 am 
Warren BlockJan 26, 2012 10:22 am.diff
Hiroki SatoJan 26, 2012 7:45 pm 
Warren BlockJan 26, 2012 9:46 pm.diff
Hiroki SatoJan 26, 2012 10:50 pm.diff
Hiroki SatoJan 27, 2012 5:24 am.diff
Warren BlockJan 27, 2012 7:53 am.diff
Hiroki SatoJan 27, 2012 8:58 am.diff
Warren BlockJan 27, 2012 11:43 am 
Hiroki SatoJan 28, 2012 12:57 am 
Warren BlockJan 28, 2012 2:47 pm 
Hiroki SatoJan 28, 2012 10:24 pm 
Subject:Re: Tidy and HTML tab spacing
From:Warren Block (wbl@wonkity.com)
Date:Jan 26, 2012 10:20:19 am
List:org.freebsd.freebsd-doc

On Fri, 20 Jan 2012, Warren Block wrote:

The suggestion of 	 is interesting. The problem is that tidy is changing tabs to spaces while still reading the file, when it really should be treating the tab as a special entity while processings tags.

Some further testing...

There are actually three versions of tidy: www/tidy, www/tidy-devel, and www/tidy-lib. Although the docproj port installs the last, any can be used.

Replacing tabs with 	 before tidy is called is probably the most compatible way. The attached patch does this with sed in the three doc Makefiles where tidy is used: doc.docbook.mk, doc.html.mk, doc.xml.mk.

How it actually works is either funny or appalling, depending on how you look at it. sed replaces tabs with 	, then tidy translates the 	 back to tabs. Since this happens after the tabs-to-spaces code in tidy, the output is a literal tab.

The Makefile changes work with any of the versions of tidy.

A sample of the Porter's Handbook produced with this patch: http://www.wonkity.com/~wblock/porters/book.html

Firefox 9 on FreeBSD renders the Makefile examples perfectly.

(Firefox 9 in WINE does not render them correctly either with tabs or spaces.)