multiline header

2010-03-01 Thread Alexandre Leray

Hi,

first of all thanks for such a great syntax, so far it's the best I know!

I have a document with quite long titles and I was wondering if it was 
possible to hard-break them:


e.g.:

This is a veeery long title
===

would be

This is a veeery

long title
==

Right now it produces two h1/ tags.


Best,

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


Re: multiline header

2010-03-01 Thread Waylan Limberg
On Mon, Mar 1, 2010 at 4:22 PM, Alexandre Leray
alexan...@alexandreleray.com wrote:
 Hi,

 first of all thanks for such a great syntax, so far it's the best I know!

 I have a document with quite long titles and I was wondering if it was
 possible to hard-break them:


You know, at first I was going to say that multi-line headers are
explicitly forbidden. Then I checked the syntax document and it says
nothing of the sort, However, as far as I know, every implementation
works that way - probably because markdown.pl works that way.

However, if they were supported, there would be a few ambiguities:

Which of these are a multi-line header:

Line one of header
Line two of header
=

Line one of header
=
Line two of header
=

Currently, it is known by many authors that Markdown allows headers to
not have blank lines before and/or after them. So, there could be
documents in which the author intended the first line in the first
example to be a paragraph - as it would be parsed now. And the author
could have intended the second example to actually be two separate
headers.

Even hash header could have this problem:

# Line one of header
Is this line 2 or a new paragraph?

In the thousands of existing documents out there, that second line is
expected to be a new paragraph, not part of the header.

And that's the problem, lazy authors have been relying on the existing
behavior for so long that changing it now could break thousands of
existing documents.


-- 

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


Re: multiline header

2010-03-01 Thread Tim Visher
On Mon, Mar 1, 2010 at 6:12 PM, Waylan Limberg way...@gmail.com wrote:
 On Mon, Mar 1, 2010 at 4:22 PM, Alexandre Leray
 alexan...@alexandreleray.com wrote:
 Hi,

 first of all thanks for such a great syntax, so far it's the best I know!

 I have a document with quite long titles and I was wondering if it was
 possible to hard-break them:


 You know, at first I was going to say that multi-line headers are
 explicitly forbidden. Then I checked the syntax document and it says
 nothing of the sort, However, as far as I know, every implementation
 works that way - probably because markdown.pl works that way.

 However, if they were supported, there would be a few ambiguities:

 Which of these are a multi-line header:

Line one of header
Line two of header
=

Line one of header
=
Line two of header
=

 Currently, it is known by many authors that Markdown allows headers to
 not have blank lines before and/or after them. So, there could be
 documents in which the author intended the first line in the first
 example to be a paragraph - as it would be parsed now. And the author
 could have intended the second example to actually be two separate
 headers.

 Even hash header could have this problem:

# Line one of header
Is this line 2 or a new paragraph?

 In the thousands of existing documents out there, that second line is
 expected to be a new paragraph, not part of the header.

 And that's the problem, lazy authors have been relying on the existing
 behavior for so long that changing it now could break thousands of
 existing documents.

Waylan's answer is good but very meta RE Markdown implementation and culture.

If you're desperate for a multi-line header in markdown, you have a few options.

1. Use Non-semantic markup directly in the document:

h1This is line one of abr /
very long header!/h1

   That's not recommended simply on the grounds of it not being
semantic and no one likes non-semantic markup. ;)

2. If you're interest is more in presentation, use CSS!

Over on Long Header Lane, business was going as usual:

# This is a very long header that would probably look better on
multiple lines.

Meanwhile, in the style sheet:

h1 {
width: 25em;
}

   That would get you your wrapping (on to however many lines you want
depending on the width of the element) and allows you to use plain
markdown to generate semantic markup without presentation cruft mixed
in.

Hope that helps.

-- 

In Christ,

Timmy V.

http://burningones.com/
http://five.sentenc.es/ - Spend less time on e-mail
___
Markdown-Discuss mailing list
Markdown-Discuss@six.pairlist.net
http://six.pairlist.net/mailman/listinfo/markdown-discuss


Re: multiline header

2010-03-01 Thread Aristotle Pagaltzis
Hi Alexandre,

* Alexandre Leray alexan...@alexandreleray.com [2010-03-01 22:35]:
 I have a document with quite long titles and I was wondering if
 it was possible to hard-break them:

 e.g.:

 This is a veeery long title
 ===

 would be

 This is a veeery
 
 long title
 ==

 Right now it produces two h1/ tags.

you could always fall back on HTML:

h1This is a veeery
long title/h1

If you need inline formatting inside the header, then hopefully
your implementation supports the `markdown` pseudo-attribute:

h1 markdown=1This is a very, very, very, *very*
long title/h1


* Waylan Limberg way...@gmail.com [2010-03-02 00:05]:
 And that's the problem, lazy authors have been relying on the
 existing behavior for so long that changing it now could break
 thousands of existing documents.

This sort of laziness seems like a design goal of Markdown, not
a bug in its users.


* Tim Visher tim.vis...@gmail.com [2010-03-02 02:30]:
 If you're desperate for a multi-line header in markdown, you
 have a few options.

 1. Use Non-semantic markup directly in the document:

 h1This is line one of abr /
 very long header!/h1

That's not recommended simply on the grounds of it not being
semantic and no one likes non-semantic markup. ;)

Non-semantic, says who?

More importantly, the problem was not to display a header across
two lines in the rendered document, it was being able to write
the header across several lines in the source document (and still
have a single tag in the rendered document), so your solutions
aren’t.


Regards,
-- 
Aristotle Pagaltzis // http://plasmasturm.org/
___
Markdown-Discuss mailing list
Markdown-Discuss@six.pairlist.net
http://six.pairlist.net/mailman/listinfo/markdown-discuss