From mboxrd@z Thu Jan 1 00:00:00 1970 From: Charles Berry Subject: Re: Proposal/request for input: slidify export for html slides Date: Mon, 10 Feb 2014 04:16:16 +0000 (UTC) Message-ID: References: <20140130014552.GA8980@eyeBook> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:48032) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WCiIW-0000y2-Vj for emacs-orgmode@gnu.org; Sun, 09 Feb 2014 23:16:50 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WCiIR-0001cw-NI for emacs-orgmode@gnu.org; Sun, 09 Feb 2014 23:16:44 -0500 Received: from plane.gmane.org ([80.91.229.3]:45393) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WCiIR-0001cn-GB for emacs-orgmode@gnu.org; Sun, 09 Feb 2014 23:16:39 -0500 Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1WCiIQ-0001yX-Bl for emacs-orgmode@gnu.org; Mon, 10 Feb 2014 05:16:38 +0100 Received: from 137.110.36.180 ([137.110.36.180]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 10 Feb 2014 05:16:38 +0100 Received: from ccberry by 137.110.36.180 with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 10 Feb 2014 05:16:38 +0100 List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: emacs-orgmode@gnu.org John Hendy gmail.com> writes: > > On Sat, Feb 8, 2014 at 11:18 AM, Charles Berry ucsd.edu> wrote: > [snip] > > But there is some effort and overhead involved, so only the most > > useful (IMO) have been mapped. Right now, `:noweb yes' will expand the > > reference(s) in place before export, and `:exports none' will not export > > the block. Maybe one day ... > > Understood, and no worries. I'm making progress. When you say "expand > references," I'm not sure I follow what that means. References = > references to variables? So something like :var something=something? > 'References' refers to noweb references. See http://orgmode.org/org.html#noweb > > More a matter of what my workflow is (so the issue doesn't arise). I use > > the cache=TRUE chunk option on the knitr side to save the results of > > long > > running computations. When I start work, I execute a src block that > > loads > > knitr and knits the *.Rnw (or *.Rmd, etc), which has the side effect of > > loading the cached objects. Then I edit the *.org document. If I am > > working on R code, I run the code interactively either from the src edit > > buffer or I C-c C-c the src block. Its handy to leave the results in the > > *.org buffer for reference - they get stripped on export. Maybe I edit > > a figure caption (knitr option fig.cap=), equations, > > or text. When I am ready to see the formatted doc, I export via ravel, > > knit, and view. The cached objects get rebuilt as needed. > > Ah. I think I follow this. If you knit the exported .org -> Rmd file > in the same R session that Org is using, if you change the .org and > re-export to .Rmd, knitr is smart enough not to re-run the code? Is > that what you mean? Almost. ox-ravel does not call knitr. The ravel backends advice `org-babel-exp-do-export' when a ravel backend runs so R code src blocks are not run, but are turned into chunks (for knitr, Sweave, or ...) and exported as such. When you want to actually process the resulting document, you have to call on knitr or some other R report generator to do the work. > That also must imply that export to .Rmd doesn't > execute any of the Org babel code, right (otherwise there would be no > benefit to your workflow since you'd be waiting for Org anyway)? Correct for R src blocks. But emacs-lisp and other languages are treated as under the parent backends. > > If that's the case, I think I could roll with that -- I'd just have > :eval yes if exporting to .Rmd -> knitr, and do a replace-string to > :eval no if I was going to export to Beamer. > In R scr blocks, :eval is ignored by ravel and so need not change when ravel is run. [snip] > I'm a bit hung up on including non-code-generated images. I'm working > through one of my presentations to convert to slidify (and may write > up a Worg tutorial or just one on my blog to add to collective > knowledge) but am not sure of the right "universal Org syntax" that > will work with multiple backends. I'm most used to something like > this: > > #+begin_center > #+attr_backend :height {6cm, 400px, etc.} > [[./path/to/image.png]] > #+end_center > > That's not seeming to work with ox-ravel thus far. I'd love not to > have to change the Org image syntax to straight markdown just for my > occasional use of slidify. > It's not related to ox-ravel, which uses the same transcoders as the parent backends for everything except inline src and src blocks. I'm not sure how to get what you seem to want. Maybe use a custom link http://orgmode.org/org.html#Adding-hyperlink-types or ask about html/md links in a fresh thread? HTH, Chuck