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 ch...@chrislott.org
___
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 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 dockbr /
span id=ranupthe mouse ran up the clock/spanbr /
span id=struckthe clock struck one/spanbr /
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 ch...@chrislott.org

___
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 ch...@chrislott.org 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=1text=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
(`nbsp;`). 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
 nbsp; nbsp; nbsp; the mouse ran up the clock
 nbsp; nbsp; nbsp; nbsp; nbsp; nbsp; nbsp; nbsp; the clock struck one
the mouse ran down

http://johnmacfarlane.net/babelmark2/?normalize=1text=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
`pre` tag (but without the inner `code` tags of the code block).
So, you could use raw html like this:

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

http://johnmacfarlane.net/babelmark2/?normalize=1text=%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: How to insert a blank line between blockquote paragraphs?

2012-10-30 Thread Thomas Maibaum
Thank you, I think this makes a lot of sense. I came across Pandoc when 
I first learned about Markdown and I like its extended version of 
Markdown very much, in particular the fact that it supports footnotes 
and tables (the same goes for Markdown Extra).


Unfortunately, none of the tools I use locally (MarkdownHere for Mozilla 
Thunderbird, MarkdownPad) support any extended versions of Markdown, and 
I was unable to install Pandoc.


I use the MarkdownExtra Dingus or the Try Pandoc page every once in a 
while, but generally having to use a browser is too much of an 
interruption to my usual offline workflow.


Is there a how to install Pandoc for dummies-type site somewhere?

Thomas



John MacFarlane, 2012-10-25 03:22:

See question 6 here:
http://johnmacfarlane.net/babelmark2/faq.html#what-are-some-big-questions-that-the-markdown-spec-does-not-answer

And note that pandoc allows you to create two blockquotes if
you leave blank space between,

http://johnmacfarlane.net/babelmark2/?normalize=1text=%3E+foo%0A%0A%3E+bar%0A%0A

If you want one blockquote with two paragraphs, do it like this:

http://johnmacfarlane.net/babelmark2/?normalize=1text=%3E+foo%0A%3E%0A%3E+bar%0A%0A

Unfortunately the other implementations don't make this distinction.



___
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 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 ch...@chrislott.org
 ___
 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