• I searched this area for posts discussing poetry and read the posts I found but they don’t seem to address my question.

    I write poetry and I use a lot of intentional indentation and white space to shape the poems. And I want to be able to post these on my WordPress Blog (samadhisoft.com). But, when I’ve tried posting poetry there, I see that leading spaces are stripped and all the text lays up against the left margin. Maybe I need something like some of the fixes/plugins folks have done for showing computer programming code in their posts. Basically, I want to put an opening tag like <poetry> and have no formating applied after that until I add the closing tag</poetry> so that all the text I put in between has its white space and indentations preserved . Is that possible? Is there a code display Plugin that I can use (perhaps with different code-centric tags) to accomplish this? And suggestions are very welcome.

    Dennis
    samadhisoft.com

Viewing 9 replies - 1 through 9 (of 9 total)
  • Or you could simply hard code spaces by using & nbsp ; (without the spaces, which I had to include to get the code to show).

    You might also try using <pre>. It’s an HTML tag that tells the browser the text between these tags is formatted like I want it.

    WP might strip it out, but it’s worth a try.

    You’ll have to change something inside your stylesheet. Couldn’t you just use blockquote like

    this?

    That wouldn’t be semantic. The most semantic is pre-formatting the text with the <pre> tag or using line breaks (<br>) and non-breaking spaces (&nbsp;), but if WordPress deletes those tags then you may have to resort to some HTML/CSS tomfoolery

    The preformat tags might be a better choice. the   option doesn’t degrade well depending on which browser a sitee’s viewer is using. What might look inline on IE, won’t display the same way using firefox (I’m an oldie who remembers the days when a web site owner was supposed to care about cross browser compliance.)

    Thread Starter dennisgallagher

    (@dennisgallagher)

    So, how do the plugins that allow folks to post C & C++ and PHP without messing with the whitespace and such work?

    Adding nbsp every where seems like way too detailed and low-level a solution.

    The ‘pre’ might be OK if it would let be begin a big section with many lines and then end it off with ‘/pre’.

    I don’t mind putting in spaces rather than tabs (might be best anyway because tab expansions can vary). I just want a tag (or something) that says ‘leave the formatting alone!’

    The ‘pre’ might be OK if it would let be begin a big section with many lines and then end it off with ‘/pre’.

    That’s exactly what happens. You can format the entire poem within one set of pre tags. I’ve done an address in my contact page that way, for instance.

    Thread Starter dennisgallagher

    (@dennisgallagher)

    Well, I just tried it on a poem which had been jammed against the left margin and it worked. But there were unexpected consequences. Apparently everything is stripped including any font type and sizing. So, I ended up with tiny text. You can see the result here:

    https://samadhisoft.com/2007/03/22/070322-poem/

    I think there’s a next step here. The folks who do plugins to format computer code know how to apply highlights, indentation and whitespace within their code tags. I guess I’m going to have to try some of those plugins to verify what I’m saying here and if they work, begin asking how they work to get to what I’m looking for here.

    I am open and very interested in any suggestions that will help speed me to a good solution here.

    Cheers,

    Thread Starter dennisgallagher

    (@dennisgallagher)

    Ah, now I’m getting the hang of it. I used the pre’s to strip everything within the poem and then just within the pre’s, I added a font tag specifying the size and font type and it seems to work. I’m beginning to get an inkling of how the plugin writers generate the HTML to display the code pieces the way they want.

    Cheers! I think we’ve got a solution here.

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘Poetry with whitespace and indentation?’ is closed to new replies.