public inbox archive for pandoc-discuss@googlegroups.com
 help / color / mirror / Atom feed
* Adding reST directives to Markdown
@ 2015-11-13  5:24 Sean Tan
       [not found] ` <037f90a1-1b9d-4464-adfe-fdc61826ce91-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
  0 siblings, 1 reply; 26+ messages in thread
From: Sean Tan @ 2015-11-13  5:24 UTC (permalink / raw)
  To: pandoc-discuss


[-- Attachment #1.1: Type: text/plain, Size: 968 bytes --]

Writing Markdown is more natural and easier for me. But I think it is not 
very extensible.

Do you think it is a good idea to include the powerful directives from 
reST? Allowing us to define our custom constructs easily e.g. for embedded 
video. E.g. 

.. media:: http://vimeo.com/72425090

.. vimeo:: 20241459
   :height: 240
   :width: 320

.. image:: file.jpg
   :height: 240
   :width: 320

-- 
You received this message because you are subscribed to the Google Groups "pandoc-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To post to this group, send email to pandoc-discuss-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To view this discussion on the web visit https://groups.google.com/d/msgid/pandoc-discuss/037f90a1-1b9d-4464-adfe-fdc61826ce91%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

[-- Attachment #1.2: Type: text/html, Size: 2708 bytes --]

^ permalink raw reply	[flat|nested] 26+ messages in thread

* Re: Adding reST directives to Markdown
       [not found] ` <037f90a1-1b9d-4464-adfe-fdc61826ce91-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
@ 2015-11-13 12:25   ` Daniel Bergey
       [not found]     ` <87egfucchw.fsf-/RJW9vzmE8ypXNIQCVAXCG0Lkn3mC4nZ0tOlhedn3YvkypF1WZHjJXhe7Zk3YmMvjmZSf7Nhrd8@public.gmane.org>
  0 siblings, 1 reply; 26+ messages in thread
From: Daniel Bergey @ 2015-11-13 12:25 UTC (permalink / raw)
  To: Sean Tan, pandoc-discuss

On 2015-11-13 at 00:24, Sean Tan <cct.sean-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:
> Writing Markdown is more natural and easier for me. But I think it is not 
> very extensible.
>
> Do you think it is a good idea to include the powerful directives from 
> reST? Allowing us to define our custom constructs easily e.g. for embedded 
> video. E.g. 
>
> .. vimeo:: 20241459
>    :height: 240
>    :width: 320

I've been quite happy with Pandoc filters to extend Pandoc, using Attrs
to indicate which filter should process a given Block, and to pass any
arguments it needs.  I think RST directives are the same, except without
as much flexibility in the language used to write the filter.

Can you give an example where RST directives allow something that would
be hard with Pandoc filters?

bergey


^ permalink raw reply	[flat|nested] 26+ messages in thread

* Re: Adding reST directives to Markdown
       [not found]     ` <87egfucchw.fsf-/RJW9vzmE8ypXNIQCVAXCG0Lkn3mC4nZ0tOlhedn3YvkypF1WZHjJXhe7Zk3YmMvjmZSf7Nhrd8@public.gmane.org>
@ 2015-11-14  5:51       ` Sean Tan
       [not found]         ` <e75ccfd9-fba6-41d4-a572-32917ced03da-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
  0 siblings, 1 reply; 26+ messages in thread
From: Sean Tan @ 2015-11-14  5:51 UTC (permalink / raw)
  To: pandoc-discuss; +Cc: cct.sean-Re5JQEeQqe8AvxtiuMwx3w


[-- Attachment #1.1: Type: text/plain, Size: 2026 bytes --]

Thanks for pointing out pandoc filters.

But, it is not clear to me how to implement something like this

![:youtube width=420 height=315](https://www.youtube.com/embed/u1mA-0w8XPo)


to 

<div>
    <iframe width="420" height="315" src=
"https://www.youtube.com/embed/u1mA-0w8XPo" frameborder="0" allowfullscreen
></iframe>
</div>

Can you please advise what should I look at? Do I need to look at writers 
as well?Some code (preferably Python) or high-level explanation will be 
very helpful!

Thanks.

On Friday, November 13, 2015 at 12:25:37 PM UTC, Daniel Bergey wrote:
>
> On 2015-11-13 at 00:24, Sean Tan <cct....-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org <javascript:>> wrote: 
> > Writing Markdown is more natural and easier for me. But I think it is 
> not 
> > very extensible. 
> > 
> > Do you think it is a good idea to include the powerful directives from 
> > reST? Allowing us to define our custom constructs easily e.g. for 
> embedded 
> > video. E.g. 
> > 
> > .. vimeo:: 20241459 
> >    :height: 240 
> >    :width: 320 
>
> I've been quite happy with Pandoc filters to extend Pandoc, using Attrs 
> to indicate which filter should process a given Block, and to pass any 
> arguments it needs.  I think RST directives are the same, except without 
> as much flexibility in the language used to write the filter. 
>
> Can you give an example where RST directives allow something that would 
> be hard with Pandoc filters? 
>
> bergey 
>

-- 
You received this message because you are subscribed to the Google Groups "pandoc-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To post to this group, send email to pandoc-discuss-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To view this discussion on the web visit https://groups.google.com/d/msgid/pandoc-discuss/e75ccfd9-fba6-41d4-a572-32917ced03da%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

[-- Attachment #1.2: Type: text/html, Size: 5635 bytes --]

^ permalink raw reply	[flat|nested] 26+ messages in thread

* Re: Adding reST directives to Markdown
       [not found]         ` <e75ccfd9-fba6-41d4-a572-32917ced03da-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
@ 2015-11-14  6:01           ` Sean Tan
       [not found]             ` <e1c0b452-ed83-4d66-a01e-4bd1cc7bdcf6-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
  0 siblings, 1 reply; 26+ messages in thread
From: Sean Tan @ 2015-11-14  6:01 UTC (permalink / raw)
  To: pandoc-discuss; +Cc: cct.sean-Re5JQEeQqe8AvxtiuMwx3w


