Date: Sun, 20 Jul 2008 11:23:51 +0100 From: Matthew Seaman <m.seaman@infracaninophile.co.uk> To: Gary Kline <kline@thought.org> Cc: FreeBSD Mailing List <freebsd-questions@freebsd.org>, "N. Raghavendra" <raghu@mri.ernet.in> Subject: Re: How to divide up? Message-ID: <48831237.7090200@infracaninophile.co.uk> In-Reply-To: <20080720095525.GB29612@thought.org> References: <20080720002345.GA9173@thought.org> <86y73x9epk.fsf@riemann.mri.ernet.in> <20080720095525.GB29612@thought.org>
next in thread | previous in thread | raw e-mail | index | archive | help
This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enig22B98340C047BA5C12C269F6 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: quoted-printable Gary Kline wrote: > On Sun, Jul 20, 2008 at 01:20:31PM +0530, N. Raghavendra wrote: >> At 2008-07-19T17:23:48-07:00, Gary Kline wrote: >> >>> Is there an easyy way of splitting yp these tags into one-per-line? >>> I'm not obsessive [[?, :)]], but for what I've got in mind, the tags >>> and stuff would look better to my eyes? ....the outcome of this >>> will go ino a special database, not html . >>> >>> is there some clever perl one-liner ... >> I suggest that instead of such ad hoc solutions, you checkout the port= >> `www/tidy'. It provides a reasonable pretty printer for HTML. >> However, it doesn't print every tag on a separate line. I think its >> behaviour in this respect is close to the style guidelines in the >> FreeBSD Documentation Project Primer [10.1.4.2, Separating tags]. >> >> Raghavendra. >> >=20 > Thanks, but I've very recently become acquainted with tidy and have beg= un > using it on my main index.php--thought.org's "www" page. This page > was an almost unreadable rat's net of by-hand coded html. (as i move > toward another mark-up standard.) using your script, or mine, based= on > Roland smith's, will be a great help. =20 >=20 > I knew there were ways of embedding \n's in scripts and signatures, &c,= > but until your posting, i had forgoooten exactly how. thank you for > the refresher! =20 >=20 > I'll check the FBSD Docs for `Separating Tags'; that level of obscurity= is > beyond amazing, :-) > =20 Alternatively, if your aim is to simplify the HTML, you could switch to using CSS. You'ld change: <CENTER><FONT face=3D"Times" size=3D"3"><FONT color=3D"#333366">Realizati= on<BR> =2E.. </FONT></FONT></CENTER> To something like: <span class=3D"foo">Realization<br /> .... </span> ('span' here is just a handy all-purpose tag for identifying a chunk of stuff: the same mechanism can be applied to any HTML tag.) Add this in the <head></head> section of the HTML: <link rel=3D"stylesheet" href=3D"style.css" type=3D"text/css" /> and have a file style.css in you web root containing (inter alia) =2Efoo { text-align: center; font-family: "Times New Roman"; font-size: "medium"; color: #333366; } See http://www.w3.org/TR/CSS21/cover.html for the full story. User of CSS has a number of advantages. First off, it abstracts the definition of the style into one place. Suppose you decide that medium sized pale blue text is pass=E9 and want it written in 24pt=20 white sans-serif on a black background? Instead of having to grep through all of your HTML files, now you just have to edit one file. The other advantage is more subtle. You divide, conceptually, deciding what a piece of text's /function/ is from deciding what it should /look=20 like/. So if the bit of text is, say, an aphorism that you're quoting, you can just declare it to be class=3D"aphorism" in the HTML markup when writing that page, and then define a .aphorism { }=20 section in your stylesheet, later on when it won't interrupt your train of thought. Cheers, Matthew --=20 Dr Matthew J Seaman MA, D.Phil. 7 Priory Courtyard Flat 3 PGP: http://www.infracaninophile.co.uk/pgpkey Ramsgate Kent, CT11 9PW --------------enig22B98340C047BA5C12C269F6 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.9 (FreeBSD) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iEYEAREIAAYFAkiDEj0ACgkQ8Mjk52CukIxO4QCZAV/aiSXiNi3HlkDnV8oCAxmt 3wgAnjWgQmakSSkmb/mDAFMCPnbuY6S7 =vFxl -----END PGP SIGNATURE----- --------------enig22B98340C047BA5C12C269F6--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?48831237.7090200>