Re: Definition list as image caption
On Fri, Jun 22, 2012 at 7:00 AM, Jakob ja...@gmx.at wrote: recently though about image captions, then i realized that this could be achiebed by Markdown Extra's definition list feature: ![alttext](http://exampl.com/img.jpg) : here goes the *caption* What do you think? Hmm, what HTML are you suggesting that output? Standard Definition List HTML? How would that translate to a caption? -- \X/ /-\ `/ |_ /-\ |\| Waylan Limberg ___ Markdown-Discuss mailing list Markdown-Discuss@six.pairlist.net http://six.pairlist.net/mailman/listinfo/markdown-discuss
Re: Definition list as image caption
Von: Waylan Limberg way...@gmail.com Hmm, what HTML are you suggesting that output? Standard Definition List HTML? How would that translate to a caption? In the meantime I rethought my proposal, but for the sake of being backwards compatible with HTML4: I think it should take a figure class (only when it is only images and that definition line), like this: ``` dl class=figure dtimg alt=alt text src=http://example.com/img.jpg;/dt dd class=figcaptionthe caption/dd /dl ``` like this i would be very similar to the HTML5 stuff (and could be easily handled in CSS with `.figure {}` in HTML4 or just `figure {}` in HTML5): ``` figure img alt=alt text src=http://example.com/img.jpg; figcaptionthe caption/figcaption /figure ``` -- NEU: FreePhone 3-fach-Flat mit kostenlosem Smartphone! Jetzt informieren: http://mobile.1und1.de/?ac=OM.PW.PW003K20328T7073a ___ Markdown-Discuss mailing list Markdown-Discuss@six.pairlist.net http://six.pairlist.net/mailman/listinfo/markdown-discuss
Re: Definition list as image caption
It's a good idea, Jakob. Despite the name of this HTML element (which HTML5 moves to rename as description list), it exists for exactly the sort of purpose you suggest -- or, as I like to say, DT is some object, DD is something *about* that object. No matter which implementation of Markdown (or anything else) one uses to wrap content in HTML, the question is, What HTML element is appropriate for the job? The answer isn't always stark, and DL has long been undervalued, misunderstood, and largely forgotten, but it is indeed the best choice in this case. And in situations where the text includes discrete bits, such as a photograph's copyright info and the name of the photographer in addition to the caption, we see that it indeed becomes list-like, so that the appropriateness of using DL becomes even more apparent. Here's an example of styling for a photo and caption info in a DL element. (Note: I made up the copyright info. If Wikipedia even allows hotlinking to their photos, I'd first look up the correct way of doing it before using this on a real site.) div#example { max-width: 20em; } dt { padding: 5px; border: 1px solid gray; margin-bottom: 5px; } dt img { width: 100%; height: auto; } dd { margin-left: 0; /* removes the indent */ color: gray; font-size: small; } dd.maker, dd.copyright { font-style: italic; font-size: x-small; margin-top: 1em; } dd.maker { float: left; margin-right: 2em; } dd.copyright { float: right; } div id=example dl dtimg src=http://upload.wikimedia.org/wikipedia/commons/f/fd/Fuzzy_Freddy.jpg; alt=Foxy Freddy, from Wikipedia ddFox is a common name for many species of omnivorous mammals belonging to the Canidae family. dd class=makerPhoto by Rob Lee dd class=copyrightcopy;2012 Wikimedia / GPL /dl /div Regards, TH On Jun 22, 2012, at 7:00 AM, Jakob wrote: recently though about image captions, then i realized that this could be achiebed by Markdown Extra's definition list feature: ![alttext](http://exampl.com/img.jpg) : here goes the *caption* What do you think? ___ Markdown-Discuss mailing list Markdown-Discuss@six.pairlist.net http://six.pairlist.net/mailman/listinfo/markdown-discuss
Re: Definition list as image caption
On Fri, Jun 22, 2012 at 12:04 PM, Jakob ja...@gmx.at wrote: Von: Waylan Limberg way...@gmail.com Hmm, what HTML are you suggesting that output? Standard Definition List HTML? How would that translate to a caption? In the meantime I rethought my proposal, but for the sake of being backwards compatible with HTML4: I think it should take a figure class (only when it is only images and that definition line), like this: ``` dl class=figure dtimg alt=alt text src=http://example.com/img.jpg;/dt dd class=figcaptionthe caption/dd /dl ``` So you want the parser to special case dt's that contain an image and then attach a bunch of classes to the output. That seems like it might surprise the user a little too much and I don;t recall any other syntax which follows a similar pattern. I don't like it. like this i would be very similar to the HTML5 stuff (and could be easily handled in CSS with `.figure {}` in HTML4 or just `figure {}` in HTML5): ``` figure img alt=alt text src=http://example.com/img.jpg; figcaptionthe caption/figcaption /figure ``` I think this one probably falls in the should be in raw HTML camp. Remember the syntax rules state that markdown is only for a subset of HTML. These special cased HTML5 tags all strike me as raw HTML material. -- \X/ /-\ `/ |_ /-\ |\| Waylan Limberg ___ Markdown-Discuss mailing list Markdown-Discuss@six.pairlist.net http://six.pairlist.net/mailman/listinfo/markdown-discuss
Re: Definition list as image caption
On Fri, Jun 22, 2012 at 12:05 PM, Thomas Humiston t...@jumpingrock.net wrote: It's a good idea, Jakob. Despite the name of this HTML element (which HTML5 moves to rename as description list), it exists for exactly the sort of purpose you suggest -- or, as I like to say, DT is some object, DD is something *about* that object. No matter which implementation of Markdown (or anything else) one uses to wrap content in HTML, the question is, What HTML element is appropriate for the job? The answer isn't always stark, and DL has long been undervalued, misunderstood, and largely forgotten, but it is indeed the best choice in this case. And in situations where the text includes discrete bits, such as a photograph's copyright info and the name of the photographer in addition to the caption, we see that it indeed becomes list-like, so that the appropriateness of using DL becomes even more apparent. Here's an example of styling for a photo and caption info in a DL element. (Note: I made up the copyright info. If Wikipedia even allows hotlinking to their photos, I'd first look up the correct way of doing it before using this on a real site.) div#example { max-width: 20em; } dt { padding: 5px; border: 1px solid gray; margin-bottom: 5px; } dt img { width: 100%; height: auto; } dd { margin-left: 0; /* removes the indent */ color: gray; font-size: small; } dd.maker, dd.copyright { font-style: italic; font-size: x-small; margin-top: 1em; } dd.maker { float: left; margin-right: 2em; } dd.copyright { float: right; } div id=example dl dtimg src=http://upload.wikimedia.org/wikipedia/commons/f/fd/Fuzzy_Freddy.jpg; alt=Foxy Freddy, from Wikipedia ddFox is a common name for many species of omnivorous mammals belonging to the Canidae family. dd class=makerPhoto by Rob Lee dd class=copyrightcopy;2012 Wikimedia / GPL /dl /div Now, this is a proposal I can get behind - sort of. Of course its really a non-proposal because it is already possible with no modification to at least some implementations. The only proposal here is to determine what hooks the CSS should expect. And I've never seen markdown require specific classes as styling hooks. But, hey, if you want to standardize internally within your organization, that is a good starting place. The best part is, any implementation that already supports definition lists, markdown processing inside raw html blocks and attribute lists [1] [2] can generate that output. The input would look like this: div class=example markdown=1 ![Foxy Freddy, from Wikipedia] (http://upload.wikimedia.org/wikipedia/commons/f/fd/Fuzzy_Freddy.jpg) :Fox is a common name for many species of omnivorous mammals belonging to the Canidae family. :Photo by Rob Lee {: .maker } :copy;2012 Wikimedia / GPL {: .copyright } /div The key is that the wrapping div has a hook set (changed it to a class, not an id - otherwise you could only have one image-with-caption per page) identifying it as a image-with-caption. Author a definition list without that div/class hook, and it is a regular definition list. Either way, the markdown parser does the same thing. Only the CSS cares and alters how it is displayed. Again, a non-proposal as far as Markdown is concerned. [1]: http://maruku.rubyforge.org/proposal.html#attribute_lists [2]: http://packages.python.org/Markdown/extensions/attr_list.html -- \X/ /-\ `/ |_ /-\ |\| Waylan Limberg ___ Markdown-Discuss mailing list Markdown-Discuss@six.pairlist.net http://six.pairlist.net/mailman/listinfo/markdown-discuss
Re: Definition list as image caption
On Fri, Jun 22, 2012 at 4:00 AM, Jakob ja...@gmx.at wrote: recently though about image captions, then i realized that this could be achiebed by Markdown Extra's definition list feature: ![alttext](http://exampl.com/img.jpg) : here goes the *caption* What do you think? For reference, here's Russ Weakly in 2004: http://www.maxdesign.com.au/articles/definition/ LQ -- Lou Quillio http://quillio.com/ ___ Markdown-Discuss mailing list Markdown-Discuss@six.pairlist.net http://six.pairlist.net/mailman/listinfo/markdown-discuss