public inbox archive for pandoc-discuss@googlegroups.com
 help / color / mirror / Atom feed
* I wish I could hook things up to Pandoc's readers to extend them
@ 2020-11-30 23:14 T. Kurt Bond
       [not found] ` <CAN1EhV-9NwcMVZeGk3ZgPg1tJvcR54=_Y5rd1Y7io2gFzcbqjw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
  0 siblings, 1 reply; 5+ messages in thread
From: T. Kurt Bond @ 2020-11-30 23:14 UTC (permalink / raw)
  To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw

[-- Attachment #1: Type: text/plain, Size: 1046 bytes --]

I wish I could hook things up to Pandoc's readers to extend them.  For
instance, pandoc's Docbook reader ignores indexing elements.  I wish I
could hook a Lua filter up to it so I could tell it to add the indexing
elements (perhaps as a new type of object, or perhaps as the contents of a
Span or Div with particular classes, as appropriate) to the AST before the
Lua filters get it before the writers.  Then the regular Lua filters could
rewrite it to, for instance, indexing commands suitable for ConTeXt.

Any thoughts?

-- 
T. Kurt Bond, tkurtbond-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org, https://tkurtbond.github.io

-- 
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 view this discussion on the web visit https://groups.google.com/d/msgid/pandoc-discuss/CAN1EhV-9NwcMVZeGk3ZgPg1tJvcR54%3D_Y5rd1Y7io2gFzcbqjw%40mail.gmail.com.

[-- Attachment #2: Type: text/html, Size: 1728 bytes --]

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

* Re: I wish I could hook things up to Pandoc's readers to extend them
       [not found] ` <CAN1EhV-9NwcMVZeGk3ZgPg1tJvcR54=_Y5rd1Y7io2gFzcbqjw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
@ 2020-12-01  8:14   ` Gabriel Nützi
  2020-12-01 10:29   ` BPJ
  1 sibling, 0 replies; 5+ messages in thread
From: Gabriel Nützi @ 2020-12-01  8:14 UTC (permalink / raw)
  To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw

[-- Attachment #1: Type: text/plain, Size: 2157 bytes --]

This would be really nice :-). Especially also if we could rewrite e.g. 
the table generation especially for latex or so....
I think its only possible (so far) to write a whole Lua filter, where 
all elements need to be supported... not just extending...

Am 01.12.2020 um 00:14 schrieb T. Kurt Bond:
> I wish I could hook things up to Pandoc's readers to extend them.  For 
> instance, pandoc's Docbook reader ignores indexing elements.  I wish I 
> could hook a Lua filter up to it so I could tell it to add the 
> indexing elements (perhaps as a new type of object, or perhaps as the 
> contents of a Span or Div with particular classes, as appropriate) to 
> the AST before the Lua filters get it before the writers.  Then the 
> regular Lua filters could rewrite it to, for instance, indexing 
> commands suitable for ConTeXt.
>
> Any thoughts?
>
> -- 
> T. Kurt Bond, tkurtbond-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org <mailto:tkurtbond-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>, 
> https://tkurtbond.github.io <https://tkurtbond.github.io>
> -- 
> 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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org 
> <mailto:pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>.
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/pandoc-discuss/CAN1EhV-9NwcMVZeGk3ZgPg1tJvcR54%3D_Y5rd1Y7io2gFzcbqjw%40mail.gmail.com 
> <https://groups.google.com/d/msgid/pandoc-discuss/CAN1EhV-9NwcMVZeGk3ZgPg1tJvcR54%3D_Y5rd1Y7io2gFzcbqjw%40mail.gmail.com?utm_medium=email&utm_source=footer>.

-- 
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 view this discussion on the web visit https://groups.google.com/d/msgid/pandoc-discuss/6f6c2615-9acd-28cb-6fb3-dfdad6d9a077%40gmail.com.

