[pmwiki-users] New Recipe: IntuitiveSpacing
Ben Wilson
dausha at gmail.com
Thu Mar 15 12:56:40 CDT 2007
On 3/15/07, Hans <design5 at softflow.co.uk> wrote:
> See http://www.pmwiki.org/wiki/Cookbook/IntuitiveSpacing
I'm a bit of a format fanatic. I've started using TeX for writing
documents, although TeX can be a little _too_ fanatic for me. :-)
Anyway, I ran across a web site that describes the "standard"
typesetting rules.[1] As a result, I've started forcing formatting in
accordance with those rules.[2] I manifest these rules in paragraph
indentation, line-spacing, line-width, vertical spacing of headings,
etc. If you're using Firefox, try printing out the url in footnote 2,
and you'll see how these rules extend to printing.[3] So, I tend to
stand opposite of literal whitespacing.
That said, the recipe looks great! My only recommendation is to
shorten the 'ws' rules.
From: Markup('5sp','>^ws',"/\\s\\s\\s\\s\\s/"," ");
To: Markup('spacing', '>^ws', "/(\\s{1,5})/e", "str_replace(' ',
' ', '$1');");
Although, you'll probably have to fix the syntax. The goal is to
reduce to a one-liner.
--
Ben Wilson
"Words are the only thing which will last forever" Churchill
[1]: http://webtypography.net/toc/
[2]: http://www.atlantic-associates.net (still rolling this site out).
[3]: Warning, the site is CSS valid, except for an IE hack, and I've
yet to finish validating for all browsers.
More information about the pmwiki-users
mailing list