[-- Attachment #1.1: Type: text/plain, Size: 2359 bytes --]

Or perhaps I should use an extended syntax like this?

```youtube {url=https://www.youtube.com/embed/u1mA-0w8XPo width=420 
height=315}
```

What do most people here do to include embedded videos using Markdown?

On Saturday, November 14, 2015 at 5:51:50 AM UTC, Sean Tan wrote:
>
> Thanks for pointing out pandoc filters.
>
> But, it is not clear to me how to implement something like this
>
> ![:youtube width=420 height=315](https://www.youtube.com/embed/u1mA-0w8XPo
> )
>
>
> to 
>
> <div>
>     <iframe width="420" height="315" src="
> https://www.youtube.com/embed/u1mA-0w8XPo" frameborder="0" allowfullscreen
> ></iframe>
> </div>
>
> Can you please advise what should I look at? Do I need to look at writers 
> as well?Some code (preferably Python) or high-level explanation will be 
> very helpful!
>
> Thanks.
>
> On Friday, November 13, 2015 at 12:25:37 PM UTC, Daniel Bergey wrote:
>>
>> On 2015-11-13 at 00:24, Sean Tan <cct....-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: 
>> > Writing Markdown is more natural and easier for me. But I think it is 
>> not 
>> > very extensible. 
>> > 
>> > Do you think it is a good idea to include the powerful directives from 
>> > reST? Allowing us to define our custom constructs easily e.g. for 
>> embedded 
>> > video. E.g. 
>> > 
>> > .. vimeo:: 20241459 
>> >    :height: 240 
>> >    :width: 320 
>>
>> I've been quite happy with Pandoc filters to extend Pandoc, using Attrs 
>> to indicate which filter should process a given Block, and to pass any 
>> arguments it needs.  I think RST directives are the same, except without 
>> as much flexibility in the language used to write the filter. 
>>
>> Can you give an example where RST directives allow something that would 
>> be hard with Pandoc filters? 
>>
>> bergey 
>>
>

-- 
You received this message because you are subscribed to the Google Groups "pandoc-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To post to this group, send email to pandoc-discuss-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To view this discussion on the web visit https://groups.google.com/d/msgid/pandoc-discuss/e1c0b452-ed83-4d66-a01e-4bd1cc7bdcf6%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

[-- Attachment #1.2: Type: text/html, Size: 5559 bytes --]

^ permalink raw reply	[flat|nested] 26+ messages in thread

* Re: Adding reST directives to Markdown
       [not found]             ` <e1c0b452-ed83-4d66-a01e-4bd1cc7bdcf6-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
@ 2015-11-14  6:06               ` Sean Tan
       [not found]                 ` <b9b740c3-0a2d-4a1e-8e54-ab1b9c10a1d4-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
  0 siblings, 1 reply; 26+ messages in thread
From: Sean Tan @ 2015-11-14  6:06 UTC (permalink / raw)
  To: pandoc-discuss; +Cc: cct.sean-Re5JQEeQqe8AvxtiuMwx3w


[-- Attachment #1.1: Type: text/plain, Size: 2659 bytes --]

Or perhaps try to stick to the inline URL syntax as close as possible like 
this?

[](https://www.youtube.com/embed/u1mA-0w8XPo type=youtube width=420 
height=315)



On Saturday, November 14, 2015 at 6:01:20 AM UTC, Sean Tan wrote:
>
> Or perhaps I should use an extended syntax like this?
>
> ```youtube {url=https://www.youtube.com/embed/u1mA-0w8XPo width=420 
> height=315}
> ```
>
> What do most people here do to include embedded videos using Markdown?
>
> On Saturday, November 14, 2015 at 5:51:50 AM UTC, Sean Tan wrote:
>>
>> Thanks for pointing out pandoc filters.
>>
>> But, it is not clear to me how to implement something like this
>>
>> ![:youtube width=420 height=315](https://
>> www.youtube.com/embed/u1mA-0w8XPo)
>>
>>
>> to 
>>
>> <div>
>>     <iframe width="420" height="315" src="
>> https://www.youtube.com/embed/u1mA-0w8XPo" frameborder="0" 
>> allowfullscreen></iframe>
>> </div>
>>
>> Can you please advise what should I look at? Do I need to look at writers 
>> as well?Some code (preferably Python) or high-level explanation will be 
>> very helpful!
>>
>> Thanks.
>>
>> On Friday, November 13, 2015 at 12:25:37 PM UTC, Daniel Bergey wrote:
>>>
>>> On 2015-11-13 at 00:24, Sean Tan <cct....-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: 
>>> > Writing Markdown is more natural and easier for me. But I think it is 
>>> not 
>>> > very extensible. 
>>> > 
>>> > Do you think it is a good idea to include the powerful directives from 
>>> > reST? Allowing us to define our custom constructs easily e.g. for 
>>> embedded 
>>> > video. E.g. 
>>> > 
>>> > .. vimeo:: 20241459 
>>> >    :height: 240 
>>> >    :width: 320 
>>>
>>> I've been quite happy with Pandoc filters to extend Pandoc, using Attrs 
>>> to indicate which filter should process a given Block, and to pass any 
>>> arguments it needs.  I think RST directives are the same, except without 
>>> as much flexibility in the language used to write the filter. 
>>>
>>> Can you give an example where RST directives allow something that would 
>>> be hard with Pandoc filters? 
>>>
>>> bergey 
>>>
>>

-- 
You received this message because you are subscribed to the Google Groups "pandoc-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To post to this group, send email to pandoc-discuss-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To view this discussion on the web visit https://groups.google.com/d/msgid/pandoc-discuss/b9b740c3-0a2d-4a1e-8e54-ab1b9c10a1d4%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

[-- Attachment #1.2: Type: text/html, Size: 6579 bytes --]

^ permalink raw reply	[flat|nested] 26+ messages in thread

* Re: Adding reST directives to Markdown
       [not found]                 ` <b9b740c3-0a2d-4a1e-8e54-ab1b9c10a1d4-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
@ 2015-11-15 19:10                   ` mb21
       [not found]                     ` <584749b8-d7e0-473e-8f70-7f475b5cc2f1-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
  0 siblings, 1 reply; 26+ messages in thread
From: mb21 @ 2015-11-15 19:10 UTC (permalink / raw)
  To: pandoc-discuss; +Cc: cct.sean-Re5JQEeQqe8AvxtiuMwx3w


[-- Attachment #1.1: Type: text/plain, Size: 3152 bytes --]

Currently, links and images unfortunately do not have attributes (maybe the 
pull makes it into the next major release). But using a div or code block 
(like you suggested) works.

Feel free to join the discussion about a better syntax at 
http://talk.commonmark.org/t/generic-directives-plugins-syntax/444 and 
whether one is needed.


On Saturday, November 14, 2015 at 7:06:05 AM UTC+1, Sean Tan wrote:
>
> Or perhaps try to stick to the inline URL syntax as close as possible like 
> this?
>
> [](https://www.youtube.com/embed/u1mA-0w8XPo type=youtube width=420 
> height=315)
>
>
>
> On Saturday, November 14, 2015 at 6:01:20 AM UTC, Sean Tan wrote:
>>
>> Or perhaps I should use an extended syntax like this?
>>
>> ```youtube {url=https://www.youtube.com/embed/u1mA-0w8XPo width=420 
>> height=315}
>> ```
>>
>> What do most people here do to include embedded videos using Markdown?
>>
>> On Saturday, November 14, 2015 at 5:51:50 AM UTC, Sean Tan wrote:
>>>
>>> Thanks for pointing out pandoc filters.
>>>
>>> But, it is not clear to me how to implement something like this
>>>
>>> ![:youtube width=420 height=315](https://
>>> www.youtube.com/embed/u1mA-0w8XPo)
>>>
>>>
>>> to 
>>>
>>> <div>
>>>     <iframe width="420" height="315" src="
>>> https://www.youtube.com/embed/u1mA-0w8XPo" frameborder="0" 
>>> allowfullscreen></iframe>
>>> </div>
>>>
>>> Can you please advise what should I look at? Do I need to look at 
>>> writers as well?Some code (preferably Python) or high-level explanation 
>>> will be very helpful!
>>>
>>> Thanks.
>>>
>>> On Friday, November 13, 2015 at 12:25:37 PM UTC, Daniel Bergey wrote:
>>>>
>>>> On 2015-11-13 at 00:24, Sean Tan <cct....-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: 
>>>> > Writing Markdown is more natural and easier for me. But I think it is 
>>>> not 
>>>> > very extensible. 
>>>> > 
>>>> > Do you think it is a good idea to include the powerful directives 
>>>> from 
>>>> > reST? Allowing us to define our custom constructs easily e.g. for 
>>>> embedded 
>>>> > video. E.g. 
>>>> > 
>>>> > .. vimeo:: 20241459 
>>>> >    :height: 240 
>>>> >    :width: 320 
>>>>
>>>> I've been quite happy with Pandoc filters to extend Pandoc, using Attrs 
>>>> to indicate which filter should process a given Block, and to pass any 
>>>> arguments it needs.  I think RST directives are the same, except 
>>>> without 
>>>> as much flexibility in the language used to write the filter. 
>>>>
>>>> Can you give an example where RST directives allow something that would 
>>>> be hard with Pandoc filters? 
>>>>
>>>> bergey 
>>>>
>>>

-- 
You received this message because you are subscribed to the Google Groups "pandoc-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To post to this group, send email to pandoc-discuss-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To view this discussion on the web visit https://groups.google.com/d/msgid/pandoc-discuss/584749b8-d7e0-473e-8f70-7f475b5cc2f1%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

[-- Attachment #1.2: Type: text/html, Size: 7238 bytes --]

^ permalink raw reply	[flat|nested] 26+ messages in thread

* Re: Adding reST directives to Markdown
       [not found]                     ` <584749b8-d7e0-473e-8f70-7f475b5cc2f1-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
@ 2015-11-19  3:25                       ` Sean Tan
       [not found]                         ` <ed0c9315-33b3-4604-af58-ba1dba9d4a13-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
  0 siblings, 1 reply; 26+ messages in thread
From: Sean Tan @ 2015-11-19  3:25 UTC (permalink / raw)
  To: pandoc-discuss; +Cc: cct.sean-Re5JQEeQqe8AvxtiuMwx3w


[-- Attachment #1.1: Type: text/plain, Size: 3658 bytes --]

Thanks all. I think I can work with inline code or code block syntax.

By the way, is there already a syntax for Div and Span elements? I saw 
discussions going back to 2011.

@mb21 I found your pull. What is the best way to apply your modifications? 
I don't mind deviating from the official release. They might take another 
few years :)

On Sunday, November 15, 2015 at 7:10:26 PM UTC, mb21 wrote:
>
> Currently, links and images unfortunately do not have attributes (maybe 
> the pull makes it into the next major release). But using a div or code 
> block (like you suggested) works.
>
> Feel free to join the discussion about a better syntax at 
> http://talk.commonmark.org/t/generic-directives-plugins-syntax/444 and 
> whether one is needed.
>
>
> On Saturday, November 14, 2015 at 7:06:05 AM UTC+1, Sean Tan wrote:
>>
>> Or perhaps try to stick to the inline URL syntax as close as possible 
>> like this?
>>
>> [](https://www.youtube.com/embed/u1mA-0w8XPo type=youtube width=420 
>> height=315)
>>
>>
>>
>> On Saturday, November 14, 2015 at 6:01:20 AM UTC, Sean Tan wrote:
>>>
>>> Or perhaps I should use an extended syntax like this?
>>>
>>> ```youtube {url=https://www.youtube.com/embed/u1mA-0w8XPo width=420 
>>> height=315}
>>> ```
>>>
>>> What do most people here do to include embedded videos using Markdown?
>>>
>>> On Saturday, November 14, 2015 at 5:51:50 AM UTC, Sean Tan wrote:
>>>>
>>>> Thanks for pointing out pandoc filters.
>>>>
>>>> But, it is not clear to me how to implement something like this
>>>>
>>>> ![:youtube width=420 height=315](https://
>>>> www.youtube.com/embed/u1mA-0w8XPo)
>>>>
>>>>
>>>> to 
>>>>
>>>> <div>
>>>>     <iframe width="420" height="315" src="
>>>> https://www.youtube.com/embed/u1mA-0w8XPo" frameborder="0" 
>>>> allowfullscreen></iframe>
>>>> </div>
>>>>
>>>> Can you please advise what should I look at? Do I need to look at 
>>>> writers as well?Some code (preferably Python) or high-level explanation 
>>>> will be very helpful!
>>>>
>>>> Thanks.
>>>>
>>>> On Friday, November 13, 2015 at 12:25:37 PM UTC, Daniel Bergey wrote:
>>>>>
>>>>> On 2015-11-13 at 00:24, Sean Tan <cct....-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: 
>>>>> > Writing Markdown is more natural and easier for me. But I think it 
>>>>> is not 
>>>>> > very extensible. 
>>>>> > 
>>>>> > Do you think it is a good idea to include the powerful directives 
>>>>> from 
>>>>> > reST? Allowing us to define our custom constructs easily e.g. for 
>>>>> embedded 
>>>>> > video. E.g. 
>>>>> > 
>>>>> > .. vimeo:: 20241459 
>>>>> >    :height: 240 
>>>>> >    :width: 320 
>>>>>
>>>>> I've been quite happy with Pandoc filters to extend Pandoc, using 
>>>>> Attrs 
>>>>> to indicate which filter should process a given Block, and to pass any 
>>>>> arguments it needs.  I think RST directives are the same, except 
>>>>> without 
>>>>> as much flexibility in the language used to write the filter. 
>>>>>
>>>>> Can you give an example where RST directives allow something that 
>>>>> would 
>>>>> be hard with Pandoc filters? 
>>>>>
>>>>> bergey 
>>>>>
>>>>

-- 
You received this message because you are subscribed to the Google Groups "pandoc-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To post to this group, send email to pandoc-discuss-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To view this discussion on the web visit https://groups.google.com/d/msgid/pandoc-discuss/ed0c9315-33b3-4604-af58-ba1dba9d4a13%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

[-- Attachment #1.2: Type: text/html, Size: 8695 bytes --]

^ permalink raw reply	[flat|nested] 26+ messages in thread

* Re: Adding reST directives to Markdown
       [not found]                         ` <ed0c9315-33b3-4604-af58-ba1dba9d4a13-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
@ 2015-11-19  4:03                           ` Daniel Staal
  2015-11-19  8:59                           ` mb21
  2015-11-19 15:34                           ` Adding reST directives to Markdown BP Jonsson
  2 siblings, 0 replies; 26+ messages in thread
From: Daniel Staal @ 2015-11-19  4:03 UTC (permalink / raw)
  To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw

--As of November 18, 2015 7:25:17 PM -0800, Sean Tan is alleged to have 
said:

> By the way, is there already a syntax for Div and Span elements? I saw
> discussions going back to 2011.

--As for the rest, it is mine.

I believe the current state is 'we'll just use the HTML syntax until we can 
agree on something better.'  ;)

Daniel T. Staal

---------------------------------------------------------------
This email copyright the author.  Unless otherwise noted, you
are expressly allowed to retransmit, quote, or otherwise use
the contents for non-commercial purposes.  This copyright will
expire 5 years after the author's death, or in 30 years,
whichever is longer, unless such a period is in excess of
local copyright law.
---------------------------------------------------------------


^ permalink raw reply	[flat|nested] 26+ messages in thread

* Re: Adding reST directives to Markdown
       [not found]                         ` <ed0c9315-33b3-4604-af58-ba1dba9d4a13-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
  2015-11-19  4:03                           ` Daniel Staal
@ 2015-11-19  8:59                           ` mb21
       [not found]                             ` <dfa586d3-ccf3-4906-b157-404be5659532-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
  2015-11-19 15:34                           ` Adding reST directives to Markdown BP Jonsson
  2 siblings, 1 reply; 26+ messages in thread
From: mb21 @ 2015-11-19  8:59 UTC (permalink / raw)
  To: pandoc-discuss; +Cc: cct.sean-Re5JQEeQqe8AvxtiuMwx3w


[-- Attachment #1.1: Type: text/plain, Size: 4358 bytes --]



> By the way, is there already a syntax for Div and Span elements? I saw 
> discussions going back to 2011.
>

I think span is pretty much set: [inline markdown]{#id .class 
other=attributes}. About the div syntax see 
https://github.com/jgm/pandoc/issues/168 —my impression is that it's pretty 
much set to do it like fenced code blocks but with a different character 
than the backtick, but there's no agreement yet which character.

 

> @mb21 I found your pull. What is the best way to apply your modifications? 
> I don't mind deviating from the official release. They might take another 
> few years :)
>

clone the new-image-attributes branch from my 
repo: https://github.com/mb21/pandoc/tree/new-image-attributes
although if you need newer features as well, you'll have to merge from 
upstream (jgm/master).
 

>
> On Sunday, November 15, 2015 at 7:10:26 PM UTC, mb21 wrote:
>>
>> Currently, links and images unfortunately do not have attributes (maybe 
>> the pull makes it into the next major release). But using a div or code 
>> block (like you suggested) works.
>>
>> Feel free to join the discussion about a better syntax at 
>> http://talk.commonmark.org/t/generic-directives-plugins-syntax/444 and 
>> whether one is needed.
>>
>>
>> On Saturday, November 14, 2015 at 7:06:05 AM UTC+1, Sean Tan wrote:
>>>
>>> Or perhaps try to stick to the inline URL syntax as close as possible 
>>> like this?
>>>
>>> [](https://www.youtube.com/embed/u1mA-0w8XPo type=youtube width=420 
>>> height=315)
>>>
>>>
>>>
>>> On Saturday, November 14, 2015 at 6:01:20 AM UTC, Sean Tan wrote:
>>>>
>>>> Or perhaps I should use an extended syntax like this?
>>>>
>>>> ```youtube {url=https://www.youtube.com/embed/u1mA-0w8XPo width=420 
>>>> height=315}
>>>> ```
>>>>
>>>> What do most people here do to include embedded videos using Markdown?
>>>>
>>>> On Saturday, November 14, 2015 at 5:51:50 AM UTC, Sean Tan wrote:
>>>>>
>>>>> Thanks for pointing out pandoc filters.
>>>>>
>>>>> But, it is not clear to me how to implement something like this
>>>>>
>>>>> ![:youtube width=420 height=315](https://
>>>>> www.youtube.com/embed/u1mA-0w8XPo)
>>>>>
>>>>>
>>>>> to 
>>>>>
>>>>> <div>
>>>>>     <iframe width="420" height="315" src="
>>>>> https://www.youtube.com/embed/u1mA-0w8XPo" frameborder="0" 
>>>>> allowfullscreen></iframe>
>>>>> </div>
>>>>>
>>>>> Can you please advise what should I look at? Do I need to look at 
>>>>> writers as well?Some code (preferably Python) or high-level explanation 
>>>>> will be very helpful!
>>>>>
>>>>> Thanks.
>>>>>
>>>>> On Friday, November 13, 2015 at 12:25:37 PM UTC, Daniel Bergey wrote:
>>>>>>
>>>>>> On 2015-11-13 at 00:24, Sean Tan <cct....-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: 
>>>>>> > Writing Markdown is more natural and easier for me. But I think it 
>>>>>> is not 
>>>>>> > very extensible. 
>>>>>> > 
>>>>>> > Do you think it is a good idea to include the powerful directives 
>>>>>> from 
>>>>>> > reST? Allowing us to define our custom constructs easily e.g. for 
>>>>>> embedded 
>>>>>> > video. E.g. 
>>>>>> > 
>>>>>> > .. vimeo:: 20241459 
>>>>>> >    :height: 240 
>>>>>> >    :width: 320 
>>>>>>
>>>>>> I've been quite happy with Pandoc filters to extend Pandoc, using 
>>>>>> Attrs 
>>>>>> to indicate which filter should process a given Block, and to pass 
>>>>>> any 
>>>>>> arguments it needs.  I think RST directives are the same, except 
>>>>>> without 
>>>>>> as much flexibility in the language used to write the filter. 
>>>>>>
>>>>>> Can you give an example where RST directives allow something that 
>>>>>> would 
>>>>>> be hard with Pandoc filters? 
>>>>>>
>>>>>> bergey 
>>>>>>
>>>>>

-- 
You received this message because you are subscribed to the Google Groups "pandoc-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To post to this group, send email to pandoc-discuss-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To view this discussion on the web visit https://groups.google.com/d/msgid/pandoc-discuss/dfa586d3-ccf3-4906-b157-404be5659532%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

[-- Attachment #1.2: Type: text/html, Size: 9544 bytes --]

^ permalink raw reply	[flat|nested] 26+ messages in thread

* Re: Adding reST directives to Markdown
       [not found]                         ` <ed0c9315-33b3-4604-af58-ba1dba9d4a13-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
  2015-11-19  4:03                           ` Daniel Staal
  2015-11-19  8:59                           ` mb21
@ 2015-11-19 15:34                           ` BP Jonsson
  2 siblings, 0 replies; 26+ messages in thread
From: BP Jonsson @ 2015-11-19 15:34 UTC (permalink / raw)
  To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw

I just uploaded a function I wrote recently which takes an 
arbitrary string and parses it into pandoc-like attributes.
With it you can easily have a filter overload the title string of 
an image or link to contain attributes.

<https://gist.github.com/bpj/5bd1dbfdee3b570ee574>

Both perl and python versions.
Originally perl, translated into python as best I could.
(Perl man since roughly two decades, dabbling in python 
infrequently during the last three years... I have checked that 
they do the same job with roughly the same 'API' though!)

Den 2015-11-19 kl. 04:25, skrev Sean Tan:
> Thanks all. I think I can work with inline code or code block syntax.
>
> By the way, is there already a syntax for Div and Span elements? I saw
> discussions going back to 2011.
>
> @mb21 I found your pull. What is the best way to apply your modifications?
> I don't mind deviating from the official release. They might take another
> few years :)
>
> On Sunday, November 15, 2015 at 7:10:26 PM UTC, mb21 wrote:
>>
>> Currently, links and images unfortunately do not have attributes (maybe
>> the pull makes it into the next major release). But using a div or code
>> block (like you suggested) works.
>>
>> Feel free to join the discussion about a better syntax at
>> http://talk.commonmark.org/t/generic-directives-plugins-syntax/444 and
>> whether one is needed.
>>
>>
>> On Saturday, November 14, 2015 at 7:06:05 AM UTC+1, Sean Tan wrote:
>>>
>>> Or perhaps try to stick to the inline URL syntax as close as possible
>>> like this?
>>>
>>> [](https://www.youtube.com/embed/u1mA-0w8XPo type=youtube width=420
>>> height=315)
>>>
>>>
>>>
>>> On Saturday, November 14, 2015 at 6:01:20 AM UTC, Sean Tan wrote:
>>>>
>>>> Or perhaps I should use an extended syntax like this?
>>>>
>>>> ```youtube {url=https://www.youtube.com/embed/u1mA-0w8XPo width=420
>>>> height=315}
>>>> ```
>>>>
>>>> What do most people here do to include embedded videos using Markdown?
>>>>
>>>> On Saturday, November 14, 2015 at 5:51:50 AM UTC, Sean Tan wrote:
>>>>>
>>>>> Thanks for pointing out pandoc filters.
>>>>>
>>>>> But, it is not clear to me how to implement something like this
>>>>>
>>>>> ![:youtube width=420 height=315](https://
>>>>> www.youtube.com/embed/u1mA-0w8XPo)
>>>>>
>>>>>
>>>>> to
>>>>>
>>>>> <div>
>>>>>      <iframe width="420" height="315" src="
>>>>> https://www.youtube.com/embed/u1mA-0w8XPo" frameborder="0"
>>>>> allowfullscreen></iframe>
>>>>> </div>
>>>>>
>>>>> Can you please advise what should I look at? Do I need to look at
>>>>> writers as well?Some code (preferably Python) or high-level explanation
>>>>> will be very helpful!
>>>>>
>>>>> Thanks.
>>>>>
>>>>> On Friday, November 13, 2015 at 12:25:37 PM UTC, Daniel Bergey wrote:
>>>>>>
>>>>>> On 2015-11-13 at 00:24, Sean Tan <cct....-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:
>>>>>>> Writing Markdown is more natural and easier for me. But I think it
>>>>>> is not
>>>>>>> very extensible.
>>>>>>>
>>>>>>> Do you think it is a good idea to include the powerful directives
>>>>>> from
>>>>>>> reST? Allowing us to define our custom constructs easily e.g. for
>>>>>> embedded
>>>>>>> video. E.g.
>>>>>>>
>>>>>>> .. vimeo:: 20241459
>>>>>>>     :height: 240
>>>>>>>     :width: 320
>>>>>>
>>>>>> I've been quite happy with Pandoc filters to extend Pandoc, using
>>>>>> Attrs
>>>>>> to indicate which filter should process a given Block, and to pass any
>>>>>> arguments it needs.  I think RST directives are the same, except
>>>>>> without
>>>>>> as much flexibility in the language used to write the filter.
>>>>>>
>>>>>> Can you give an example where RST directives allow something that
>>>>>> would
>>>>>> be hard with Pandoc filters?
>>>>>>
>>>>>> bergey
>>>>>>
>>>>>
>


^ permalink raw reply	[flat|nested] 26+ messages in thread

* Re: Adding reST directives to Markdown
       [not found]                             ` <dfa586d3-ccf3-4906-b157-404be5659532-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
@ 2015-11-19 20:34                               ` John MACFARLANE
       [not found]                                 ` <20151119203422.GA2206-nFAEphtLEs/fysO+viCLMa55KtNWUUjk@public.gmane.org>
  0 siblings, 1 reply; 26+ messages in thread
From: John MACFARLANE @ 2015-11-19 20:34 UTC (permalink / raw)
  To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw

I do plan to merge in new-images-and-attributes soon.
Wanted to get a good version of 1.15.x first.

+++ mb21 [Nov 19 15 00:59 ]:
>   By the way, is there already a syntax for Div and Span elements? I saw
>   discussions going back to 2011.
>
>   I think span is pretty much set: [inline markdown]{#id .class
>   other=attributes}. About the div syntax
>   see [1]https://github.com/jgm/pandoc/issues/168 —my impression is that
>   it's pretty much set to do it like fenced code blocks but with a
>   different character than the backtick, but there's no agreement yet
>   which character.
>
>   @mb21 I found your pull. What is the best way to apply your
>   modifications? I don't mind deviating from the official release. They
>   might take another few years :)
>
>   clone the new-image-attributes branch from my
>   repo: https://github.com/mb21/pandoc/tree/new-image-attributes
>   although if you need newer features as well, you'll have to merge from
>   upstream (jgm/master).
>
>   On Sunday, November 15, 2015 at 7:10:26 PM UTC, mb21 wrote:
>
>   Currently, links and images unfortunately do not have attributes (maybe
>   the pull makes it into the next major release). But using a div or code
>   block (like you suggested) works.
>   Feel free to join the discussion about a better syntax at
>   [2]http://talk.commonmark.org/t/generic-directives-plugins-syntax/444
>   and whether one is needed.
>   On Saturday, November 14, 2015 at 7:06:05 AM UTC+1, Sean Tan wrote:
>
>   Or perhaps try to stick to the inline URL syntax as close as possible
>   like this?
>   [](https://[3]www.youtube.com/embed/u1mA-0w8XPo type=youtube width=420
>   height=315)
>   On Saturday, November 14, 2015 at 6:01:20 AM UTC, Sean Tan wrote:
>
>   Or perhaps I should use an extended syntax like this?
>   ```youtube {url=[4]https://www.youtube.com/embed/u1mA-0w8XPo width=420
>   height=315}
>   ```
>   What do most people here do to include embedded videos using Markdown?
>   On Saturday, November 14, 2015 at 5:51:50 AM UTC, Sean Tan wrote:
>
>   Thanks for pointing out pandoc filters.
>   But, it is not clear to me how to implement something like this
>   ![:youtube width=420 height=315](https://[5]www.
>   youtube.com/embed/u1mA-0w8XPo)
>   to
>   <div>
>       <iframe width="420" height="315" src="[6]https://www.youtube.com/
>   embed/u1mA-0w8XPo" frameborder="0" allowfullscreen></iframe>
>   </div>
>   Can you please advise what should I look at? Do I need to look at
>   writers as well?Some code (preferably Python) or high-level explanation
>   will be very helpful!
>   Thanks.
>   On Friday, November 13, 2015 at 12:25:37 PM UTC, Daniel Bergey wrote:
>
>     On 2015-11-13 at 00:24, Sean Tan <cct....-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:
>     > Writing Markdown is more natural and easier for me. But I think it
>     is not
>     > very extensible.
>     >
>     > Do you think it is a good idea to include the powerful directives
>     from
>     > reST? Allowing us to define our custom constructs easily e.g. for
>     embedded
>     > video. E.g.
>     >
>     > .. vimeo:: 20241459
>     >    :height: 240
>     >    :width: 320
>     I've been quite happy with Pandoc filters to extend Pandoc, using
>     Attrs
>     to indicate which filter should process a given Block, and to pass
>     any
>     arguments it needs.  I think RST directives are the same, except
>     without
>     as much flexibility in the language used to write the filter.
>     Can you give an example where RST directives allow something that
>     would
>     be hard with Pandoc filters?
>     bergey
>
>   --
>   You received this message because you are subscribed to the Google
>   Groups "pandoc-discuss" group.
>   To unsubscribe from this group and stop receiving emails from it, send
>   an email to [7]pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
>   To post to this group, send email to
>   [8]pandoc-discuss-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
>   To view this discussion on the web visit
>   [9]https://groups.google.com/d/msgid/pandoc-discuss/dfa586d3-ccf3-4906-
>   b157-404be5659532%40googlegroups.com.
>   For more options, visit [10]https://groups.google.com/d/optout.
>
>References
>
>   1. https://github.com/jgm/pandoc/issues/168
>   2. http://talk.commonmark.org/t/generic-directives-plugins-syntax/444
>   3. http://www.youtube.com/embed/u1mA-0w8XPo
>   4. https://www.youtube.com/embed/u1mA-0w8XPo
>   5. http://www.youtube.com/embed/u1mA-0w8XPo
>   6. https://www.youtube.com/embed/u1mA-0w8XPo
>   7. mailto:pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
>   8. mailto:pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
>   9. https://groups.google.com/d/msgid/pandoc-discuss/dfa586d3-ccf3-4906-b157-404be5659532-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org?utm_medium=email&utm_source=footer
>  10. https://groups.google.com/d/optout

-- 
You received this message because you are subscribed to the Google Groups "pandoc-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To post to this group, send email to pandoc-discuss-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To view this discussion on the web visit https://groups.google.com/d/msgid/pandoc-discuss/20151119203422.GA2206%40protagoras.berkeley.edu.
For more options, visit https://groups.google.com/d/optout.


^ permalink raw reply	[flat|nested] 26+ messages in thread

* Re: Adding reST directives to Markdown
       [not found]                                 ` <20151119203422.GA2206-nFAEphtLEs/fysO+viCLMa55KtNWUUjk@public.gmane.org>
@ 2015-11-20  7:30                                   ` John MACFARLANE
       [not found]                                     ` <20151120073007.GB19633-nFAEphtLEs/fysO+viCLMa55KtNWUUjk@public.gmane.org>
  0 siblings, 1 reply; 26+ messages in thread
From: John MACFARLANE @ 2015-11-20  7:30 UTC (permalink / raw)
  To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw

I have merged mb21's new-images-and-attributes branch (with
a few small changes).  It requires unreleased versions of
pandoc-types and texmath, but if you use stack, everything
should Just Work:  'git pull' and 'stack install --test'.

I'm sure there are rough edges, but I hope people will try
this!  The commit message identifies a few areas that need
more work.

Great work, mb21!  This is probably the oldest outstanding
enhancement request in pandoc.

+++ John MACFARLANE [Nov 19 15 12:34 ]:
>I do plan to merge in new-images-and-attributes soon.
>Wanted to get a good version of 1.15.x first.
>
>+++ mb21 [Nov 19 15 00:59 ]:
>>  By the way, is there already a syntax for Div and Span elements? I saw
>>  discussions going back to 2011.
>>
>>  I think span is pretty much set: [inline markdown]{#id .class
>>  other=attributes}. About the div syntax
>>  see [1]https://github.com/jgm/pandoc/issues/168 —my impression is that
>>  it's pretty much set to do it like fenced code blocks but with a
>>  different character than the backtick, but there's no agreement yet
>>  which character.
>>
>>  @mb21 I found your pull. What is the best way to apply your
>>  modifications? I don't mind deviating from the official release. They
>>  might take another few years :)
>>
>>  clone the new-image-attributes branch from my
>>  repo: https://github.com/mb21/pandoc/tree/new-image-attributes
>>  although if you need newer features as well, you'll have to merge from
>>  upstream (jgm/master).
>>
>>  On Sunday, November 15, 2015 at 7:10:26 PM UTC, mb21 wrote:
>>
>>  Currently, links and images unfortunately do not have attributes (maybe
>>  the pull makes it into the next major release). But using a div or code
>>  block (like you suggested) works.
>>  Feel free to join the discussion about a better syntax at
>>  [2]http://talk.commonmark.org/t/generic-directives-plugins-syntax/444
>>  and whether one is needed.
>>  On Saturday, November 14, 2015 at 7:06:05 AM UTC+1, Sean Tan wrote:
>>
>>  Or perhaps try to stick to the inline URL syntax as close as possible
>>  like this?
>>  [](https://[3]www.youtube.com/embed/u1mA-0w8XPo type=youtube width=420
>>  height=315)
>>  On Saturday, November 14, 2015 at 6:01:20 AM UTC, Sean Tan wrote:
>>
>>  Or perhaps I should use an extended syntax like this?
>>  ```youtube {url=[4]https://www.youtube.com/embed/u1mA-0w8XPo width=420
>>  height=315}
>>  ```
>>  What do most people here do to include embedded videos using Markdown?
>>  On Saturday, November 14, 2015 at 5:51:50 AM UTC, Sean Tan wrote:
>>
>>  Thanks for pointing out pandoc filters.
>>  But, it is not clear to me how to implement something like this
>>  ![:youtube width=420 height=315](https://[5]www.
>>  youtube.com/embed/u1mA-0w8XPo)
>>  to
>>  <div>
>>      <iframe width="420" height="315" src="[6]https://www.youtube.com/
>>  embed/u1mA-0w8XPo" frameborder="0" allowfullscreen></iframe>
>>  </div>
>>  Can you please advise what should I look at? Do I need to look at
>>  writers as well?Some code (preferably Python) or high-level explanation
>>  will be very helpful!
>>  Thanks.
>>  On Friday, November 13, 2015 at 12:25:37 PM UTC, Daniel Bergey wrote:
>>
>>    On 2015-11-13 at 00:24, Sean Tan <cct....-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:
>>    > Writing Markdown is more natural and easier for me. But I think it
>>    is not
>>    > very extensible.
>>    >
>>    > Do you think it is a good idea to include the powerful directives
>>    from
>>    > reST? Allowing us to define our custom constructs easily e.g. for
>>    embedded
>>    > video. E.g.
>>    >
>>    > .. vimeo:: 20241459
>>    >    :height: 240
>>    >    :width: 320
>>    I've been quite happy with Pandoc filters to extend Pandoc, using
>>    Attrs
>>    to indicate which filter should process a given Block, and to pass
>>    any
>>    arguments it needs.  I think RST directives are the same, except
>>    without
>>    as much flexibility in the language used to write the filter.
>>    Can you give an example where RST directives allow something that
>>    would
>>    be hard with Pandoc filters?
>>    bergey
>>
>>  --
>>  You received this message because you are subscribed to the Google
>>  Groups "pandoc-discuss" group.
>>  To unsubscribe from this group and stop receiving emails from it, send
>>  an email to [7]pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
>>  To post to this group, send email to
>>  [8]pandoc-discuss-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
>>  To view this discussion on the web visit
>>  [9]https://groups.google.com/d/msgid/pandoc-discuss/dfa586d3-ccf3-4906-
>>  b157-404be5659532%40googlegroups.com.
>>  For more options, visit [10]https://groups.google.com/d/optout.
>>
>>References
>>
>>  1. https://github.com/jgm/pandoc/issues/168
>>  2. http://talk.commonmark.org/t/generic-directives-plugins-syntax/444
>>  3. http://www.youtube.com/embed/u1mA-0w8XPo
>>  4. https://www.youtube.com/embed/u1mA-0w8XPo
>>  5. http://www.youtube.com/embed/u1mA-0w8XPo
>>  6. https://www.youtube.com/embed/u1mA-0w8XPo
>>  7. mailto:pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
>>  8. mailto:pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
>>  9. https://groups.google.com/d/msgid/pandoc-discuss/dfa586d3-ccf3-4906-b157-404be5659532-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org?utm_medium=email&utm_source=footer
>> 10. https://groups.google.com/d/optout
>
>-- 
>You received this message because you are subscribed to the Google Groups "pandoc-discuss" group.
>To unsubscribe from this group and stop receiving emails from it, send an email to pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
>To post to this group, send email to pandoc-discuss-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
>To view this discussion on the web visit https://groups.google.com/d/msgid/pandoc-discuss/20151119203422.GA2206%40protagoras.berkeley.edu.
>For more options, visit https://groups.google.com/d/optout.

-- 
You received this message because you are subscribed to the Google Groups "pandoc-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To post to this group, send email to pandoc-discuss-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To view this discussion on the web visit https://groups.google.com/d/msgid/pandoc-discuss/20151120073007.GB19633%40protagoras.berkeley.edu.
For more options, visit https://groups.google.com/d/optout.


^ permalink raw reply	[flat|nested] 26+ messages in thread

* Re: Adding reST directives to Markdown
       [not found]                                     ` <20151120073007.GB19633-nFAEphtLEs/fysO+viCLMa55KtNWUUjk@public.gmane.org>
@ 2015-11-20  8:57                                       ` mb21
       [not found]                                         ` <6ff2e685-3e7e-4150-bcbc-6d20925c9caf-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
  0 siblings, 1 reply; 26+ messages in thread
From: mb21 @ 2015-11-20  8:57 UTC (permalink / raw)
  To: pandoc-discuss


[-- Attachment #1.1: Type: text/plain, Size: 7318 bytes --]

Thanks! Awesome to see this merged after all :)

On Friday, November 20, 2015 at 8:30:21 AM UTC+1, John MacFarlane wrote:
>
> I have merged mb21's new-images-and-attributes branch (with 
> a few small changes).  It requires unreleased versions of 
> pandoc-types and texmath, but if you use stack, everything 
> should Just Work:  'git pull' and 'stack install --test'. 
>
> I'm sure there are rough edges, but I hope people will try 
> this!  The commit message identifies a few areas that need 
> more work. 
>
> Great work, mb21!  This is probably the oldest outstanding 
> enhancement request in pandoc. 
>
> +++ John MACFARLANE [Nov 19 15 12:34 ]: 
> >I do plan to merge in new-images-and-attributes soon. 
> >Wanted to get a good version of 1.15.x first. 
> > 
> >+++ mb21 [Nov 19 15 00:59 ]: 
> >>  By the way, is there already a syntax for Div and Span elements? I saw 
> >>  discussions going back to 2011. 
> >> 
> >>  I think span is pretty much set: [inline markdown]{#id .class 
> >>  other=attributes}. About the div syntax 
> >>  see [1]https://github.com/jgm/pandoc/issues/168 —my impression is 
> that 
> >>  it's pretty much set to do it like fenced code blocks but with a 
> >>  different character than the backtick, but there's no agreement yet 
> >>  which character. 
> >> 
> >>  @mb21 I found your pull. What is the best way to apply your 
> >>  modifications? I don't mind deviating from the official release. They 
> >>  might take another few years :) 
> >> 
> >>  clone the new-image-attributes branch from my 
> >>  repo: https://github.com/mb21/pandoc/tree/new-image-attributes 
> >>  although if you need newer features as well, you'll have to merge from 
> >>  upstream (jgm/master). 
> >> 
> >>  On Sunday, November 15, 2015 at 7:10:26 PM UTC, mb21 wrote: 
> >> 
> >>  Currently, links and images unfortunately do not have attributes 
> (maybe 
> >>  the pull makes it into the next major release). But using a div or 
> code 
> >>  block (like you suggested) works. 
> >>  Feel free to join the discussion about a better syntax at 
> >>  [2]http://talk.commonmark.org/t/generic-directives-plugins-syntax/444 
> >>  and whether one is needed. 
> >>  On Saturday, November 14, 2015 at 7:06:05 AM UTC+1, Sean Tan wrote: 
> >> 
> >>  Or perhaps try to stick to the inline URL syntax as close as possible 
> >>  like this? 
> >>  [](https://[3]www.youtube.com/embed/u1mA-0w8XPo type=youtube 
> width=420 
> >>  height=315) 
> >>  On Saturday, November 14, 2015 at 6:01:20 AM UTC, Sean Tan wrote: 
> >> 
> >>  Or perhaps I should use an extended syntax like this? 
> >>  ```youtube {url=[4]https://www.youtube.com/embed/u1mA-0w8XPo 
> width=420 
> >>  height=315} 
> >>  ``` 
> >>  What do most people here do to include embedded videos using Markdown? 
> >>  On Saturday, November 14, 2015 at 5:51:50 AM UTC, Sean Tan wrote: 
> >> 
> >>  Thanks for pointing out pandoc filters. 
> >>  But, it is not clear to me how to implement something like this 
> >>  ![:youtube width=420 height=315](https://[5]www. 
> >>  youtube.com/embed/u1mA-0w8XPo) 
> >>  to 
> >>  <div> 
> >>      <iframe width="420" height="315" src="[6]https://www.youtube.com/ 
> >>  embed/u1mA-0w8XPo" frameborder="0" allowfullscreen></iframe> 
> >>  </div> 
> >>  Can you please advise what should I look at? Do I need to look at 
> >>  writers as well?Some code (preferably Python) or high-level 
> explanation 
> >>  will be very helpful! 
> >>  Thanks. 
> >>  On Friday, November 13, 2015 at 12:25:37 PM UTC, Daniel Bergey wrote: 
> >> 
> >>    On 2015-11-13 at 00:24, Sean Tan <cct....-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: 
> >>    > Writing Markdown is more natural and easier for me. But I think it 
> >>    is not 
> >>    > very extensible. 
> >>    > 
> >>    > Do you think it is a good idea to include the powerful directives 
> >>    from 
> >>    > reST? Allowing us to define our custom constructs easily e.g. for 
> >>    embedded 
> >>    > video. E.g. 
> >>    > 
> >>    > .. vimeo:: 20241459 
> >>    >    :height: 240 
> >>    >    :width: 320 
> >>    I've been quite happy with Pandoc filters to extend Pandoc, using 
> >>    Attrs 
> >>    to indicate which filter should process a given Block, and to pass 
> >>    any 
> >>    arguments it needs.  I think RST directives are the same, except 
> >>    without 
> >>    as much flexibility in the language used to write the filter. 
> >>    Can you give an example where RST directives allow something that 
> >>    would 
> >>    be hard with Pandoc filters? 
> >>    bergey 
> >> 
> >>  -- 
> >>  You received this message because you are subscribed to the Google 
> >>  Groups "pandoc-discuss" group. 
> >>  To unsubscribe from this group and stop receiving emails from it, send 
> >>  an email to [7]pandoc-discus...-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org <javascript:>. 
> >>  To post to this group, send email to 
> >>  [8]pandoc-...-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org <javascript:>. 
> >>  To view this discussion on the web visit 
> >>  [9]
> https://groups.google.com/d/msgid/pandoc-discuss/dfa586d3-ccf3-4906- 
> >>  b157-404be5659532%40googlegroups.com. 
> >>  For more options, visit [10]https://groups.google.com/d/optout. 
> >> 
> >>References 
> >> 
> >>  1. https://github.com/jgm/pandoc/issues/168 
> >>  2. http://talk.commonmark.org/t/generic-directives-plugins-syntax/444 
> >>  3. http://www.youtube.com/embed/u1mA-0w8XPo 
> >>  4. https://www.youtube.com/embed/u1mA-0w8XPo 
> >>  5. http://www.youtube.com/embed/u1mA-0w8XPo 
> >>  6. https://www.youtube.com/embed/u1mA-0w8XPo 
> >>  7. mailto:pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org <javascript:> 
> >>  8. mailto:pandoc-...-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org <javascript:> 
> >>  9. 
> https://groups.google.com/d/msgid/pandoc-discuss/dfa586d3-ccf3-4906-b157-404be5659532-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org?utm_medium=email&utm_source=footer 
> >> 10. https://groups.google.com/d/optout 
> > 
> >-- 
> >You received this message because you are subscribed to the Google Groups 
> "pandoc-discuss" group. 
> >To unsubscribe from this group and stop receiving emails from it, send an 
> email to pandoc-discus...-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org <javascript:>. 
> >To post to this group, send email to pandoc-...-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org 
> <javascript:>. 
> >To view this discussion on the web visit 
> https://groups.google.com/d/msgid/pandoc-discuss/20151119203422.GA2206%40protagoras.berkeley.edu. 
>
> >For more options, visit https://groups.google.com/d/optout. 
>

-- 
You received this message because you are subscribed to the Google Groups "pandoc-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To post to this group, send email to pandoc-discuss-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To view this discussion on the web visit https://groups.google.com/d/msgid/pandoc-discuss/6ff2e685-3e7e-4150-bcbc-6d20925c9caf%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

[-- Attachment #1.2: Type: text/html, Size: 17183 bytes --]

^ permalink raw reply	[flat|nested] 26+ messages in thread

* Re: Adding reST directives to Markdown
       [not found]                                         ` <6ff2e685-3e7e-4150-bcbc-6d20925c9caf-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
@ 2015-11-20 20:05                                           ` John MACFARLANE
       [not found]                                             ` <20151120200501.GC22968-nFAEphtLEs/fysO+viCLMa55KtNWUUjk@public.gmane.org>
  2015-11-20 20:07                                           ` new image and link attributes [was Re: Adding reST directives to Markdown] John MACFARLANE
  1 sibling, 1 reply; 26+ messages in thread
From: John MACFARLANE @ 2015-11-20 20:05 UTC (permalink / raw)
  To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw

I'm sure you'd given up hope!

There's still plenty to do, I think.  Many of the readers
can be modified to take into account image size information
that can be presented in those formats.  See e.g. #2515 as
just one example.

There is also some work to be done on writers, as you
indicated in your commit messages.

And we could now easily e.g. add a class to autogenerated
links (#2535), if this makes sense.  (I'm still not sure why
autogenerated links should be visually distinguished from
manually created internal links to headers.)

+++ mb21 [Nov 20 15 00:57 ]:
>   Thanks! Awesome to see this merged after all :)
>   On Friday, November 20, 2015 at 8:30:21 AM UTC+1, John MacFarlane
>   wrote:
>
>     I have merged mb21's new-images-and-attributes branch (with
>     a few small changes).  It requires unreleased versions of
>     pandoc-types and texmath, but if you use stack, everything
>     should Just Work:  'git pull' and 'stack install --test'.
>     I'm sure there are rough edges, but I hope people will try
>     this!  The commit message identifies a few areas that need
>     more work.
>     Great work, mb21!  This is probably the oldest outstanding
>     enhancement request in pandoc.
>     +++ John MACFARLANE [Nov 19 15 12:34 ]:
>     >I do plan to merge in new-images-and-attributes soon.
>     >Wanted to get a good version of 1.15.x first.
>     >
>     >+++ mb21 [Nov 19 15 00:59 ]:
>     >>  By the way, is there already a syntax for Div and Span elements?
>     I saw
>     >>  discussions going back to 2011.
>     >>
>     >>  I think span is pretty much set: [inline markdown]{#id .class
>     >>  other=attributes}. About the div syntax
>     >>  see [1][1]https://github.com/jgm/pandoc/issues/168 —my
>     impression is that
>     >>  it's pretty much set to do it like fenced code blocks but with a
>     >>  different character than the backtick, but there's no agreement
>     yet
>     >>  which character.
>     >>
>     >>  @mb21 I found your pull. What is the best way to apply your
>     >>  modifications? I don't mind deviating from the official release.
>     They
>     >>  might take another few years :)
>     >>
>     >>  clone the new-image-attributes branch from my
>     >>  repo: [2]https://github.com/mb21/pandoc/tree/new-image-
>     attributes
>     >>  although if you need newer features as well, you'll have to
>     merge from
>     >>  upstream (jgm/master).
>     >>
>     >>  On Sunday, November 15, 2015 at 7:10:26 PM UTC, mb21 wrote:
>     >>
>     >>  Currently, links and images unfortunately do not have attributes
>     (maybe
>     >>  the pull makes it into the next major release). But using a div
>     or code
>     >>  block (like you suggested) works.
>     >>  Feel free to join the discussion about a better syntax at
>     >>  [2][3]http://talk.commonmark.org/t/generic-directives-
>     plugins-syntax/444
>     >>  and whether one is needed.
>     >>  On Saturday, November 14, 2015 at 7:06:05 AM UTC+1, Sean Tan
>     wrote:
>     >>
>     >>  Or perhaps try to stick to the inline URL syntax as close as
>     possible
>     >>  like this?
>     >>  [](https://[3][4]www.youtube.com/embed/u1mA-0w8XPo type=youtube
>     width=420
>     >>  height=315)
>     >>  On Saturday, November 14, 2015 at 6:01:20 AM UTC, Sean Tan
>     wrote:
>     >>
>     >>  Or perhaps I should use an extended syntax like this?
>     >>  ```youtube {url=[4][5]https://www.youtube.com/embed/u1mA-0w8XPo
>     width=420
>     >>  height=315}
>     >>  ```
>     >>  What do most people here do to include embedded videos using
>     Markdown?
>     >>  On Saturday, November 14, 2015 at 5:51:50 AM UTC, Sean Tan
>     wrote:
>     >>
>     >>  Thanks for pointing out pandoc filters.
>     >>  But, it is not clear to me how to implement something like this
>     >>  ![:youtube width=420 height=315](https://[5]www.
>     >>  [6]youtube.com/embed/u1mA-0w8XPo)
>     >>  to
>     >>  <div>
>     >>      <iframe width="420" height="315"
>     src="[6][7]https://www.youtube.com/
>     >>  embed/u1mA-0w8XPo" frameborder="0" allowfullscreen></iframe>
>     >>  </div>
>     >>  Can you please advise what should I look at? Do I need to look
>     at
>     >>  writers as well?Some code (preferably Python) or high-level
>     explanation
>     >>  will be very helpful!
>     >>  Thanks.
>     >>  On Friday, November 13, 2015 at 12:25:37 PM UTC, Daniel Bergey
>     wrote:
>     >>
>     >>    On 2015-11-13 at 00:24, Sean Tan <cct....-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:
>     >>    > Writing Markdown is more natural and easier for me. But I
>     think it
>     >>    is not
>     >>    > very extensible.
>     >>    >
>     >>    > Do you think it is a good idea to include the powerful
>     directives
>     >>    from
>     >>    > reST? Allowing us to define our custom constructs easily
>     e.g. for
>     >>    embedded
>     >>    > video. E.g.
>     >>    >
>     >>    > .. vimeo:: 20241459
>     >>    >    :height: 240
>     >>    >    :width: 320
>     >>    I've been quite happy with Pandoc filters to extend Pandoc,
>     using
>     >>    Attrs
>     >>    to indicate which filter should process a given Block, and to
>     pass
>     >>    any
>     >>    arguments it needs.  I think RST directives are the same,
>     except
>     >>    without
>     >>    as much flexibility in the language used to write the filter.
>     >>    Can you give an example where RST directives allow something
>     that
>     >>    would
>     >>    be hard with Pandoc filters?
>     >>    bergey
>     >>
>     >>  --
>     >>  You received this message because you are subscribed to the
>     Google
>     >>  Groups "pandoc-discuss" group.
>     >>  To unsubscribe from this group and stop receiving emails from
>     it, send
>     >>  an email to [7][8]pandoc-discus...-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
>     >>  To post to this group, send email to
>     >>  [8][9]pandoc-...-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
>     >>  To view this discussion on the web visit
>     >>  [9][10]https://groups.google.com/d/msgid/pandoc-discuss/
>     dfa586d3-ccf3-4906-
>     >>  b157-404be5659532%[11]40googlegroups.com.
>     >>  For more options, visit [10][12]https://groups.google.com/
>     d/optout.
>     >>
>     >>References
>     >>
>     >>  1. [13]https://github.com/jgm/pandoc/issues/168
>     >>  2. [14]http://talk.commonmark.org/t/generic-directives-plugins-
>     syntax/444
>     >>  3. [15]http://www.youtube.com/embed/u1mA-0w8XPo
>     >>  4. [16]https://www.youtube.com/embed/u1mA-0w8XPo
>     >>  5. [17]http://www.youtube.com/embed/u1mA-0w8XPo
>     >>  6. [18]https://www.youtube.com/embed/u1mA-0w8XPo
>     >>  7. mailto:[19]pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
>     >>  8. mailto:[20]pandoc-...-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
>     >>  9. [21]https://groups.google.com/d/
>     msgid/pandoc-discuss/dfa586d3-ccf3-4906-b157-404be5659532@
>     googlegroups.com?utm_medium=email&utm_source=footer
>     >> 10. [22]https://groups.google.com/d/optout
>     >
>     >--
>     >You received this message because you are subscribed to the Google
>     Groups "pandoc-discuss" group.
>     >To unsubscribe from this group and stop receiving emails from it,
>     send an email to [23]pandoc-discus...-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
>     >To post to this group, send email to [24]pandoc-...@googlegroups.
>     com.
>     >To view this discussion on the web visit
>     [25]https://groups.google.com/d/msgid/pandoc-discuss/
>     20151119203422.GA2206%40protagoras.berkeley.edu.
>     >For more options, visit [26]https://groups.google.com/d/optout.
>
>   --
>   You received this message because you are subscribed to the Google
>   Groups "pandoc-discuss" group.
>   To unsubscribe from this group and stop receiving emails from it, send
>   an email to [27]pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
>   To post to this group, send email to
>   [28]pandoc-discuss-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
>   To view this discussion on the web visit
>   [29]https://groups.google.com/d/msgid/pandoc-discuss/6ff2e685-3e7e-4150
>   -bcbc-6d20925c9caf%40googlegroups.com.
>   For more options, visit [30]https://groups.google.com/d/optout.
>
>References
>
>   1. https://github.com/jgm/pandoc/issues/168
>   2. https://github.com/mb21/pandoc/tree/new-image-attributes
>   3. http://talk.commonmark.org/t/generic-directives-plugins-syntax/444
>   4. http://www.youtube.com/embed/u1mA-0w8XPo
>   5. https://www.youtube.com/embed/u1mA-0w8XPo
>   6. http://youtube.com/embed/u1mA-0w8XPo
>   7. https://www.youtube.com/
>   8. javascript:/
>   9. javascript:/
>  10. https://groups.google.com/d/msgid/pandoc-discuss/dfa586d3-ccf3-4906-
>  11. http://40googlegroups.com/
>  12. https://groups.google.com/d/optout
>  13. https://github.com/jgm/pandoc/issues/168
>  14. http://talk.commonmark.org/t/generic-directives-plugins-syntax/444
>  15. http://www.youtube.com/embed/u1mA-0w8XPo
>  16. https://www.youtube.com/embed/u1mA-0w8XPo
>  17. http://www.youtube.com/embed/u1mA-0w8XPo
>  18. https://www.youtube.com/embed/u1mA-0w8XPo
>  19. javascript:/
>  20. javascript:/
>  21. https://groups.google.com/d/msgid/pandoc-discuss/dfa586d3-ccf3-4906-b157-404be5659532-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org?utm_medium=email&utm_source=footer
>  22. https://groups.google.com/d/optout
>  23. javascript:/
>  24. javascript:/
>  25. https://groups.google.com/d/msgid/pandoc-discuss/20151119203422.GA2206-nFAEphtLEs/fysO+viCLMa55KtNWUUjk@public.gmane.org
>  26. https://groups.google.com/d/optout
>  27. mailto:pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
>  28. mailto:pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
>  29. https://groups.google.com/d/msgid/pandoc-discuss/6ff2e685-3e7e-4150-bcbc-6d20925c9caf-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org?utm_medium=email&utm_source=footer
>  30. https://groups.google.com/d/optout

-- 
You received this message because you are subscribed to the Google Groups "pandoc-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To post to this group, send email to pandoc-discuss-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To view this discussion on the web visit https://groups.google.com/d/msgid/pandoc-discuss/20151120200501.GC22968%40protagoras.berkeley.edu.
For more options, visit https://groups.google.com/d/optout.


^ permalink raw reply	[flat|nested] 26+ messages in thread

* new image and link attributes [was Re: Adding reST directives to Markdown]
       [not found]                                         ` <6ff2e685-3e7e-4150-bcbc-6d20925c9caf-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
  2015-11-20 20:05                                           ` John MACFARLANE
@ 2015-11-20 20:07                                           ` John MACFARLANE
  1 sibling, 0 replies; 26+ messages in thread
From: John MACFARLANE @ 2015-11-20 20:07 UTC (permalink / raw)
  To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw

I should add that the reason I haven't released pandoc-types
1.16 is that, while we're making breaking changes in
pandoc-types, we might want to think about changing other
things too.

Unfortunately, any changes to pandoc-types require quite a
lot of work in every other module.

I would love to change the Strings to Text, for example, but
I'm a bit daunted by how much work this would be.


^ permalink raw reply	[flat|nested] 26+ messages in thread

* Re: Adding reST directives to Markdown
       [not found]                                             ` <20151120200501.GC22968-nFAEphtLEs/fysO+viCLMa55KtNWUUjk@public.gmane.org>
@ 2015-11-21 12:41                                               ` mb21
       [not found]                                                 ` <18314bea-f987-41f4-8d3c-7160dbba4061-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
  2015-11-21 14:54                                               ` Pablo Rodríguez
  1 sibling, 1 reply; 26+ messages in thread
From: mb21 @ 2015-11-21 12:41 UTC (permalink / raw)
  To: pandoc-discuss


[-- Attachment #1.1: Type: text/plain, Size: 12085 bytes --]



> > I'm sure you'd given up hope! 
>
Not quite :)

> There's still plenty to do, I think. 
Yes, I'm quite busy right now but should have some time in December to work 
on these.

What about even more disruptive changes to pandoc-types, like making Attr a 
newtype? Is that postponed indefinitely or are you thinking of this as part 
of Pandoc 1.16 as well?


On Friday, November 20, 2015 at 9:05:16 PM UTC+1, John MacFarlane wrote:
>
> I'm sure you'd given up hope!  


> There's still plenty to do, I think.  Many of the readers 
> can be modified to take into account image size information 
> that can be presented in those formats.  See e.g. #2515 as 
> just one example. 
>
> There is also some work to be done on writers, as you 
> indicated in your commit messages. 
>
> And we could now easily e.g. add a class to autogenerated 
> links (#2535), if this makes sense.  (I'm still not sure why 
> autogenerated links should be visually distinguished from 
> manually created internal links to headers.) 
>
> +++ mb21 [Nov 20 15 00:57 ]: 
> >   Thanks! Awesome to see this merged after all :) 
> >   On Friday, November 20, 2015 at 8:30:21 AM UTC+1, John MacFarlane 
> >   wrote: 
> > 
> >     I have merged mb21's new-images-and-attributes branch (with 
> >     a few small changes).  It requires unreleased versions of 
> >     pandoc-types and texmath, but if you use stack, everything 
> >     should Just Work:  'git pull' and 'stack install --test'. 
> >     I'm sure there are rough edges, but I hope people will try 
> >     this!  The commit message identifies a few areas that need 
> >     more work. 
> >     Great work, mb21!  This is probably the oldest outstanding 
> >     enhancement request in pandoc. 
> >     +++ John MACFARLANE [Nov 19 15 12:34 ]: 
> >     >I do plan to merge in new-images-and-attributes soon. 
> >     >Wanted to get a good version of 1.15.x first. 
> >     > 
> >     >+++ mb21 [Nov 19 15 00:59 ]: 
> >     >>  By the way, is there already a syntax for Div and Span elements? 
> >     I saw 
> >     >>  discussions going back to 2011. 
> >     >> 
> >     >>  I think span is pretty much set: [inline markdown]{#id .class 
> >     >>  other=attributes}. About the div syntax 
> >     >>  see [1][1]https://github.com/jgm/pandoc/issues/168 —my 
> >     impression is that 
> >     >>  it's pretty much set to do it like fenced code blocks but with a 
> >     >>  different character than the backtick, but there's no agreement 
> >     yet 
> >     >>  which character. 
> >     >> 
> >     >>  @mb21 I found your pull. What is the best way to apply your 
> >     >>  modifications? I don't mind deviating from the official release. 
> >     They 
> >     >>  might take another few years :) 
> >     >> 
> >     >>  clone the new-image-attributes branch from my 
> >     >>  repo: [2]https://github.com/mb21/pandoc/tree/new-image- 
> >     attributes 
> >     >>  although if you need newer features as well, you'll have to 
> >     merge from 
> >     >>  upstream (jgm/master). 
> >     >> 
> >     >>  On Sunday, November 15, 2015 at 7:10:26 PM UTC, mb21 wrote: 
> >     >> 
> >     >>  Currently, links and images unfortunately do not have attributes 
> >     (maybe 
> >     >>  the pull makes it into the next major release). But using a div 
> >     or code 
> >     >>  block (like you suggested) works. 
> >     >>  Feel free to join the discussion about a better syntax at 
> >     >>  [2][3]http://talk.commonmark.org/t/generic-directives- 
> >     plugins-syntax/444 
> >     >>  and whether one is needed. 
> >     >>  On Saturday, November 14, 2015 at 7:06:05 AM UTC+1, Sean Tan 
> >     wrote: 
> >     >> 
> >     >>  Or perhaps try to stick to the inline URL syntax as close as 
> >     possible 
> >     >>  like this? 
> >     >>  [](https://[3][4]www.youtube.com/embed/u1mA-0w8XPo type=youtube 
> >     width=420 
> >     >>  height=315) 
> >     >>  On Saturday, November 14, 2015 at 6:01:20 AM UTC, Sean Tan 
> >     wrote: 
> >     >> 
> >     >>  Or perhaps I should use an extended syntax like this? 
> >     >>  ```youtube {url=[4][5]https://www.youtube.com/embed/u1mA-0w8XPo 
> >     width=420 
> >     >>  height=315} 
> >     >>  ``` 
> >     >>  What do most people here do to include embedded videos using 
> >     Markdown? 
> >     >>  On Saturday, November 14, 2015 at 5:51:50 AM UTC, Sean Tan 
> >     wrote: 
> >     >> 
> >     >>  Thanks for pointing out pandoc filters. 
> >     >>  But, it is not clear to me how to implement something like this 
> >     >>  ![:youtube width=420 height=315](https://[5]www. 
> >     >>  [6]youtube.com/embed/u1mA-0w8XPo) 
> >     >>  to 
> >     >>  <div> 
> >     >>      <iframe width="420" height="315" 
> >     src="[6][7]https://www.youtube.com/ 
> >     >>  embed/u1mA-0w8XPo" frameborder="0" allowfullscreen></iframe> 
> >     >>  </div> 
> >     >>  Can you please advise what should I look at? Do I need to look 
> >     at 
> >     >>  writers as well?Some code (preferably Python) or high-level 
> >     explanation 
> >     >>  will be very helpful! 
> >     >>  Thanks. 
> >     >>  On Friday, November 13, 2015 at 12:25:37 PM UTC, Daniel Bergey 
> >     wrote: 
> >     >> 
> >     >>    On 2015-11-13 at 00:24, Sean Tan <cct....-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: 
> >     >>    > Writing Markdown is more natural and easier for me. But I 
> >     think it 
> >     >>    is not 
> >     >>    > very extensible. 
> >     >>    > 
> >     >>    > Do you think it is a good idea to include the powerful 
> >     directives 
> >     >>    from 
> >     >>    > reST? Allowing us to define our custom constructs easily 
> >     e.g. for 
> >     >>    embedded 
> >     >>    > video. E.g. 
> >     >>    > 
> >     >>    > .. vimeo:: 20241459 
> >     >>    >    :height: 240 
> >     >>    >    :width: 320 
> >     >>    I've been quite happy with Pandoc filters to extend Pandoc, 
> >     using 
> >     >>    Attrs 
> >     >>    to indicate which filter should process a given Block, and to 
> >     pass 
> >     >>    any 
> >     >>    arguments it needs.  I think RST directives are the same, 
> >     except 
> >     >>    without 
> >     >>    as much flexibility in the language used to write the filter. 
> >     >>    Can you give an example where RST directives allow something 
> >     that 
> >     >>    would 
> >     >>    be hard with Pandoc filters? 
> >     >>    bergey 
> >     >> 
> >     >>  -- 
> >     >>  You received this message because you are subscribed to the 
> >     Google 
> >     >>  Groups "pandoc-discuss" group. 
> >     >>  To unsubscribe from this group and stop receiving emails from 
> >     it, send 
> >     >>  an email to [7][8]pandoc-discus...-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org 
> >     >>  To post to this group, send email to 
> >     >>  [8][9]pandoc-...-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org 
> >     >>  To view this discussion on the web visit 
> >     >>  [9][10]https://groups.google.com/d/msgid/pandoc-discuss/ 
> >     dfa586d3-ccf3-4906- 
> >     >>  b157-404be5659532%[11]40googlegroups.com. 
> >     >>  For more options, visit [10][12]https://groups.google.com/ 
> >     d/optout. 
> >     >> 
> >     >>References 
> >     >> 
> >     >>  1. [13]https://github.com/jgm/pandoc/issues/168 
> >     >>  2. [14]http://talk.commonmark.org/t/generic-directives-plugins- 
> >     syntax/444 
> >     >>  3. [15]http://www.youtube.com/embed/u1mA-0w8XPo 
> >     >>  4. [16]https://www.youtube.com/embed/u1mA-0w8XPo 
> >     >>  5. [17]http://www.youtube.com/embed/u1mA-0w8XPo 
> >     >>  6. [18]https://www.youtube.com/embed/u1mA-0w8XPo 
> >     >>  7. mailto:[19]pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org 
> <javascript:> 
> >     >>  8. mailto:[20]pandoc-...-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org 
> >     >>  9. [21]https://groups.google.com/d/ 
> >     msgid/pandoc-discuss/dfa586d3-ccf3-4906-b157-404be5659532@ 
> >     googlegroups.com?utm_medium=email&utm_source=footer 
> >     >> 10. [22]https://groups.google.com/d/optout 
> >     > 
> >     >-- 
> >     >You received this message because you are subscribed to the Google 
> >     Groups "pandoc-discuss" group. 
> >     >To unsubscribe from this group and stop receiving emails from it, 
> >     send an email to [23]pandoc-discus...-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org 
> >     >To post to this group, send email to [24]pandoc-...@googlegroups. 
> >     com. 
> >     >To view this discussion on the web visit 
> >     [25]https://groups.google.com/d/msgid/pandoc-discuss/ 
> >     20151119203422.GA2206%40protagoras.berkeley.edu. 
> >     >For more options, visit [26]https://groups.google.com/d/optout. 
> > 
> >   -- 
> >   You received this message because you are subscribed to the Google 
> >   Groups "pandoc-discuss" group. 
> >   To unsubscribe from this group and stop receiving emails from it, send 
> >   an email to [27]pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org 
> <javascript:>. 
> >   To post to this group, send email to 
> >   [28]pandoc-...-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org <javascript:>. 
> >   To view this discussion on the web visit 
> >   [29]
> https://groups.google.com/d/msgid/pandoc-discuss/6ff2e685-3e7e-4150 
> >   -bcbc-6d20925c9caf%40googlegroups.com. 
> >   For more options, visit [30]https://groups.google.com/d/optout. 
> > 
> >References 
> > 
> >   1. https://github.com/jgm/pandoc/issues/168 
> >   2. https://github.com/mb21/pandoc/tree/new-image-attributes 
> >   3. http://talk.commonmark.org/t/generic-directives-plugins-syntax/444 
> >   4. http://www.youtube.com/embed/u1mA-0w8XPo 
> >   5. https://www.youtube.com/embed/u1mA-0w8XPo 
> >   6. http://youtube.com/embed/u1mA-0w8XPo 
> >   7. https://www.youtube.com/ 
> >   8. javascript:/ 
> >   9. javascript:/ 
> >  10. 
> https://groups.google.com/d/msgid/pandoc-discuss/dfa586d3-ccf3-4906- 
> >  11. http://40googlegroups.com/ 
> >  12. https://groups.google.com/d/optout 
> >  13. https://github.com/jgm/pandoc/issues/168 
> >  14. http://talk.commonmark.org/t/generic-directives-plugins-syntax/444 
> >  15. http://www.youtube.com/embed/u1mA-0w8XPo 
> >  16. https://www.youtube.com/embed/u1mA-0w8XPo 
> >  17. http://www.youtube.com/embed/u1mA-0w8XPo 
> >  18. https://www.youtube.com/embed/u1mA-0w8XPo 
> >  19. javascript:/ 
> >  20. javascript:/ 
> >  21. 
> https://groups.google.com/d/msgid/pandoc-discuss/dfa586d3-ccf3-4906-b157-404be5659532-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org?utm_medium=email&utm_source=footer 
> >  22. https://groups.google.com/d/optout 
> >  23. javascript:/ 
> >  24. javascript:/ 
> >  25. 
> https://groups.google.com/d/msgid/pandoc-discuss/20151119203422.GA2206@protagoras.berkeley.edu 
> >  26. https://groups.google.com/d/optout 
> >  27. mailto:pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org <javascript:> 
> >  28. mailto:pandoc-...-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org <javascript:> 
> >  29. 
> https://groups.google.com/d/msgid/pandoc-discuss/6ff2e685-3e7e-4150-bcbc-6d20925c9caf-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org?utm_medium=email&utm_source=footer 
> >  30. https://groups.google.com/d/optout 
>
>

