From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp12.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id mBndJY9I6GEQeQAAgWs5BA (envelope-from ) for ; Wed, 19 Jan 2022 18:21:19 +0100 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp12.migadu.com with LMTPS id CEKEIo9I6GGLSQAAauVa8A (envelope-from ) for ; Wed, 19 Jan 2022 18:21:19 +0100 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 1EF3E44DC9 for ; Wed, 19 Jan 2022 18:21:18 +0100 (CET) Received: from localhost ([::1]:42132 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nAEe4-0002PW-Rw for larch@yhetil.org; Wed, 19 Jan 2022 12:21:16 -0500 Received: from eggs.gnu.org ([209.51.188.92]:43870) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nAEbO-0002AZ-De for emacs-orgmode@gnu.org; Wed, 19 Jan 2022 12:18:33 -0500 Received: from [2a00:1450:4864:20::333] (port=44671 helo=mail-wm1-x333.google.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nAEbK-00006I-Fx for emacs-orgmode@gnu.org; Wed, 19 Jan 2022 12:18:29 -0500 Received: by mail-wm1-x333.google.com with SMTP id l35-20020a05600c1d2300b0034d477271c1so6890725wms.3 for ; Wed, 19 Jan 2022 09:18:24 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=andrew.cmu.edu; s=google-2021; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=ZYm/UnAH9irN4SfsrA2REYwlgextvU5PnnnBO7KaQX4=; b=MQUFOEO6KU5aADkAJmrqYPa2NZHRiOSJogjgxhM4Kv9m5bWQEZdJLvc5X3PuzwDlh3 MGCgfhDtcQFsuRKAGfLYVTxoF98PP3/8cD0C2ntBH4WWaUrJ1Ls+T8Si8vfZ0ceUcLlR nki5BVFSPVSa9Z5jWNTDx0rTe1rYDPDl+6Xr0+4K8oGlP2eYQXpvNZPUobGGGAZx0U+q 2zOa2irCLWeVMzDiWB1li51hPmNedpPOtyeriqcjCbSoZimNimvXKRBqpV/nWcmWjBjE Ml8P1D4Xhyx1aqjuDKRMAGqjQExXj4A9NT2jWXO61lL0WsIN0ziRpeG6ZevVZ/ygSCXD FpDA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=ZYm/UnAH9irN4SfsrA2REYwlgextvU5PnnnBO7KaQX4=; b=LT1DX6HekG599mZqaK73iGwIohRPrKXu++Mrj3V6oaCla+nCqmYlytbtB98RltiHju CRhvopMCBJwsZnOssEdvUgPnjt6OMx6Gp9fLb295iHqYVha6FYMoJ36etKdSEmPQ/Rdb uyE9BjviD1uzJpWYAAmk8l4ydu8ObKzXNJua3IqPRFJNz/kmE5/KD1NA61sqqk4Nqorz e9rxV/6FyjcWSN6Wcc9wJgOksbVJTDh09pm9bwcxNmuKwwCAVvKZoJjqWoVywjvEfW4F d26r4csM49bT2hiZqVn3OZKwyO3j1b51vdtFCpEDvjVQEWvk0o9Xcb+XgfjPt5gVV/Ky V2Hg== X-Gm-Message-State: AOAM531tGYsszatWBH0kNVxCyqy2U1w2b0Mr+ITldSKCvcBy7wf/PM+b eDW5bRg0ez9AYmQRTzf3YPl0YT/XEwbBrummexo= X-Google-Smtp-Source: ABdhPJz5uMY1xQw148xs7Pi25pVoUrhtXoHO57asvYgVEbWLbWF9SrrHG0ES6KHKVTvImRdZK+/QYxNZyeMSzNMSgsA= X-Received: by 2002:a5d:6da9:: with SMTP id u9mr17323658wrs.29.1642612703561; Wed, 19 Jan 2022 09:18:23 -0800 (PST) MIME-Version: 1.0 References: In-Reply-To: From: John Kitchin Date: Wed, 19 Jan 2022 12:18:12 -0500 Message-ID: Subject: Re: handling as special special block in derived export To: Matt Price Content-Type: multipart/alternative; boundary="000000000000b3104305d5f2922f" X-Host-Lookup-Failed: Reverse DNS lookup failed for 2a00:1450:4864:20::333 (failed) Received-SPF: pass client-ip=2a00:1450:4864:20::333; envelope-from=johnrkitchin@gmail.com; helo=mail-wm1-x333.google.com X-Spam_score_int: -6 X-Spam_score: -0.7 X-Spam_bar: / X-Spam_report: (-0.7 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, FREEMAIL_FORGED_FROMDOMAIN=0.249, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.248, HTML_MESSAGE=0.001, PDS_HP_HELO_NORDNS=0.001, RCVD_IN_DNSWL_NONE=-0.0001, RDNS_NONE=0.793, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-orgmode@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Org Mode Errors-To: emacs-orgmode-bounces+larch=yhetil.org@gnu.org Sender: "Emacs-orgmode" X-Migadu-Flow: FLOW_IN X-Migadu-Country: US ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1642612879; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=ZYm/UnAH9irN4SfsrA2REYwlgextvU5PnnnBO7KaQX4=; b=nSpTVz/VeVm/N+IPrg7Bc3uEiSYnO/ltsMpxKKIWlOslK4Df9b1lc2ar3gypfztIRmokR4 8ldLRynEzo4qneSwtTHqZo3RCB2te9lxax31IjX0qco75pfu09G/PMjWkJj61ASxAX/Tkz 7gl642OnkwpLaDyDLNob12C0tWDve3Nl8uEMHfXLeCMUttyQigzjD6Qs13bkK1G0FXEc/R CL3V90ewNpAgH2nGONoOXoQcdxaDi3KsME7sMoF3C04ihzD5pR+FQzB3f5ClfoaUiXKmFA L1m8/RzKkE2dit1uMb7k358kO8faQG9N6ZHnHWupzUTfhTiJoBgznSlZk/hjGg== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1642612879; a=rsa-sha256; cv=none; b=o96JCWN26JwRjoAoAf7kzUiH6Xivbzy++dTXkhg7APZcfLY8nxCTQQZl5Z/okigxk9hihu pjG1rDsQqA/RjahIqm3ekUq0baVF/+qR7tKelP3s1o0DYXcPOFl6HUUtEH8DeE9kbz6I9Y Cj9bPJbMn9V8APbcLPxqBFMQfigVro+fkw9oTX8PX6R+TTpHccKbn/Me4Q6E8aGzYPn5HX rVzw21JLRykLUc2PtNaxqKmzuqAMdbzL0ko0e9fn6tnf0CUWwZwSV2ZZh6hNSDgnATPm9W 56phYT2aEl1gsUKnMOoZ1cm7nOgnSoVfx1pjpN693PTq9iI39GdVijaNIIU5nA== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=andrew.cmu.edu header.s=google-2021 header.b=MQUFOEO6; dmarc=pass (policy=none) header.from=andrew.cmu.edu; spf=pass (aspmx1.migadu.com: domain of "emacs-orgmode-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="emacs-orgmode-bounces+larch=yhetil.org@gnu.org" X-Migadu-Spam-Score: -5.32 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=andrew.cmu.edu header.s=google-2021 header.b=MQUFOEO6; dmarc=pass (policy=none) header.from=andrew.cmu.edu; spf=pass (aspmx1.migadu.com: domain of "emacs-orgmode-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="emacs-orgmode-bounces+larch=yhetil.org@gnu.org" X-Migadu-Queue-Id: 1EF3E44DC9 X-Spam-Score: -5.32 X-Migadu-Scanner: scn1.migadu.com X-TUID: +pVRhGGNMV4d --000000000000b3104305d5f2922f Content-Type: text/plain; charset="UTF-8" I am not sure this is quite what you are looking for. You could use a macro like this. {{{r-stack(((src1 . fade-out) (src2 . fade-in) (src3 . fade-out)))}}} * code :noexport: #+macro: r-stack (eval (r-stack $1)) #+BEGIN_SRC emacs-lisp (defun r-stack (src-alist) "SRC-alist will be a string containing a list of (src . data-fragment) src is a url or filename data-fragment Returns a string for export." (let ((src (read src-alist))) (format "#+BEGIN_EXPORT html
%s
,#+END_EXPORT" (string-join (cl-loop for (src . data-fragment) in src collect (format " " data-fragment src)) "\n")))) (r-stack "((src1 . fade-out) (src2 . fade-in) (src3 . fade-out))") #+END_SRC #+RESULTS: : #+BEGIN_EXPORT html :
: : : :
: #+END_EXPORT You could also make a link do that. John ----------------------------------- Professor John Kitchin (he/him/his) Doherty Hall A207F Department of Chemical Engineering Carnegie Mellon University Pittsburgh, PA 15213 412-268-7803 @johnkitchin http://kitchingroup.cheme.cmu.edu On Wed, Jan 19, 2022 at 9:42 AM Matt Price wrote: > I am trying ot figure out if I can create a simplified syntax for a > particular special block in a derived HTML exporter. > > I'm trying to produce HTML like this: > >
> > The derived backend (org-re-reveal) already has an > > #+ATTR_REVEAL that an make the data-fragment attributes, so it's not hard to produce > the desired outpu: > > #+begin_r-stack > #+ATTR_REVEAL: :frag appear[[imglink1]] > #+ATTR_REVEAL: :frag appear[[imglink2]]#+end_r-stack > > 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? > > Thanks for your help as always! > > Matt > > --000000000000b3104305d5f2922f Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
I am not sure this is quite what you are looking for.= You could use a macro like this.=C2=A0



{{= {r-stack(((src1 . fade-out) (src2 . fade-in) (src3 . fade-out)))}}}

= * code :noexport:

#+macro: r-stack (eval (r-stack $1))

#+BEGI= N_SRC emacs-lisp
(defun r-stack (src-alist)
=C2=A0 "SRC-alist wi= ll be a string containing a list of (src . data-fragment)
src is a url o= r filename
data-fragment

Returns a string for export." =C2= =A0
=C2=A0 (let ((src (read src-alist)))
=C2=A0 =C2=A0 (format "= #+BEGIN_EXPORT html
<div class=3D\"r-stack\">
%s =C2= =A0 =C2=A0 =C2=A0
</div>
,#+END_EXPORT"
=C2=A0 =C2= =A0(string-join
=C2=A0 =C2=A0 (cl-loop for (src . data-fragment) in sr= c
=C2=A0 =C2=A0 =C2=A0collect
=C2=A0 =C2=A0 =C2=A0(format "= ; =C2=A0<img data-fragment=3D\"%s\" src=3D\"%s\"/>= ;"
=C2=A0 =C2=A0 =C2=A0data-fragment src))
=C2=A0 =C2=A0 &= quot;\n"))))


(r-stack "((src1 . fade-out) (src2 . fade= -in) (src3 . fade-out))")
#+END_SRC

#+RESULTS:
: #+BEGIN_= EXPORT html
: <div class=3D"r-stack">
: =C2=A0 <im= g data-fragment=3D"fade-out" src=3D"src1"/>
: =C2= =A0 <img data-fragment=3D"fade-in" src=3D"src2"/>=
: =C2=A0 <img data-fragment=3D"fade-out" src=3D"src3&= quot;/> =C2=A0 =C2=A0 =C2=A0
: </div>
: #+END_EXPORT

You could also make a link do that.

John

-------= ----------------------------
Professor John Kitchin (he/him/his)
Dohe= rty Hall A207F
Department of Chemical Engineering
Carnegie Mellon Uni= versity
Pittsburgh, PA 15213
412-268-7803
=

On Wed, Jan 19, 2022 at 9:42 AM Matt Price <moptop99@gmail.com> wrote:
I am trying ot figur= e out if I can create a simplified syntax for a particular special block in= a derived HTML exporter.=C2=A0

I'm tryin= g to produce HTML like this:

<div=
 class=3D"r-stack>
  <=
;img data-fragment=3D"fade-out" =
src=3D"...."/>
  <=
;img data-fragment=3D"fade-in" <=
span>src=3D"..."/>
</=
div>


The derived backend =
(org-re-reveal) already has an 
#+ATTR_REVEAL that an make the data-fr=
agment attributes, so it's not hard to produce
the desired outpu:
= #+begin_r-stack
#+ATTR_REVEAL: :frag appear [[imgl= ink1]]
#+ATTR_REVEAL: :frag= appear
[[imgl= ink2]] #+end_= r-stack

However, I'd really like to add a less verbose syntax, like t=
his:

#+begin_r-stack :frag (appear appear) [[imgl= ink1]] [[imgl= ink2]] #+end_= r-stack
My question is: will the exporter preserve information from these hea=
der-like arguments, and is 
there a mechanism I can use in a custom ~spe= cial-block-function~ to make use of htem?

Thanks for your help as =
always!

Matt
--000000000000b3104305d5f2922f--