Tables

2009-02-18 Thread Daniel Winterstein
Are there any standards emerging for how to represent tables in Markdown?

Regards,
 - Daniel



Dr Daniel Winterstein
Winterwell Associates Ltd
tel: 0772 5172 612
http://www.winterwell.com
Registered in Scotland, company no. SC342991
___
Markdown-Discuss mailing list
Markdown-Discuss@six.pairlist.net
http://six.pairlist.net/mailman/listinfo/markdown-discuss


Disambiguate List Item Followed by Code Block

2009-02-18 Thread David E. Wheeler

Howdy,

Quick question: Since list items with multiple paragraphs need to be  
indented four spaces, and code blocks are also indented four spaces,  
is there any way to disambiguate a list followed by a code block?  
Example:


*   This is a list
item.
*   And so is this.

Is this a second paragraph in the second list item,
or a code block?

It looks like Markdown.pl and discount agree that it should be a  
second paragraph. If that is indeed the standard, what should I do if  
I actually want to follow a list with a code block?


Many thanks,

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


Re: Disambiguate List Item Followed by Code Block

2009-02-18 Thread John MacFarlane
+++ David E. Wheeler [Feb 18 09 09:33 ]:
 Howdy,

 Quick question: Since list items with multiple paragraphs need to be  
 indented four spaces, and code blocks are also indented four spaces, is 
 there any way to disambiguate a list followed by a code block? Example:

 *   This is a list
 item.
 *   And so is this.

 Is this a second paragraph in the second list item,
 or a code block?

 It looks like Markdown.pl and discount agree that it should be a second 
 paragraph. If that is indeed the standard, what should I do if I actually 
 want to follow a list with a code block?

You can insert an HTML comment between them.  It's a kludge, but
that's the only way I know of.

*   This is a list
item.
*   And so is this.

!-- end of list --

Definitely a code block.

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


Re: Tables

2009-02-18 Thread John MacFarlane
+++ Daniel Winterstein [Feb 18 09 08:01 ]:
 Are there any standards emerging for how to represent tables in Markdown?

The only standard way is to use HTML.

Different extensions to markdown syntax have made different
decisions about tables:

http://johnmacfarlane.net/pandoc/README.html#tables
http://michelf.com/projects/php-markdown/extra/#table
http://fletcherpenney.net/multimarkdown/users_guide/multimarkdown_syntax_guide/

If you look in the archives of this list, you'll find some discussion
of the pros and cons of various approaches.  But there's no emerging
standard, to my knowledge.

John

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


Re: Disambiguate List Item Followed by Code Block

2009-02-18 Thread David E. Wheeler

On Feb 18, 2009, at 10:19 AM, Waylan Limberg wrote:


This was a hotly discussed issue a while back with all sorts of
suggestions. Search the archives. I believe the final consensus was to
create an alternate markup for codeblocks, which address both this use
case and well as consecutive, but separate, codeblocks. However, I
believe that only PHP Extra and Python implementations have
implemented fenced code blocks.

http://michelf.com/projects/php-markdown/extra/#fenced-code-blocks


Ah, right, I forgot about those. Definitely a better workaround.

Thanks,

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


A Modest Definition List Proposal

2009-02-18 Thread David E. Wheeler

Howdy,

I've been thinking a lot about definition list syntax, and what I did  
and didn't like about the PHP Markdown Extra syntax (which seems to be  
a de-facto standard, discount notwithstanding, yes?). What I came up  
with is a single character change to the PHP Markdown Extra syntax. I  
just published a detailed explanation of my thoughts and reasoning for  
this on [my blog](http://justatheory.com/computers/markup/modest-markdown-proposal.html 
). If you would excuse the temerity of my late entry into what I'm  
sure has been a contentious issue, I would love feedback.


In a nutshell, I embrace the PHP Markdown Extra syntax, with one  
change: I would like to see the colon replaced with a tilde (for  
backwards compatibility, both should be supported). That means that a  
simple definition list would look like this:



Apple:
  ~ Pomaceous fruit of plants of the genus Malus in the family  
Rosaceae.

  ~ An american computer company.

Orange:
  ~ The fruit of an evergreen tree of the genus Citrus.


And a more complicated one would look like this:


Term 1:

~   This is a definition with two paragraphs. Lorem ipsum
dolor sit amet, consectetuer adipiscing elit. Aliquam
hendrerit mi posuere lectus.

Vestibulum enim wisi, viverra nec, fringilla in, laoreet
vitae, risus.

~   Second definition for term 1, also wrapped in a paragraph
because of the blank line preceding it.

Term 2:

~   This definition has a code block, a blockquote and a list.

code block.

 block quote
 on two lines.

1.  first list item
2.  second list item


See my blog entry for more detailed description of why I prefer the  
tilde to the colon for this purpose. The best things about it are that  
it makes for a more natural bullet, already has precedent in  
dictionaries, and suggest equivalency if you're familiar with  
mathematics, which makes for a nice mnemonic.


