Re: horizontal space/indent and HTML/PDF

2012-10-30 Thread John MacFarlane
If you don't use emphasis or other inline formatting, it's
easiest to put this in a special fenced code block

~~~ {.poetry}
hickory dickory dock
the mouse ran up the clock
   the clock struck one
the mouse ran down
~~~

And then use a CSS rule like

pre.poetry code { font-family: serif; }

Alternatively you can do this:

hickory dickory dock\
\ \ \ \ the mouse ran up the clock\
\ \ \ \ \ \ \ \ the clock struck one\
the mouse ran down

John


+++ Chris Lott [Oct 30 12 07:57 ]:
> 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 
> ___
> Markdown-Discuss mailing list
> Markdown-Discuss@six.pairlist.net
> http://six.pairlist.net/mailman/listinfo/markdown-discuss
___
Markdown-Discuss mailing list
Markdown-Discuss@six.pairlist.net
http://six.pairlist.net/mailman/listinfo/markdown-discuss


Re: horizontal space/indent and HTML/PDF

2012-10-30 Thread Alan Hogan

On Oct 30, 2012, at 11:23 AM, Koralatov  wrote:

> On Tue, Oct 30, 2012 at 15:57, 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
> 
> The other suggestions are all better than the one I’m about to make, so
> consider yourself forewarned.
> 
> I’m personally do it using code spaces, like so:
> 
> hickory dickory dock  ``the most ran up the clock  ` `the clock 
> struck one  the mouse ran down  
> The spaces contained inside the code will be printed as they are, and it
> shouldn’t interfere with later Markdown syntax because they’re terminated
> already.  It’s a pretty ugly, low-tech solution though.

If you are controlling the output HTML & PDF, this “won’t” be a problem,
but many stylesheets (such as my own) style such incline `` elements
to have a slightly colored background. It is definitely an ugly solution
in that it does not produce portable or semantic output.

AJH

smime.p7s
Description: S/MIME cryptographic signature
___
Markdown-Discuss mailing list
Markdown-Discuss@six.pairlist.net
http://six.pairlist.net/mailman/listinfo/markdown-discuss


Re: horizontal space/indent and HTML/PDF

2012-10-30 Thread Waylan Limberg
On Tue, 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?

Well, there are a few different things you could try:

The easiest would be to put the entire poem in a code block. Of
course, that may not be as pretty (with a monospaced font) and you
lose inline markdown (emphasis, links, etc).

http://johnmacfarlane.net/babelmark2/?normalize=1&text=hickory+dickory+dock%0Athe+mouse+ran+up+the+clock%0A+the+clock+struck+one%0Athe+mouse+ran+down

A second option would be to use html entities for non-braking spaces
(` `). You only need to make every other space non-breaking. And
don't forget to end each line with two spaces to force the line
breaks. Like this:

hickory dickory dock
       the mouse ran up the clock
                 the clock struck one
the mouse ran down

http://johnmacfarlane.net/babelmark2/?normalize=1&text=hickory+dickory+dock++%0A+%26nbsp%3B+%26nbsp%3B+%26nbsp%3B+the+mouse+ran+up+the+clock++%0A+%26nbsp%3B+%26nbsp%3B+%26nbsp%3B+%26nbsp%3B+%26nbsp%3B+%26nbsp%3B+%26nbsp%3B+%26nbsp%3B+the+clock+struck+one++%0Athe+mouse+ran+down

Of course, that doesn't look so nice in markdown, but works great in HTML.

The HTML spec actually suggests that poetry could be wrapped in a
`` tag (but without the inner `` tags of the code block).
So, you could use raw html like this:


hickory dickory dock
the mouse ran up the clock
 the clock struck one
the mouse ran down


http://johnmacfarlane.net/babelmark2/?normalize=1&text=%3Cpre%3E%0Ahickory+dickory+dock%0Athe+mouse+ran+up+the+clock%0A+the+clock+struck+one%0Athe+mouse+ran+down%0A%3C%2Fpre%3E

I'm not sure if Pandoc will parse inline markdown in there or not
(some parers might if you set markdown=1 on the pre tag). And I'm not
sure how any of the above will translate to PDF. But that should get
you started.

-- 

\X/ /-\ `/ |_ /-\ |\|
Waylan Limberg
___
Markdown-Discuss mailing list
Markdown-Discuss@six.pairlist.net
http://six.pairlist.net/mailman/listinfo/markdown-discuss


Re: horizontal space/indent and HTML/PDF

2012-10-30 Thread Thomas Humiston
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  elements for the 
basic structural breaks, and then, for styling, wrapped certain lines within 
 elements with IDs:

The CSS:

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

The HTML:

hickory dickory dock
the mouse ran up the clock
the clock struck one
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 

___
Markdown-Discuss mailing list
Markdown-Discuss@six.pairlist.net
http://six.pairlist.net/mailman/listinfo/markdown-discuss


horizontal space/indent and HTML/PDF

2012-10-30 Thread Chris Lott
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 
___
Markdown-Discuss mailing list
Markdown-Discuss@six.pairlist.net
http://six.pairlist.net/mailman/listinfo/markdown-discuss