Text Markup - Printable Version +- Curl Global Community (https://communities.curl.com) +-- Forum: Blogs (https://communities.curl.com/forumdisplay.php?fid=17) +--- Forum: Tech blog (https://communities.curl.com/forumdisplay.php?fid=18) +---- Forum: Robert blog (https://communities.curl.com/forumdisplay.php?fid=20) +---- Thread: Text Markup (/showthread.php?tid=331) |
Text Markup - RobertShiplett - 10-31-2011 Note: in what follows series of '.' represents the intended non-breaking spaces. The web challenge of formatting Friedrich Hoelderlin's Hyperions Schicksalslied in poem markup is that each successive line must be indented. Some internet poetry publishers who use HTML refuse to accept non-aligned text (too much trouble.) At present my Curl {ln } text proc for lines of a poem is simply {define-text-proc public {ln ...}:any {return {text text-preserve-whitespace?=true, {splice ...}{br} }}} but the elegance is lost in practice as can be seen below: {stanza {ln \u00A0 IHR wandelt droben im Licht } {ln \u00A0 . Auf weichem Boden, selige Genien! } {ln \u00A0 .. Glänzende Götterlüfte } {ln \u00A0 ... Rühren euch leicht, } {ln \u00A0 ... Wie die Finger der Künstlerin } {ln \u00A0 .... Heilige Saiten. } } || A \u0000 would have the same effect; \u0020 will fail to preserve the spacing. Is there another way to preserve the layout of these strings/lines ? Well, what about this: {stanza . IHR wandelt droben im Licht .. Auf weichem Boden, selige Genien! ... Glänzende Götterlüfte .... Rühren euch leicht, ..... Wie die Finger der Künstlerin ...... Heilige Saiten. } || using {define-text-proc public {stanza2 ...}:any {return {paragraph text-preserve-whitespace?=true, {splice ...} {br} \u0020 }} } || But NOTE: no spaces in the declaration in front of that {splice } ! All that we lose is the line-by line formatting, but the result is very readable. You can see the result at http://poets.aule-browser.com/hyperions-schicksalslied.html Here is the elegant, readable markup: {poem {ln \u00A0 } || Title {heading level=4, Hyperions Schicksalslied} {ln \u00A0 } {stanza . IHR wandelt droben im Licht .. Auf weichem Boden, selige Genien! ... Glänzende Götterlüfte .... Rühren euch leicht, ..... Wie die Finger der Künstlerin ...... Heilige Saiten. } {stanza . Schicksallos, wie der schlafende .. Säugling, atmen die Himmlischen; ... Keusch bewahrt .... In bescheidener Knospe, ..... Blühet ewig ...... Ihnen der Geist, ....... Und die seligen Augen ........ Blicken in stiller ......... Ewiger Klarheit. } {stanza . Doch uns ist gegeben, .. Auf keiner Stätte zu ruhn, ... Es schwinden, es fallen .... Die leidenden Menschen ..... Blindlings von einer ...... Stunde zur andern, ........Wie Wasser von Klippe ......... Zu Klippe geworfen, .......... Jahr lang ins Ungewisse hinab. }} |