On Wed, Jan 19, 2022 at 3:56 PM Berry, Charles <ccbe...@health.ucsd.edu>
wrote:

> Matt,
>
> > On Jan 19, 2022, at 5:52 AM, Matt Price <mopto...@gmail.com> wrote:
> >
> > However, I'd really like to add a less verbose syntax, like this:
> >
> > #+begin_r-stack :frag (appear appear)
> > [[imglink1]]
> > [[imglink2]]
> > #+end_r-stack
> >
> > My question is: will the exporter preserve information from these
> header-like arguments, and is
> > there a mechanism I can use in a custom ~special-block-function~ to make
> use of htem?
> >
>
> Not as you have it there, but
>
> #+header: :frag (appear appear)
> #+begin_r-stack
> [[imglink1]]
> [[imglink2]]
> #+end_r-stack
>
>
> parses as
>
> (special-block
>  (:type "r-stack" :begin 727 :end 815 :contents-begin 775 :contents-end
> 801 :post-blank 0 :post-affiliated 759 :header
>         (":frag (appear appear)")
>         :mode nil :granularity element :parent nil))
>
> if that helps.
>

Ah, thank you. I had never used #+header: before.

THis helps a little, but I guess the parser works from the inside out. That
is, the special block contents are already parsed before the block itself.
As a result, I don't see how to add classes to the contents on the basis of
the block headers.  Also, it doesn't seem trivial to identify the "direct
children" of the block, the way one might in javaScript with, say,
~document.querySelectorAll()~.or just ~elem.children()~.   So I'm not
convinced my initial impulse to solve the problem this way will be
fruitful.

>
> Chuck
>

Reply via email to