From owner-freebsd-doc@FreeBSD.ORG Sun Jun 27 19:26:36 2004 Return-Path: Delivered-To: freebsd-doc@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 0F7DB16A4CE; Sun, 27 Jun 2004 19:26:36 +0000 (GMT) Received: from abigail.blackend.org (blackend.org [212.11.35.229]) by mx1.FreeBSD.org (Postfix) with ESMTP id C0C2E43D5D; Sun, 27 Jun 2004 19:26:34 +0000 (GMT) (envelope-from marc@blackend.org) Received: from abigail.blackend.org (localhost [127.0.0.1]) i5RJQ19x066563; Sun, 27 Jun 2004 21:26:01 +0200 (CEST) (envelope-from marc@abigail.blackend.org) Received: (from marc@localhost) by abigail.blackend.org (8.12.11/8.12.11/Submit) id i5RJQ1Ud066562; Sun, 27 Jun 2004 21:26:01 +0200 (CEST) (envelope-from marc) Date: Sun, 27 Jun 2004 21:26:00 +0200 From: Marc Fonvieille To: Joe Marcus Clarke Message-ID: <20040627192600.GA66337@abigail.blackend.org> References: <1088359848.40140.5.camel@shumai.marcuscom.com> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="Q68bSM7Ycu6FN28Q" Content-Disposition: inline In-Reply-To: <1088359848.40140.5.camel@shumai.marcuscom.com> User-Agent: Mutt/1.4.2.1i X-Useless-Header: blackend.org X-Operating-System: FreeBSD 4.10-PRERELEASE cc: doc@FreeBSD.org Subject: Re: Tidying SGML documents X-BeenThere: freebsd-doc@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Documentation project List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 27 Jun 2004 19:26:36 -0000 --Q68bSM7Ycu6FN28Q Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sun, Jun 27, 2004 at 02:10:48PM -0400, Joe Marcus Clarke wrote: > I figure I'd ask before trying to clean these manually. What sgml-fu do > you guys use to tidy horrendously formatted website documents? The > GNOME docs are in pretty bad shape, and I've finally gotten fed up > enough to fix them. >=20 > I'm a vim user, and found this sometime ago: >=20 > autocmd BufNewFile,BufRead *.sgml,*.ent,*.html,*.tex,*.xsl set > autoindent formatoptions=3Dtcq2l textwidth=3D70 shiftwidth=3D2 softtabsto= p=3D2 > tabstop=3D8 > I use the same line :) > It works great for writing new documents, but I was hoping there was a > nice automatic recipe for existing documents. Thanks. >=20 Well it's difficult to "really" clean an existing file without using a complex script. What I use to do is: - cleaning trailing spaces (with sed) - replacing leading spaces with tabs where needed (with sed) - using gq command from Vim for correct indentation etc. Most of time it gives good results but I often have to finish the job by myself... Marc --Q68bSM7Ycu6FN28Q Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.4 (FreeBSD) iD8DBQFA3x9H81T1MWxkgcoRAgM/AJ9Eo3lz7BFb2Ql6KL12rFoqCycTgACdGCxV ABV57e4lVMC/W0WKk1moBgY= =UKLp -----END PGP SIGNATURE----- --Q68bSM7Ycu6FN28Q--