Comments? Has this ship already sailed?

Best,

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


Re: A Modest Definition List Proposal

2009-02-18 Thread Waylan Limberg
On Wed, Feb 18, 2009 at 1:44 PM, David E. Wheeler da...@kineticode.com wrote:
[snip]

 In a nutshell, I embrace the PHP Markdown Extra syntax, with one change: I
 would like to see the colon replaced with a tilde (for backwards
 compatibility, both should be supported). That means that a simple
 definition list would look like this:

[snip]
 Comments? Has this ship already sailed?

You make a convincing argument. And I must admit your proposal is very
nice to look at/read/write. But if it ain't broke, don't fix it.

The current implementation was set before I came along some few years
ago, and I have never searched through the archives to see how it came
about or why. But, people have been using it for this long without
issue and there are already numerous existing documents out there that
use it, so I see no reason to change it. In fact that last point
(numerous existing documents) seems to be the de-facto response to any
suggested changes on this list - and understandably so. No doubt
that's why you suggested leaving the existing syntax in place, but
then we would have two ways to define deflists. What happens when an
author mixes the two? Ack! Yeah, this ship has sailed IMO.

-- 

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


Re: A Modest Definition List Proposal

2009-02-18 Thread David E. Wheeler


On Feb 18, 2009, at 12:19 PM, Waylan Limberg wrote:


Comments? Has this ship already sailed?


You make a convincing argument. And I must admit your proposal is very
nice to look at/read/write.


Thank you.


But if it ain't broke, don't fix it.

The current implementation was set before I came along some few years
ago, and I have never searched through the archives to see how it came
about or why. But, people have been using it for this long without
issue and there are already numerous existing documents out there that
use it, so I see no reason to change it. In fact that last point
(numerous existing documents) seems to be the de-facto response to any
suggested changes on this list - and understandably so. No doubt
that's why you suggested leaving the existing syntax in place, but
then we would have two ways to define deflists. What happens when an
author mixes the two? Ack! Yeah, this ship has sailed IMO.


I don't think it's a problem to have two different kinds of bullets  
for definition list items; after all, you can already use +, -, or *  
for unordered lists. And you can mix them without penalty, so the same  
would be true here.


FWIW, the change to MultiMarkdown.pl to make this work would just be  
this:


--- bin/MultiMarkdown.pl.orig   2008-01-18 15:08:43.0 -0800
+++ bin/MultiMarkdown.pl2009-02-18 12:28:47.0 -0800
@@ -2559,7 +2559,7 @@

my $definition = qr{
\n?[ ]{0,$less_than_tab}
-   \:[ \t]+(.*?)\n
+   [:~][ \t]+(.*?)\n
 		((?=\n*[ ]{0,$less_than_tab}\S)|\n\n|\Z)	# Lookahead for non-space  
at line-start,


# two returns, or end of doc
}sx;

Plus documentation, of course. Doesn't get much simpler than that.

Thanks for your reply.

Best,

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


Re: A Modest Definition List Proposal

2009-02-18 Thread David E. Wheeler

On Feb 18, 2009, at 10:44 AM, David E. Wheeler wrote:

See my blog entry for more detailed description of why I prefer the  
tilde to the colon for this purpose. The best things about it are  
that it makes for a more natural bullet, already has precedent in  
dictionaries, and suggest equivalency if you're familiar with  
mathematics, which makes for a nice mnemonic.


Comments? Has this ship already sailed?


Aristotle was kind enough to point me to some older posts on the  
subject of definition lists, where I saw this message from Mssr. Gruber:


On Jul 27, 2005, at 7:33 AM, John Gruber wrote:


And since the ones with multiple terms and/or definitions are the
exception, not the norm, I think in the common cases, you'd wind up
with something that looks like this:

  Term 1:: Definition a blah blah blah blah blah
  Term 2:: Definition b foo bar baz
  Term 3:: Definition c even more blah blah blah


Was this ever implemented? I haven't noticed it in the documentation  
for PHP Markdown Extra or MultiMarkdown.


I think that, using the tilde as I've suggested in this thread, this  
can be even better:


  Term 1 ~ Definition a blah blah blah blah blah
  Term 2 ~ Definition b foo bar baz
  Term 3 ~ Definition c even more blah blah blah