[-- Attachment #2: Type: text/html, Size: 3737 bytes --]

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

* Re: I wish I could hook things up to Pandoc's readers to extend them
       [not found] ` <CAN1EhV-9NwcMVZeGk3ZgPg1tJvcR54=_Y5rd1Y7io2gFzcbqjw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
  2020-12-01  8:14   ` Gabriel Nützi
@ 2020-12-01 10:29   ` BPJ
       [not found]     ` <CADAJKhBYmZGS6884r9ubJr0JuckuTQAEGA5q1-F1=zMM0MMvnA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
  1 sibling, 1 reply; 5+ messages in thread
From: BPJ @ 2020-12-01 10:29 UTC (permalink / raw)
  To: pandoc-discuss

[-- Attachment #1: Type: text/plain, Size: 2119 bytes --]

Do you mean that pandoc ignores docbook `indexterm`s when converting *from*
docbook, or that you have problems creating them when converting (from
markdown) *to* docbook? If the latter I have a filter which (ab)uses pandoc
citation syntax to create index commands for LaTeX/xindy which could
probably be adapted.

Den tis 1 dec. 2020 00:15T. Kurt Bond <tkurtbond-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> skrev:

> I wish I could hook things up to Pandoc's readers to extend them.  For
> instance, pandoc's Docbook reader ignores indexing elements.  I wish I
> could hook a Lua filter up to it so I could tell it to add the indexing
> elements (perhaps as a new type of object, or perhaps as the contents of a
> Span or Div with particular classes, as appropriate) to the AST before the
> Lua filters get it before the writers.  Then the regular Lua filters could
> rewrite it to, for instance, indexing commands suitable for ConTeXt.
>
> Any thoughts?
>
> --
> T. Kurt Bond, tkurtbond-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org, https://tkurtbond.github.io
>
> --
> 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 view this discussion on the web visit
> https://groups.google.com/d/msgid/pandoc-discuss/CAN1EhV-9NwcMVZeGk3ZgPg1tJvcR54%3D_Y5rd1Y7io2gFzcbqjw%40mail.gmail.com
> <https://groups.google.com/d/msgid/pandoc-discuss/CAN1EhV-9NwcMVZeGk3ZgPg1tJvcR54%3D_Y5rd1Y7io2gFzcbqjw%40mail.gmail.com?utm_medium=email&utm_source=footer>
> .
>
-- 
Better --help|less than helpless

-- 
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 view this discussion on the web visit https://groups.google.com/d/msgid/pandoc-discuss/CADAJKhBYmZGS6884r9ubJr0JuckuTQAEGA5q1-F1%3DzMM0MMvnA%40mail.gmail.com.

[-- Attachment #2: Type: text/html, Size: 3385 bytes --]

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

* Re: I wish I could hook things up to Pandoc's readers to extend them
       [not found]     ` <CADAJKhBYmZGS6884r9ubJr0JuckuTQAEGA5q1-F1=zMM0MMvnA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
@ 2020-12-01 22:08       ` T. Kurt Bond
       [not found]         ` <CAN1EhV8SDoKuRGkJep2uQZQuL48-jOB528bgEHcN5pPSbqbs4g-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
  0 siblings, 1 reply; 5+ messages in thread
From: T. Kurt Bond @ 2020-12-01 22:08 UTC (permalink / raw)
  To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw

[-- Attachment #1: Type: text/plain, Size: 3211 bytes --]

I'm talking about going from DocBook *to* ... ReStructuredText in this
case, although I think the issues are the same with Markdown.

But I'm still interested in your filter, because I need to write one for
ConTeXt output.  Could you send your filter to me?

On Tue, Dec 1, 2020 at 5:29 AM BPJ <melroch-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:

> Do you mean that pandoc ignores docbook `indexterm`s when converting
> *from* docbook, or that you have problems creating them when converting
> (from markdown) *to* docbook? If the latter I have a filter which (ab)uses
> pandoc citation syntax to create index commands for LaTeX/xindy which could
> probably be adapted.
>
> Den tis 1 dec. 2020 00:15T. Kurt Bond <tkurtbond-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> skrev:
>
>> I wish I could hook things up to Pandoc's readers to extend them.  For
>> instance, pandoc's Docbook reader ignores indexing elements.  I wish I
>> could hook a Lua filter up to it so I could tell it to add the indexing
>> elements (perhaps as a new type of object, or perhaps as the contents of a
>> Span or Div with particular classes, as appropriate) to the AST before the
>> Lua filters get it before the writers.  Then the regular Lua filters could
>> rewrite it to, for instance, indexing commands suitable for ConTeXt.
>>
>> Any thoughts?
>>
>> --
>> T. Kurt Bond, tkurtbond-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org, https://tkurtbond.github.io
>>
>> --
>> 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 view this discussion on the web visit
>> https://groups.google.com/d/msgid/pandoc-discuss/CAN1EhV-9NwcMVZeGk3ZgPg1tJvcR54%3D_Y5rd1Y7io2gFzcbqjw%40mail.gmail.com
>> <https://groups.google.com/d/msgid/pandoc-discuss/CAN1EhV-9NwcMVZeGk3ZgPg1tJvcR54%3D_Y5rd1Y7io2gFzcbqjw%40mail.gmail.com?utm_medium=email&utm_source=footer>
>> .
>>
> --
> Better --help|less than helpless
>
> --
> 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 view this discussion on the web visit
> https://groups.google.com/d/msgid/pandoc-discuss/CADAJKhBYmZGS6884r9ubJr0JuckuTQAEGA5q1-F1%3DzMM0MMvnA%40mail.gmail.com
> <https://groups.google.com/d/msgid/pandoc-discuss/CADAJKhBYmZGS6884r9ubJr0JuckuTQAEGA5q1-F1%3DzMM0MMvnA%40mail.gmail.com?utm_medium=email&utm_source=footer>
> .
>


-- 
T. Kurt Bond, tkurtbond-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org, https://tkurtbond.github.io

-- 
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 view this discussion on the web visit https://groups.google.com/d/msgid/pandoc-discuss/CAN1EhV8SDoKuRGkJep2uQZQuL48-jOB528bgEHcN5pPSbqbs4g%40mail.gmail.com.

[-- Attachment #2: Type: text/html, Size: 5172 bytes --]

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

* Re: I wish I could hook things up to Pandoc's readers to extend them
       [not found]         ` <CAN1EhV8SDoKuRGkJep2uQZQuL48-jOB528bgEHcN5pPSbqbs4g-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
@ 2020-12-02 17:44           ` BPJ
  0 siblings, 0 replies; 5+ messages in thread
From: BPJ @ 2020-12-02 17:44 UTC (permalink / raw)
  To: pandoc-discuss

[-- Attachment #1: Type: text/plain, Size: 4233 bytes --]

Sure. I'll make it presentable (documentation, comments) and upload it to
GitHub. Note however that the actual handwritten code is MoonScript, the
Lua code being autogenerated from the MoonScript and not very idiomatic.

-- 
Better --help|less than helpless

Den tis 1 dec. 2020 23:09T. Kurt Bond <tkurtbond-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> skrev:

> I'm talking about going from DocBook *to* ... ReStructuredText in this
> case, although I think the issues are the same with Markdown.
>
> But I'm still interested in your filter, because I need to write one for
> ConTeXt output.  Could you send your filter to me?
>
> On Tue, Dec 1, 2020 at 5:29 AM BPJ <melroch-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:
>
>> Do you mean that pandoc ignores docbook `indexterm`s when converting
>> *from* docbook, or that you have problems creating them when converting
>> (from markdown) *to* docbook? If the latter I have a filter which (ab)uses
>> pandoc citation syntax to create index commands for LaTeX/xindy which could
>> probably be adapted.
>>
>> Den tis 1 dec. 2020 00:15T. Kurt Bond <tkurtbond-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> skrev:
>>
>>> I wish I could hook things up to Pandoc's readers to extend them.  For
>>> instance, pandoc's Docbook reader ignores indexing elements.  I wish I
>>> could hook a Lua filter up to it so I could tell it to add the indexing
>>> elements (perhaps as a new type of object, or perhaps as the contents of a
>>> Span or Div with particular classes, as appropriate) to the AST before the
>>> Lua filters get it before the writers.  Then the regular Lua filters could
>>> rewrite it to, for instance, indexing commands suitable for ConTeXt.
>>>
>>> Any thoughts?
>>>
>>> --
>>> T. Kurt Bond, tkurtbond-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org, https://tkurtbond.github.io
>>>
>>> --
>>> 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 view this discussion on the web visit
>>> https://groups.google.com/d/msgid/pandoc-discuss/CAN1EhV-9NwcMVZeGk3ZgPg1tJvcR54%3D_Y5rd1Y7io2gFzcbqjw%40mail.gmail.com
>>> <https://groups.google.com/d/msgid/pandoc-discuss/CAN1EhV-9NwcMVZeGk3ZgPg1tJvcR54%3D_Y5rd1Y7io2gFzcbqjw%40mail.gmail.com?utm_medium=email&utm_source=footer>
>>> .
>>>
>> --
>> Better --help|less than helpless
>>
>> --
>> 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 view this discussion on the web visit
>> https://groups.google.com/d/msgid/pandoc-discuss/CADAJKhBYmZGS6884r9ubJr0JuckuTQAEGA5q1-F1%3DzMM0MMvnA%40mail.gmail.com
>> <https://groups.google.com/d/msgid/pandoc-discuss/CADAJKhBYmZGS6884r9ubJr0JuckuTQAEGA5q1-F1%3DzMM0MMvnA%40mail.gmail.com?utm_medium=email&utm_source=footer>
>> .
>>
>
>
> --
> T. Kurt Bond, tkurtbond-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org, https://tkurtbond.github.io
>
> --
> 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 view this discussion on the web visit
> https://groups.google.com/d/msgid/pandoc-discuss/CAN1EhV8SDoKuRGkJep2uQZQuL48-jOB528bgEHcN5pPSbqbs4g%40mail.gmail.com
> <https://groups.google.com/d/msgid/pandoc-discuss/CAN1EhV8SDoKuRGkJep2uQZQuL48-jOB528bgEHcN5pPSbqbs4g%40mail.gmail.com?utm_medium=email&utm_source=footer>
> .
>

-- 
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 view this discussion on the web visit https://groups.google.com/d/msgid/pandoc-discuss/CADAJKhBtbd%2Bev79MhmmmsVkDtq_4u8tTQ1kDcpUohwLZbR9v%3Dw%40mail.gmail.com.

[-- Attachment #2: Type: text/html, Size: 6793 bytes --]

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

end of thread, other threads:[~2020-12-02 17:44 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-11-30 23:14 I wish I could hook things up to Pandoc's readers to extend them T. Kurt Bond
     [not found] ` <CAN1EhV-9NwcMVZeGk3ZgPg1tJvcR54=_Y5rd1Y7io2gFzcbqjw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2020-12-01  8:14   ` Gabriel Nützi
2020-12-01 10:29   ` BPJ
     [not found]     ` <CADAJKhBYmZGS6884r9ubJr0JuckuTQAEGA5q1-F1=zMM0MMvnA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2020-12-01 22:08       ` T. Kurt Bond
     [not found]         ` <CAN1EhV8SDoKuRGkJep2uQZQuL48-jOB528bgEHcN5pPSbqbs4g-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2020-12-02 17:44           ` BPJ

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).