On Jan 10, 2012, at 2:00 PM, James Merkel wrote:

> In fact, I am using multiple consecutive tab characters to force things to 
> line up -- i.e. a sure recipe for disaster.

The trouble with that is that the number of tabs you’ll need depends on the 
width of each item, and that’s highly dependent on not only the font, but on 
which typographic features (like kerning and ligatures) are enabled.

> Where is this Word Processing 101 document that I should be reading?

There was a great old book from the ‘80s called “The Mac Is Not A Typewriter” 
that went over all this stuff — tabs, spacing between sentences, curly vs 
straight quotes, dashes vs. hyphens and so on. Nowadays there must be some 
online tutorials, but I don’t know of anything specific.

Anyway, if you want your layout to survive being transferred into TextEdit or a 
word processor, you should create an NSParagraphStyle with tab stops where you 
want them, then use a single tab between columns.

If you want to paste it into a plain-text editor like 
Xcode/TextMate/TextWrangler/BBEdit, the task is entirely different. Use nothing 
but spaces as separators, because you can’t guess what width a tab is at the 
destination. Just assume the text is monospaced and count the number of 
characters in a column to figure out how many spaces to insert. Needless to say 
this will only look right in a monospaced font like Courier.

—Jens

Attachment: smime.p7s
Description: S/MIME cryptographic signature

_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to