Basically, it's the same rule, only you don't have to have a newline  
before the definition starts. Also, the single ~ is a little less  
“unnatural” looking than the double : (and I say that as a Perl  
hacker, so I'm used to “::”!).


Best,

David


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


Re: A Modest Definition List Proposal

2009-02-18 Thread David E. Wheeler

On Feb 18, 2009, at 2:50 PM, Tom Humiston wrote:

A problem I see with your suggestion about not including newlines is  
that interpreting the form xxx ~ yyy as a DT/DD pair precludes the  
use of  ~  (space-tilde-space) in some other ways it's likely to  
be used ~ for instance, as an alternative to the plain hyphen.


Yeah. I think ~~ would work okay, too, and gets around that problem.

 Term 1 ~~ Definition a blah blah blah blah blah
 Term 2 ~~ Definition b foo bar baz
 Term 3 ~~ Definition c even more blah blah blah

Although I think that it's a bit of a red herring.

I also suppose that's why the suggestion in 2005 was for double  
colons. Colon-newline seems pretty clear, if anything is. (Mind you,  
I am NOT involved in writing implementations whatsoever; I'm just  
watching the mailing list.)


I didn't see anyone suggest tilde for definitions in 2005, though I  
did notice that Aristotle tried it out for terms. I agree with him  
that tildes didn't work so well there. :-)


Best,

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


Re: A Modest Definition List Proposal

2009-02-18 Thread Joseph Lorenzo Hall
Yeah, Markdown users in the hard sciences would trigger that
constantly. best, Joe

On 2/18/09, Yuri Takhteyev qarama...@gmail.com wrote:
 Right. I actually think that using ~ as a range operator (essentially) is
 fairly rare outside of electronic circles, at least in US English.

 In other words, by at least 5% of the world population. :)

 But even just looking at the US English, ~ is often used for
 approximation, for the home directory, for equivalence, etc. So,
 things like The cost is ~ $3, cd to ~ before doing this, The N
 needs a ~ over it, If we assume x ~ y, then will all suddenly
 become definition lists?

 Term 1 o Definition a blah blah blah blah blah
 Term 2 o Definition b foo bar baz
 Term 3 o Definition c even more blah blah blah

 É. O unico problema é o o do Portugues, que é um artigo nessa linguagem.

 (Our friend o is a _word_ in some languages.)

 - yuri

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



-- 
Joseph Lorenzo Hall
ACCURATE Postdoctoral Research Associate
UC Berkeley School of Information
Princeton Center for Information Technology Policy
http://josephhall.org/
___
Markdown-Discuss mailing list
Markdown-Discuss@six.pairlist.net
http://six.pairlist.net/mailman/listinfo/markdown-discuss


Re: A Modest Definition List Proposal

2009-02-18 Thread David E. Wheeler

On Feb 18, 2009, at 4:37 PM, Yuri Takhteyev wrote:

Right. I actually think that using ~ as a range operator  
(essentially) is

fairly rare outside of electronic circles, at least in US English.


In other words, by at least 5% of the world population. :)

But even just looking at the US English, ~ is often used for
approximation, for the home directory, for equivalence, etc. So,
things like The cost is ~ $3, cd to ~ before doing this, The N
needs a ~ over it, If we assume x ~ y, then will all suddenly
become definition lists?


Yeah, okay. Forget the one-line format, then. No one has implemented  
it so far anyway, as near as I can tell. :-)



Term 1 o Definition a blah blah blah blah blah
Term 2 o Definition b foo bar baz
Term 3 o Definition c even more blah blah blah


É. O unico problema é o o do Portugues, que é um artigo nessa  
linguagem.


(Our friend o is a _word_ in some languages.)


D'oh! Oh yeah! Sorry for the cultural imperialism. :-)

Best,

David

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


Re: Disambiguate List Item Followed by Code Block

2009-02-18 Thread John MacFarlane
+++ Waylan Limberg [Feb 18 09 13:19 ]:
 On Wed, Feb 18, 2009 at 12:33 PM, David E. Wheeler da...@kineticode.com 
 wrote:
  Howdy,
 
  Quick question: Since list items with multiple paragraphs need to be
  indented four spaces, and code blocks are also indented four spaces, is
  there any way to disambiguate a list followed by a code block?
 
 This was a hotly discussed issue a while back with all sorts of
 suggestions. Search the archives. I believe the final consensus was to
 create an alternate markup for codeblocks, which address both this use
 case and well as consecutive, but separate, codeblocks. However, I
 believe that only PHP Extra and Python implementations have
 implemented fenced code blocks.
 
 http://michelf.com/projects/php-markdown/extra/#fenced-code-blocks

pandoc too:
http://johnmacfarlane.net/pandoc/README.html#delimited-code-blocks

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


Re: A Modest Definition List Proposal

2009-02-18 Thread Aristotle Pagaltzis
* David E. Wheeler da...@kineticode.com [2009-02-19 02:00]:
 Yeah, okay. […] D’oh! Oh yeah!

Told you it is a thorny problem. :-(  It *looks* simple, yeah…

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


Re: A Modest Definition List Proposal

2009-02-18 Thread David E. Wheeler

On Feb 18, 2009, at 6:59 PM, Aristotle Pagaltzis wrote:


Yeah, okay. […] D’oh! Oh yeah!


Told you it is a thorny problem. :-(  It *looks* simple, yeah…


I still think that ~ works well (at least as well as :) in a non- 
single-line usage, which is all that's currently implemented with :,  
anyway.


That said, there is no way to get any standard blessed as official  
here aside from Gruber adding it to Markdown.pl, right? Except for  
folks adding their own preferred methods to the existing  
implementations…


Best,

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