Re: multiline header

2010-03-04 Thread Aristotle Pagaltzis
* Waylan Limberg way...@gmail.com [2010-03-02 18:25]:
 To be honest, I can't think of any elegant way to do multi-line
 setext headers,

Exactly.

 but multi-line hash headers should be easy.

I’ll agree with that.

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


Re: multiline header

2010-03-02 Thread Alexandre Leray

Thanks for all your replies,

I have indeed no problem to render my titles as headers, the idea was 
more about having a pure markdown well designed source document.
I like mine to be hard-wrapped, 78 characters a line, so I guess there 
is no actual solution.


Is there often this kind of backward compatibility problems?
In that case what about maintaining a backward compatible markdown and a 
non backward compatible one?


Best,

Alex

On 03/02/2010 07:32 AM, Aristotle Pagaltzis wrote:

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,
   


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


Re: multiline header

2010-03-02 Thread yy
You can use multi-line headers with md2html.awk [1]:

; echo -e 'line 1\nline2\n===' | md2html.awk
h1line 1 line2/h1
;

There are other few details, like this one, where md2html.awk could be
not compatible with other md implementations, but if you stay away
from the corners it should get the job done.

[1] http://hg.4l77.com/md2html.awk/
some discussion of the implementation can be found at:
http://www.anarchyinthetubes.com/src/md2html.awk/

-- 
- yiyus || JGL . 4l77.com
___
Markdown-Discuss mailing list
Markdown-Discuss@six.pairlist.net
http://six.pairlist.net/mailman/listinfo/markdown-discuss


Re: multiline header

2010-03-02 Thread david parsons
In article e5d795bb1003020800x4b755d7fu5af6be6b4ea68...@mail.gmail.com,
Waylan Limberg  markdown-discuss@six.pairlist.net wrote:

The original design goals also specifically stated that anything more
complex that the syntax already supported should be handled by raw
html. And, well, if you look at the source of his pages (add .txt to
the urls), J.G. almost exclusively uses raw html for his headers.

Hmm?   From a casual look at Daring Fireball this morning, about
the only raw html headers I saw were ones where he was id'ing
them (since, alas, the standard doesn't have the [foo](id:bar)
pseudo-protocol.)

But
that's not what I would call designed for lazy users.

It might be just me, but the surprise factor of having a header
reach back and grab an entire paragraphs might be less attractive
than it would seem, even to the body of users who write long headers
with a text editor that forces line-wrap at 80 characters.

-david parsons




But, well, we can't change it now.



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


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