Daily Dish of Dominey Design
{  September 24, 2002  }

Curly Quotes in MovableType

Update: This post is outdated. This site now uses the SmartyPants plug-in for curly quotes and other entities.

If you're a stickler for typography and prefer the look of curly, or more traditionally typographer's quotes, in your HTML code, until now you had three choices. One, type “ / ” by hand, each and every time you wanted stylized quotes in your content. Two, use a shareware application that inserts chunks of pre-formatted text by assigning them to key commands. Three, use a script like Dean Allen's Web Writing Applescripts that strips out all your straight quotes and formats the copy for the web. The problem with all three methods is that your content is formatted for web display only. Move the content to another medium or application that doesn't parse specialized HTML character entities, and you run the risk of breaking hundreds of entries full of specialized character entities.

The solution is to separate the markup from the content - just like CSS. If you use MovableType on your weblog, there is an easy, free, quick plug-in you can install which will auto-format all your straight quotes and apostrophes when displayed online. Your data then remains in a more malleable form for other, future purposes.

Visit Matthew Mullenweg's weblog entry "Curly Quotes in Movable Type" for easy instructions and links to the plug-in.

Comments

Exactly what I have been looking for! Thanks for the link!

Posted by: Doug H. at September 24, 2002 9:51 AM

Here's another version of the same thing using Brad Choate's perlscript plugin:

http://daringfireball.net/2002/08/movable_type_smart_quote_devilry.html

I customized it a bit to handle ellipses and emdash variations. I've been using it for about a month now and it's perfect.

Posted by: Phil at September 24, 2002 12:47 PM

Wonderful suggestion! Works wonderfully. And it's good to have you back, Todd :).

Posted by: Phil Dokas at September 24, 2002 1:54 PM

Four: make your website in Unicodeís UTF-8. Make the forms that you add entries with in UTF-8 as well, so the browser will do the transcoding transparently. Get a keyboard driver that puts curly quotes on [Alt][;] and [Alt]['] (and ellipsis on [Alt][.], and then some more). Write correctly, have all the data stored correctly in one encoding.

Thatís the way I do it on Ñwycinkiî, at laestÖ :o)

Posted by: Shot at September 24, 2002 3:12 PM

Too bad all those curly quotes show up as annoying little boxes in a flash xml viewer because flash doesn't recognize that code. Although, I see now you leave them out of your xml page because they aren't showing up in my weblog viewer anymore : )

Posted by: Lauri at September 24, 2002 6:57 PM

Duh, reread the CSS part. That's why your xml is clean.

Posted by: Lauri at September 24, 2002 7:00 PM

Oooooooh!!!
How awesome!!
As soon as I get MT back up and running, I'll do that. Thanks for the link!

Posted by: Miriam at September 25, 2002 11:18 AM

how come there are no keys on the keyboard for these entities? woudn't that make it a whole lot easier?

Posted by: jon at September 25, 2002 12:51 PM

Jon - I have wondered that for some time now..anybody have a clue?

Posted by: Doug H. at September 25, 2002 3:06 PM

Eh. For pure web-related writing, Allen's "Preflight Cruncher" takes my biscuit. After all, why convert just quotes when you can also convert dashes, symbols, paragraphs, and whatever the hell else obscure typographic sundry you care to use? ;)

jon: There are no keys for asymmetrical quotes for the same reason that there are no keys for em-spaces. Anybody who would have a use for them already knows how...

Posted by: Brandon at September 25, 2002 7:42 PM

Jon (#8): typographic quotes are accessible by using key combinations:

‘ – opt-'
’ – shift-opt-'
“ – opt-"
” – shift-opt-"

(I'm going from memory, but I believe you substitute alt for opt on Wintel machines)

Posted by: Dean at September 26, 2002 4:04 AM

Everyone, please don't post text using keyboard-generated special characters. They'll look fine on your system but map to completely different characters on another platform. The HTML codes exist to show the intended characters correctly on all conforming browsers and platforms. I use a Mac and see way too much text that was copied and pasted from MS Word on Windows. It always stands out because of the bizarre characters that are meant to be quotes, em-dashes, etc.

Posted by: phil at September 26, 2002 11:35 AM

archives

You are reading "Curly Quotes in MovableType" in the individual archives.

Check out other recent posts in the Typography category

Return to the front page.