-- 
You received this message because you are subscribed to the Google Groups "pandoc-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To post to this group, send email to pandoc-discuss-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To view this discussion on the web visit https://groups.google.com/d/msgid/pandoc-discuss/18314bea-f987-41f4-8d3c-7160dbba4061%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

[-- Attachment #1.2: Type: text/html, Size: 32554 bytes --]

^ permalink raw reply	[flat|nested] 26+ messages in thread

* Re: Adding reST directives to Markdown
       [not found]                                             ` <20151120200501.GC22968-nFAEphtLEs/fysO+viCLMa55KtNWUUjk@public.gmane.org>
  2015-11-21 12:41                                               ` mb21
@ 2015-11-21 14:54                                               ` Pablo Rodríguez
  1 sibling, 0 replies; 26+ messages in thread
From: Pablo Rodríguez @ 2015-11-21 14:54 UTC (permalink / raw)
  To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw

On 11/20/2015 09:05 PM, John MACFARLANE wrote:
> I'm sure you'd given up hope!
> 
> There's still plenty to do, I think.  Many of the readers
> can be modified to take into account image size information
> that can be presented in those formats.  See e.g. #2515 as
> just one example.
> 
> There is also some work to be done on writers, as you
> indicated in your commit messages.
> 
> And we could now easily e.g. add a class to autogenerated
> links (#2535), if this makes sense.  (I'm still not sure why
> autogenerated links should be visually distinguished from
> manually created internal links to headers.)

Because they contain titles from part of the document.

I think these references should be distinguished:

    As discussed in _Explaining `pandoc` to newcomers`...

    As discussed in the previous chapter...

The first reference is a title and it would be great to be able to
visually distinguish it. The second reference is plain discourse, no
title involved, so no formatting required.

BTW, does it mean that all elements will granted attributes eventually?

Many thanks for your help,


Pablo
-- 
http://www.ousia.tk


^ permalink raw reply	[flat|nested] 26+ messages in thread

* Re: Adding reST directives to Markdown
       [not found]                                                 ` <18314bea-f987-41f4-8d3c-7160dbba4061-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
@ 2015-11-21 17:05                                                   ` John MacFarlane
       [not found]                                                     ` <20151121170503.GC82398-jF64zX8BO091tJRe0FUodcM6rOWSkUom@public.gmane.org>
  0 siblings, 1 reply; 26+ messages in thread
From: John MacFarlane @ 2015-11-21 17:05 UTC (permalink / raw)
  To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw

+++ mb21 [Nov 21 15 04:41 ]:
>     > I'm sure you'd given up hope!
>
>   Not quite :)
>   > There's still plenty to do, I think.
>   Yes, I'm quite busy right now but should have some time in December to
>   work on these.
>   What about even more disruptive changes to pandoc-types, like making
>   Attr a newtype? Is that postponed indefinitely or are you thinking of
>   this as part of Pandoc 1.16 as well?

I'd contemplated that.  Like the change you made, it would
require quite a lot of work, touching every module.  It
would also break a lot of existing filters.  But, unlike
the change you made, the benefit isn't so obvious.
So I'm wondering whether, in the end, it is worth it.

The same could be said for the idea of making Format a proper
algebraic data type.

One change I'm contemplating is the addition of a PageBreak
to Block: https://github.com/jgm/pandoc/issues/1934


^ permalink raw reply	[flat|nested] 26+ messages in thread

* Re: Adding reST directives to Markdown
       [not found]                                                     ` <20151121170503.GC82398-jF64zX8BO091tJRe0FUodcM6rOWSkUom@public.gmane.org>
@ 2015-11-22 16:58                                                       ` mb21
       [not found]                                                         ` <b3e86306-897d-40f3-8079-84132e405432-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
  0 siblings, 1 reply; 26+ messages in thread
From: mb21 @ 2015-11-22 16:58 UTC (permalink / raw)
  To: pandoc-discuss


[-- Attachment #1.1: Type: text/plain, Size: 1921 bytes --]

Yeah, makes sense. I think adding a PageBreak element is a good idea as 
well...

This leaves the question of adding Attr also to Table (to reference tables: 
#813) and maybe to BlockQuote (to reference quotes and have classes like 
pull-quote <https://en.wikipedia.org/wiki/Pull_quote> etc that filters can 
work with).

On Saturday, November 21, 2015 at 6:05:07 PM UTC+1, John MacFarlane wrote:
>
> +++ mb21 [Nov 21 15 04:41 ]: 
> >     > I'm sure you'd given up hope! 
> > 
> >   Not quite :) 
> >   > There's still plenty to do, I think. 
> >   Yes, I'm quite busy right now but should have some time in December to 
> >   work on these. 
> >   What about even more disruptive changes to pandoc-types, like making 
> >   Attr a newtype? Is that postponed indefinitely or are you thinking of 
> >   this as part of Pandoc 1.16 as well? 
>
> I'd contemplated that.  Like the change you made, it would 
> require quite a lot of work, touching every module.  It 
> would also break a lot of existing filters.  But, unlike 
> the change you made, the benefit isn't so obvious. 
> So I'm wondering whether, in the end, it is worth it. 
>
> The same could be said for the idea of making Format a proper 
> algebraic data type. 
>
> One change I'm contemplating is the addition of a PageBreak 
> to Block: https://github.com/jgm/pandoc/issues/1934 
>
>

-- 
You received this message because you are subscribed to the Google Groups "pandoc-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To post to this group, send email to pandoc-discuss-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To view this discussion on the web visit https://groups.google.com/d/msgid/pandoc-discuss/b3e86306-897d-40f3-8079-84132e405432%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

[-- Attachment #1.2: Type: text/html, Size: 3111 bytes --]

^ permalink raw reply	[flat|nested] 26+ messages in thread

* Re: Adding reST directives to Markdown
       [not found]                                                         ` <b3e86306-897d-40f3-8079-84132e405432-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
@ 2015-11-22 17:21                                                           ` John MacFarlane
  2015-11-22 17:24                                                           ` John MacFarlane
  1 sibling, 0 replies; 26+ messages in thread
From: John MacFarlane @ 2015-11-22 17:21 UTC (permalink / raw)
  To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw

I think adding Attr to Table is a good idea.  Much less
convinced about BlockQuote.  After all, we can put these
in Divs when needed.

+++ mb21 [Nov 22 15 08:58 ]:
>   Yeah, makes sense. I think adding a PageBreak element is a good idea as
>   well...
>   This leaves the question of adding Attr also to Table (to reference
>   tables: #813) and maybe to BlockQuote (to reference quotes and have
>   classes like [1]pull-quote etc that filters can work with).
>   On Saturday, November 21, 2015 at 6:05:07 PM UTC+1, John MacFarlane
>   wrote:
>
>     +++ mb21 [Nov 21 15 04:41 ]:
>     >     > I'm sure you'd given up hope!
>     >
>     >   Not quite :)
>     >   > There's still plenty to do, I think.
>     >   Yes, I'm quite busy right now but should have some time in
>     December to
>     >   work on these.
>     >   What about even more disruptive changes to pandoc-types, like
>     making
>     >   Attr a newtype? Is that postponed indefinitely or are you
>     thinking of
>     >   this as part of Pandoc 1.16 as well?
>     I'd contemplated that.  Like the change you made, it would
>     require quite a lot of work, touching every module.  It
>     would also break a lot of existing filters.  But, unlike
>     the change you made, the benefit isn't so obvious.
>     So I'm wondering whether, in the end, it is worth it.
>     The same could be said for the idea of making Format a proper
>     algebraic data type.
>     One change I'm contemplating is the addition of a PageBreak
>     to Block: [2]https://github.com/jgm/pandoc/issues/1934
>
>   --
>   You received this message because you are subscribed to the Google
>   Groups "pandoc-discuss" group.
>   To unsubscribe from this group and stop receiving emails from it, send
>   an email to [3]pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
>   To post to this group, send email to
>   [4]pandoc-discuss-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
>   To view this discussion on the web visit
>   [5]https://groups.google.com/d/msgid/pandoc-discuss/b3e86306-897d-40f3-
>   8079-84132e405432%40googlegroups.com.
>   For more options, visit [6]https://groups.google.com/d/optout.
>
>References
>
>   1. https://en.wikipedia.org/wiki/Pull_quote
>   2. https://github.com/jgm/pandoc/issues/1934
>   3. mailto:pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
>   4. mailto:pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
>   5. https://groups.google.com/d/msgid/pandoc-discuss/b3e86306-897d-40f3-8079-84132e405432-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org?utm_medium=email&utm_source=footer
>   6. https://groups.google.com/d/optout


^ permalink raw reply	[flat|nested] 26+ messages in thread

* Re: Adding reST directives to Markdown
       [not found]                                                         ` <b3e86306-897d-40f3-8079-84132e405432-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
  2015-11-22 17:21                                                           ` John MacFarlane
@ 2015-11-22 17:24                                                           ` John MacFarlane
       [not found]                                                             ` <20151122172423.GA79184-jF64zX8BO091tJRe0FUodcM6rOWSkUom@public.gmane.org>
  1 sibling, 1 reply; 26+ messages in thread
From: John MacFarlane @ 2015-11-22 17:24 UTC (permalink / raw)
  To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw

Also, let me qualify my reservations about making Attr a
newtype.  A simple newtype wrapper around (String, [String],
([String, String])) would require only fairly mechanical
changes to code.  Maybe this isn't so bad.  And it would
make it much easier to write filters that modify Attr.



^ permalink raw reply	[flat|nested] 26+ messages in thread

* Re: Adding reST directives to Markdown
       [not found]                                                             ` <20151122172423.GA79184-jF64zX8BO091tJRe0FUodcM6rOWSkUom@public.gmane.org>
@ 2015-11-22 19:56                                                               ` mb21
       [not found]                                                                 ` <d649d340-be4e-41e9-a51f-19890d139870-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
  0 siblings, 1 reply; 26+ messages in thread
From: mb21 @ 2015-11-22 19:56 UTC (permalink / raw)
  To: pandoc-discuss


[-- Attachment #1.1: Type: text/plain, Size: 1593 bytes --]

It would have to be `newtype Attr = Attr String [String] ([String, 
String])` to make some sense, which is still a fairly mechanical change.

> Much less convinced about BlockQuote. After all, we can put these in Divs 
when needed. 
Well, ultimately (almost) everything is solvable with wrapping in divs ;)
But maybe instead of changing Table and BlockQuote, we could introduce a 
float/figure element:

    Figure Attr [Inline] [Block] -- ^ with caption and containing elements

That way you could certainly reference figures (and the table or 
blockquotes etc. contained). Not sure if it would make Attr on Table 
superfluous though.


On Sunday, November 22, 2015 at 6:24:40 PM UTC+1, John MacFarlane wrote:
>
> Also, let me qualify my reservations about making Attr a 
> newtype.  A simple newtype wrapper around (String, [String], 
> ([String, String])) would require only fairly mechanical 
> changes to code.  Maybe this isn't so bad.  And it would 
> make it much easier to write filters that modify Attr. 
>
>
>

-- 
You received this message because you are subscribed to the Google Groups "pandoc-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To post to this group, send email to pandoc-discuss-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To view this discussion on the web visit https://groups.google.com/d/msgid/pandoc-discuss/d649d340-be4e-41e9-a51f-19890d139870%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

[-- Attachment #1.2: Type: text/html, Size: 2252 bytes --]

^ permalink raw reply	[flat|nested] 26+ messages in thread

* Re: Adding reST directives to Markdown
       [not found]                                                                 ` <d649d340-be4e-41e9-a51f-19890d139870-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
@ 2015-11-23 10:13                                                                   ` Sean Tan
       [not found]                                                                     ` <d164a492-d86c-4955-8563-f840ebfa51be-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
  0 siblings, 1 reply; 26+ messages in thread
From: Sean Tan @ 2015-11-23 10:13 UTC (permalink / raw)
  To: pandoc-discuss


[-- Attachment #1.1: Type: text/plain, Size: 2233 bytes --]

@mb21

I just tested the new image attributes

Input

![Alt text](file.jpg){width=50% height=200}

Output 

<img src="file.jpg" alt="Alt text" style="width:50.0%" height="200" />

The percentage is not formatted properly (i.e. should not have decimal 
places), causing it to be omitted by the browser. How can I make sure the 
value of width and height in markdown are treated as strings, to prevent 
wrong conversions?  I want to be able to specify the dimensions using 
pixel, em or percentage. Right now it is just dropping the units.


On Sunday, November 22, 2015 at 7:56:39 PM UTC, mb21 wrote:
>
> It would have to be `newtype Attr = Attr String [String] ([String, 
> String])` to make some sense, which is still a fairly mechanical change.
>
> > Much less convinced about BlockQuote. After all, we can put these in 
> Divs when needed. 
> Well, ultimately (almost) everything is solvable with wrapping in divs ;)
> But maybe instead of changing Table and BlockQuote, we could introduce a 
> float/figure element:
>
>     Figure Attr [Inline] [Block] -- ^ with caption and containing elements
>
> That way you could certainly reference figures (and the table or 
> blockquotes etc. contained). Not sure if it would make Attr on Table 
> superfluous though.
>
>
> On Sunday, November 22, 2015 at 6:24:40 PM UTC+1, John MacFarlane wrote:
>>
>> Also, let me qualify my reservations about making Attr a 
>> newtype.  A simple newtype wrapper around (String, [String], 
>> ([String, String])) would require only fairly mechanical 
>> changes to code.  Maybe this isn't so bad.  And it would 
>> make it much easier to write filters that modify Attr. 
>>
>>
>>

-- 
You received this message because you are subscribed to the Google Groups "pandoc-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To post to this group, send email to pandoc-discuss-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To view this discussion on the web visit https://groups.google.com/d/msgid/pandoc-discuss/d164a492-d86c-4955-8563-f840ebfa51be%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

[-- Attachment #1.2: Type: text/html, Size: 3211 bytes --]

^ permalink raw reply	[flat|nested] 26+ messages in thread

* Re: Adding reST directives to Markdown
       [not found]                                                                     ` <d164a492-d86c-4955-8563-f840ebfa51be-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
@ 2015-11-23 10:16                                                                       ` Sean Tan
       [not found]                                                                         ` <3529e184-6d75-433e-bc5d-3bf29ced2bf2-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
  0 siblings, 1 reply; 26+ messages in thread
From: Sean Tan @ 2015-11-23 10:16 UTC (permalink / raw)
  To: pandoc-discuss


[-- Attachment #1.1: Type: text/plain, Size: 2445 bytes --]

If i use percentage for the width, it seems to be included in the style 
attribute. 

On Monday, November 23, 2015 at 10:13:39 AM UTC, Sean Tan wrote:
>
> @mb21
>
> I just tested the new image attributes
>
> Input
>
> ![Alt text](file.jpg){width=50% height=200}
>
> Output 
>
> <img src="file.jpg" alt="Alt text" style="width:50.0%" height="200" />
>
> The percentage is not formatted properly (i.e. should not have decimal 
> places), causing it to be omitted by the browser. How can I make sure the 
> value of width and height in markdown are treated as strings, to prevent 
> wrong conversions?  I want to be able to specify the dimensions using 
> pixel, em or percentage. Right now it is just dropping the units.
>
>
> On Sunday, November 22, 2015 at 7:56:39 PM UTC, mb21 wrote:
>>
>> It would have to be `newtype Attr = Attr String [String] ([String, 
>> String])` to make some sense, which is still a fairly mechanical change.
>>
>> > Much less convinced about BlockQuote. After all, we can put these in 
>> Divs when needed. 
>> Well, ultimately (almost) everything is solvable with wrapping in divs ;)
>> But maybe instead of changing Table and BlockQuote, we could introduce a 
>> float/figure element:
>>
>>     Figure Attr [Inline] [Block] -- ^ with caption and containing elements
>>
>> That way you could certainly reference figures (and the table or 
>> blockquotes etc. contained). Not sure if it would make Attr on Table 
>> superfluous though.
>>
>>
>> On Sunday, November 22, 2015 at 6:24:40 PM UTC+1, John MacFarlane wrote:
>>>
>>> Also, let me qualify my reservations about making Attr a 
>>> newtype.  A simple newtype wrapper around (String, [String], 
>>> ([String, String])) would require only fairly mechanical 
>>> changes to code.  Maybe this isn't so bad.  And it would 
>>> make it much easier to write filters that modify Attr. 
>>>
>>>
>>>

-- 
You received this message because you are subscribed to the Google Groups "pandoc-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To post to this group, send email to pandoc-discuss-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To view this discussion on the web visit https://groups.google.com/d/msgid/pandoc-discuss/3529e184-6d75-433e-bc5d-3bf29ced2bf2%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

[-- Attachment #1.2: Type: text/html, Size: 3512 bytes --]

^ permalink raw reply	[flat|nested] 26+ messages in thread

* Re: Adding reST directives to Markdown
       [not found]                                                                         ` <3529e184-6d75-433e-bc5d-3bf29ced2bf2-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
@ 2015-11-23 19:50                                                                           ` mb21
       [not found]                                                                             ` <c5d210af-77df-4d3e-8278-1b8267d356b5-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
  0 siblings, 1 reply; 26+ messages in thread
From: mb21 @ 2015-11-23 19:50 UTC (permalink / raw)
  To: pandoc-discuss


[-- Attachment #1.1: Type: text/plain, Size: 1260 bytes --]


>
> The percentage is not formatted properly (i.e. should not have decimal 
>> places)
>>
> @Sean Actually, percentages with decimals are valid CSS, they are even 
respected by 
browsers: http://stackoverflow.com/questions/4308989/are-the-decimal-places-in-a-css-width-respected
 

> How can I make sure the value of width and height in markdown are treated 
>> as strings, to prevent wrong conversions?  I want to be able to specify the 
>> dimensions using pixel, em or percentage. Right now it is just dropping the 
>> units.
>>
>
What's wrong with: ![Alt text](file.jpg){width=50}
<img src="file.jpg" alt="Alt text" width="50" />

For more info, see the README in the master branch.

-- 
You received this message because you are subscribed to the Google Groups "pandoc-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To post to this group, send email to pandoc-discuss-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To view this discussion on the web visit https://groups.google.com/d/msgid/pandoc-discuss/c5d210af-77df-4d3e-8278-1b8267d356b5%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

[-- Attachment #1.2: Type: text/html, Size: 2378 bytes --]

^ permalink raw reply	[flat|nested] 26+ messages in thread

* Re: Adding reST directives to Markdown
       [not found]                                                                             ` <c5d210af-77df-4d3e-8278-1b8267d356b5-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
@ 2015-11-23 19:52                                                                               ` mb21
  0 siblings, 0 replies; 26+ messages in thread
From: mb21 @ 2015-11-23 19:52 UTC (permalink / raw)
  To: pandoc-discuss


[-- Attachment #1.1: Type: text/plain, Size: 1677 bytes --]



Extension: `link_attributes`

...

The `width` and `height` attributes on images are treated specially. When
used without a unit, the unit is assumed to be pixels. However, any of
the following unit identifiers can be used: `px`, `cm`, `mm`, `in`, `inch`
and `%`. There must not be any spaces between the number and the unit.



On Monday, November 23, 2015 at 8:50:23 PM UTC+1, mb21 wrote:
>
> The percentage is not formatted properly (i.e. should not have decimal 
>>> places)
>>>
>> @Sean Actually, percentages with decimals are valid CSS, they are even 
> respected by browsers: 
> http://stackoverflow.com/questions/4308989/are-the-decimal-places-in-a-css-width-respected
>  
>
>> How can I make sure the value of width and height in markdown are treated 
>>> as strings, to prevent wrong conversions?  I want to be able to specify the 
>>> dimensions using pixel, em or percentage. Right now it is just dropping the 
>>> units.
>>>
>>
> What's wrong with: ![Alt text](file.jpg){width=50}
> <img src="file.jpg" alt="Alt text" width="50" />
>
> For more info, see the README in the master branch.
>

-- 
You received this message because you are subscribed to the Google Groups "pandoc-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To post to this group, send email to pandoc-discuss-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To view this discussion on the web visit https://groups.google.com/d/msgid/pandoc-discuss/06847d46-f1bd-4fc7-996c-41376352b425%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

[-- Attachment #1.2: Type: text/html, Size: 4607 bytes --]

^ permalink raw reply	[flat|nested] 26+ messages in thread

end of thread, other threads:[~2015-11-23 19:52 UTC | newest]

Thread overview: 26+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-11-13  5:24 Adding reST directives to Markdown Sean Tan
     [not found] ` <037f90a1-1b9d-4464-adfe-fdc61826ce91-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
2015-11-13 12:25   ` Daniel Bergey
     [not found]     ` <87egfucchw.fsf-/RJW9vzmE8ypXNIQCVAXCG0Lkn3mC4nZ0tOlhedn3YvkypF1WZHjJXhe7Zk3YmMvjmZSf7Nhrd8@public.gmane.org>
2015-11-14  5:51       ` Sean Tan
     [not found]         ` <e75ccfd9-fba6-41d4-a572-32917ced03da-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
2015-11-14  6:01           ` Sean Tan
     [not found]             ` <e1c0b452-ed83-4d66-a01e-4bd1cc7bdcf6-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
2015-11-14  6:06               ` Sean Tan
     [not found]                 ` <b9b740c3-0a2d-4a1e-8e54-ab1b9c10a1d4-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
2015-11-15 19:10                   ` mb21
     [not found]                     ` <584749b8-d7e0-473e-8f70-7f475b5cc2f1-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
2015-11-19  3:25                       ` Sean Tan
     [not found]                         ` <ed0c9315-33b3-4604-af58-ba1dba9d4a13-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
2015-11-19  4:03                           ` Daniel Staal
2015-11-19  8:59                           ` mb21
     [not found]                             ` <dfa586d3-ccf3-4906-b157-404be5659532-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
2015-11-19 20:34                               ` John MACFARLANE
     [not found]                                 ` <20151119203422.GA2206-nFAEphtLEs/fysO+viCLMa55KtNWUUjk@public.gmane.org>
2015-11-20  7:30                                   ` John MACFARLANE
     [not found]                                     ` <20151120073007.GB19633-nFAEphtLEs/fysO+viCLMa55KtNWUUjk@public.gmane.org>
2015-11-20  8:57                                       ` mb21
     [not found]                                         ` <6ff2e685-3e7e-4150-bcbc-6d20925c9caf-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
2015-11-20 20:05                                           ` John MACFARLANE
     [not found]                                             ` <20151120200501.GC22968-nFAEphtLEs/fysO+viCLMa55KtNWUUjk@public.gmane.org>
2015-11-21 12:41                                               ` mb21
     [not found]                                                 ` <18314bea-f987-41f4-8d3c-7160dbba4061-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
2015-11-21 17:05                                                   ` John MacFarlane
     [not found]                                                     ` <20151121170503.GC82398-jF64zX8BO091tJRe0FUodcM6rOWSkUom@public.gmane.org>
2015-11-22 16:58                                                       ` mb21
     [not found]                                                         ` <b3e86306-897d-40f3-8079-84132e405432-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
2015-11-22 17:21                                                           ` John MacFarlane
2015-11-22 17:24                                                           ` John MacFarlane
     [not found]                                                             ` <20151122172423.GA79184-jF64zX8BO091tJRe0FUodcM6rOWSkUom@public.gmane.org>
2015-11-22 19:56                                                               ` mb21
     [not found]                                                                 ` <d649d340-be4e-41e9-a51f-19890d139870-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
2015-11-23 10:13                                                                   ` Sean Tan
     [not found]                                                                     ` <d164a492-d86c-4955-8563-f840ebfa51be-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
2015-11-23 10:16                                                                       ` Sean Tan
     [not found]                                                                         ` <3529e184-6d75-433e-bc5d-3bf29ced2bf2-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
2015-11-23 19:50                                                                           ` mb21
     [not found]                                                                             ` <c5d210af-77df-4d3e-8278-1b8267d356b5-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
2015-11-23 19:52                                                                               ` mb21
2015-11-21 14:54                                               ` Pablo Rodríguez
2015-11-20 20:07                                           ` new image and link attributes [was Re: Adding reST directives to Markdown] John MACFARLANE
2015-11-19 15:34                           ` Adding reST directives to Markdown BP Jonsson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).