> On Jan 6, 2022, at 11:46 AM, Kaushal Modi <kaushal.m...@gmail.com> wrote: > > On Thu, Jan 6, 2022 at 2:33 PM Juan Manuel Macías > <maciasch...@posteo.net> wrote: >> I just realized that there is a much simpler solution for your katex >> environment :-) >> >> You can use an example block, and define your custom environment using >> the attribute :environment > > Sorry, but this exporter is derived from md, and before exporting the > verbatim body of the special block needs to be surrounded with some > special syntax, with some optional stuff that the user specifies. Also > it could any special block name: > - katex > - tikz > - tikzjax > > In any case, if user has this in Org: > > #+begin_FOO > <body verbatim> > #+end_FOO > > I need to export: > > {{< FOO custom stuff >}} > <body verbatim> > {{< /FOO >}} > >
What am I missing? It seems like you want your derived backend to transcode special blocks somewhat differently than the parent backend. And adding a special block export filter doesn't quite do the job. For that purpose, you should write a special block transcoder - perhaps falling back to the parent backend for block types you do not wish to handle as described above. Block specific customizations could rely on a backend specific attribute. HTH, Chuck