There is one example in the writers' manual, see Hth, Sukil El 04/08/2022 a las 22:21, Sterling Hooten escribió: > Is there an example of this? (ie, replacing the behavior of just a > single type of object). > > I'm trying to write web clipper for emacs org mode, and want a filter > or writer which will replace the "file:" prefix in an org mode link > with "attachment:" (and perhaps some org-id information). > > I've written a custom filter but this seems to still be passed to the > org.hs writer which has no concept of "attachment". > > It seems like my options are either editing the org.hs file directly > (and then compile from source?) or rewrite the /entire /writer in Lua. > > I'm a novice, but is there a way to alter types (like Image) to a > different type so that the built-in org writer won't recognize them? > > On Thursday, March 24, 2022 at 3:29:10 PM UTC-4 AustinLe wrote: > > Sounds tempting, thanks for the updates. > > For the moment I started to think a simple lua-filter could be > used as a post-processing step. > > > On Thu, 24 Mar 2022 at 19:33, John MacFarlane > wrote: > > > Indeed, it is quite a hassle. > > Actually, in the dev version @tarleb has created a new way > of creating a writer, which will allow you to override just > one function.  It's not yet in a released version, but it is > in the nightlies now. > > https://github.com/jgm/pandoc/commit/0f0b042139e3a82673590f14b70e5fcb5e57ea61 > > > > AustinLe writes: > > > I've been searching for a few days and as I could find what > I wanted, I'd > > like to confirm if my conclusion is correct. > > > > In particular, I'd like to overwrite a small writer > behavior, e.g. the Cite > > tag of the default HTML writer, by adding an extra field in > the tag. I'm > > checking the custom writer tag and it seems like I have to > re-write the > > whole writer for all AST elements, and not just replacing > `function Cite` > > in the `sample.lua` with what I needed. > > > > This seems to  be quite a hassle as the provided > `sample.lua` doesn't > > produce the same document as the default HTML writer does > (missing table of > > content, math formulas aren't rendered, question about that > here > > ). > > > > Is it correct that I have to provide the writer for the all > AST elements, > > or am I missing something and we can actually override just > a function only? > > > > -- > > 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...-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > > To view this discussion on the web visit > https://groups.google.com/d/msgid/pandoc-discuss/3aa35ec0-4912-4fd7-9e11-8a78296f9da4n%40googlegroups.com. > > -- > 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/49abfd29-599e-4055-bd0e-ba53468d6a54n%40googlegroups.com > . -- 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/8aac07f5-1e1f-20f4-7832-28ebdb96fffb%40gmail.com.