Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 27 Jun 2004 21:26:00 +0200
From:      Marc Fonvieille <blackend@FreeBSD.org>
To:        Joe Marcus Clarke <marcus@FreeBSD.org>
Cc:        doc@FreeBSD.org
Subject:   Re: Tidying SGML documents
Message-ID:  <20040627192600.GA66337@abigail.blackend.org>
In-Reply-To: <1088359848.40140.5.camel@shumai.marcuscom.com>
References:  <1088359848.40140.5.camel@shumai.marcuscom.com>

next in thread | previous in thread | raw e-mail | index | archive | help

--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--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20040627192600.GA66337>