horizontal space/indent and HTML/PDF

Thomas Humiston tom at jumpingrock.net
Tue Oct 30 12:28:15 EDT 2012


My short answer is CSS. I haven't used Pandoc, so the example below may need modification for use in that environment.

Poetry can straddle the line between semantic structure (HTML) and presentation (CSS), particularly when it attaches semantic meaning to indentations and the like, but let's keep things simple. Below I've added <br /> elements for the basic structural breaks, and then, for styling, wrapped certain lines within <span> elements with IDs:

The CSS:

#ranup, #struck { display: block }
#ranup { margin-left: 1.5em }
#struck { margin-left: 3em }

The HTML:

hickory dickory dock<br />
<span id="ranup">the mouse ran up the clock</span><br />
<span id="struck">the clock struck one</span><br />
the mouse ran down


- TH


On Oct 30, 2012, at 11:57 AM, Chris Lott wrote:


> What is the best method to introduce horizontal space in text in a

> Pandoc document? Preferably something that would work for both HTML

> and PDF output?

>

> I need this for some poetry that has indented lines, ala the 2nd and 3rd lines:

>

> hickory dickory dock

> the most ran up the clock

> the clock struck one

> the mouse ran down

>

> c

> --

> Chris Lott <chris at chrislott.org>




More information about the Markdown-Discuss mailing list