Creative Technology Consultants
Random header image... Refresh for more!

Posts from — August 2010

Setting basic poetry in WordPress

It would appear that one thing that Word­Press isn’t nat­u­ral­ly good at is set­ting poet­ry. The default Word­Press action is that hit­ting Return inserts a line break, which is fine for prose arti­cles but not for poet­ry, where you want a bunch of lines with hard returns but no space between them.

Leona has this prob­lem all the time in the Poe­sie sec­tion of her own site, The Great Return­ing. One of her prob­lems, of course, is that she writes in Microsoft Word, and the great temp­ta­tion is to sim­ply copy and paste the result into Word­Press. This is prob­a­bly the worst of all pos­si­ble worlds, as Word is noto­ri­ous for bring­ing all man­ner of HTML crap along with it that screws up vir­tu­al­ly any web site formatting.

If you’re writ­ing direct into Word­Press, the solu­tion is gen­er­al­ly straight­for­ward (sub­ject to weird­ness­es caused by your choice of theme): for blank lines between stan­zas, hit Return; for sim­ple line-breaks, use Shift-Return – they’re essen­tial­ly the equiv­a­lents of “</p>” and “<br />” in HTML respec­tive­ly. But who would write poet­ry direct into Word­Press? I’m not sure, but most poets I know tweak their copy a good deal more than many jour­nal­ists and prob­a­bly need some­thing a bit more like a word-proces­sor to be con­fi­dent of doing what they require. Cer­tain­ly the default Word­Press edit win­dow does­n’t show enough lines for prop­er con­text — you prob­a­bly want to see the entire opus while you’re writ­ing. Do remem­ber though, that in Settings->Writing you can adjust the num­ber of lines vis­i­ble in the window.

My per­son­al pref­er­ence when writ­ing for the Web – what­ev­er the con­tent, by and large – out­side the web appli­ca­tion itself is to use the sim­plest of text edi­tors (my favourite is Tex­tWran­gler from Bare Bones — but you can equal­ly use TextE­d­it on a Mac­in­tosh or Notepad in Win­dows: basi­cal­ly the sim­plest text edi­tor you have) and then copy and paste that.

If you are start­ing from Word, then copy the text out of Word and paste it into the text edi­tor (thus strip­ping any Word non­sense for­mat­ting, but note you will also lose all the text styling too).

Then fix the copy as required so it looks decent (bear in mind you can’t style it, with ital­ics etc yet), copy it out of the text edi­tor and paste it into a new post in WordPress.

But. Before you paste…

Don’t paste it into the “Visu­al” Edit win­dow – that will add some more for­mat­ting that will screw things up again (you’ll lose all the line-breaks). Instead, click the HTML tab at the top of the edit win­dow, make sure the win­dow is utter­ly blank, and paste it there. Then go back to the Visu­al tab and it should look fine. That done, you need to go through the poem and style any text that needs it, adding ital­ics, bold and so on as required.

Even with all the for­mat­ting infor­ma­tion stripped off the text before you bring it in, there may still be some vari­a­tion in the result­ing look due to the Theme you’re using. We’re using The­sis and this does­n’t seem to give much trou­ble. Your mileage may vary.

The above is fine for basic poet­ry. When it comes to spe­cial for­mat­ting, start­ing lines in odd places and cre­at­ing shapes out of the text, I think I would prob­a­bly con­sid­er set­ting it in Word (or what­ev­er) and then tak­ing a screen shot of it and insert­ing it as a graph­ic — which is a dread­ful workaround, frankly. There must be a bet­ter way. Any­one got some bet­ter ideas?

August 12, 2010   5 Comments