From mboxrd@z Thu Jan 1 00:00:00 1970 Date: Mon, 19 Apr 2010 12:44:59 -0700 (PDT) In-Reply-To: Message-Id: Subject: Re: Comments in markdown From: dsanson To: pandoc-discuss It seems like there are two issues: 1. Should markdown have its own syntax for specifying comments? 2. Should there be a way of indicating that some comments should be passed on in conversions and others should be left out? But I also think there is also a three way ambiguity in what 'comment' means here: 1. Comments as annotations to source code. 2. Comments as a way of "commenting out" some content or source code. 3. Comments as annotations to content. I take it (2) is called 'commenting' only because of the way programmers (ab)use the syntax originally provided for comments in the sense of (1). But thinking in terms of semantic markup, (1) and (2) seem quite different. Thinking about output formats, comments in the sense of (1) and (2) make good sense for HTML or LaTeX, but they don't make good sense for RTF, ODT, or PDF (well, they make sense, but I can't really imagine anyone using them.) On the other hand, comments in the sense of (3) make sense for all output formats, and would be a nice feature! Presumably such comments would be anchored to some chunk of text, suggesting a syntax akin to the footnote syntax... Focusing just on comments in the sense of (1) and (2), here is a proposal: ################################################################## # Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod # tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, ################################################################## This fits with some fairly common conventions found in shell scripts. To distinguish this use of the '#' sign from its use in specifying headers, require that the commented section be delimited by lines containing 7 or more '#' signs. Perhaps the '#' sign isn't the best choice. A C-style option would be /* Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, */ I find that far less "intuitive", but maybe that is just me. One need not require that every line of the comment start with a '#'. Something like the following should be sufficient: ####### Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, ####### This could be extended to indicate that the comment should not be passed on conversion by appending something to the first line, e.g., #######- Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, ####### or #######X Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, ####### Alternatively, the same syntax but with a different character could be used to mark the distinction between those comments that are passed through and those that are not. XXXXXXX X Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod X tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, XXXXXXX Or one could imagine a single syntax and a command line switch that settles whether or not the comments are passed through... Just my thoughts, David -- You received this message because you are subscribed to the Google Groups "pandoc-discuss" group. To post to this group, send email to pandoc-discuss@googlegroups.com. To unsubscribe from this group, send email to pandoc-discuss+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/pandoc-discuss?hl=en.