From owner-freebsd-doc@FreeBSD.ORG Thu Jan 26 18:20:57 2012 Return-Path: Delivered-To: freebsd-doc@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1F453106564A; Thu, 26 Jan 2012 18:20:57 +0000 (UTC) (envelope-from wblock@wonkity.com) Received: from wonkity.com (wonkity.com [67.158.26.137]) by mx1.freebsd.org (Postfix) with ESMTP id CA56D8FC15; Thu, 26 Jan 2012 18:20:56 +0000 (UTC) Received: from wonkity.com (localhost [127.0.0.1]) by wonkity.com (8.14.5/8.14.5) with ESMTP id q0QIKtVo021282; Thu, 26 Jan 2012 11:20:55 -0700 (MST) (envelope-from wblock@wonkity.com) Received: from localhost (wblock@localhost) by wonkity.com (8.14.5/8.14.5/Submit) with ESMTP id q0QIKt5O021279; Thu, 26 Jan 2012 11:20:55 -0700 (MST) (envelope-from wblock@wonkity.com) Date: Thu, 26 Jan 2012 11:20:55 -0700 (MST) From: Warren Block To: Hiroki Sato In-Reply-To: Message-ID: References: <20120119.084434.926306642968660094.hrs@allbsd.org> <20120119.155736.1127622096127250170.hrs@allbsd.org> User-Agent: Alpine 2.00 (BSF 1167 2008-08-23) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; FORMAT=flowed; CHARSET=US-ASCII Content-ID: X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.2.7 (wonkity.com [127.0.0.1]); Thu, 26 Jan 2012 11:20:56 -0700 (MST) Cc: freebsd-doc@FreeBSD.org Subject: Re: Tidy and HTML tab spacing X-BeenThere: freebsd-doc@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Documentation project List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 26 Jan 2012 18:20:57 -0000 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.)