[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [O] Proposal/request for input: slidify export for html slides

From: John Hendy
Subject: Re: [O] Proposal/request for input: slidify export for html slides
Date: Fri, 7 Feb 2014 23:38:32 -0600

On Fri, Feb 7, 2014 at 7:04 PM, Charles Berry <address@hidden> wrote:
> John Hendy <jw.hendy <at> gmail.com> writes:
>> On Fri, Feb 7, 2014 at 3:50 PM, Charles Berry <ccberry <at> ucsd.edu> wrote:
>> > John Hendy <jw.hendy <at> gmail.com> writes:
>> >
>> >>
>> >> An interesting update on this. Aside from some image and code block
> [snip - how John turn org to Rmd to md]


>> I often get something squarish, which makes the map look really
>> compressed (see attached). Thus, I seem to need both this (name,
>> header)
> This is a problem that results from rendering in a square rather than
> something proportional to what Mercator used: 202cm x 124cm, I think.
> slidify wants to have png files for images, so I think you are stuck
> having to set up the size of the device as well as the displayed size
> to get nice looking results.

Indeed. I've had to deal with that when exporting to html. Was just
curious if there was a more elegant way, and it seems there's not, but
I suppose it's just adjusting syntax from #+attr_latex stuff to the
knitr equivalents, which isn't bad to know anyway since I've been
working more with RStudio.


>> I would love to avoid the above if you have more clarification on "just
> work" :)
> I wasn't thinking about the case you just demonstrated. I have to use
> a line that gives out.width, out.height, fig.width, and fig.height, which
> slidify ('knitr' under the hood) uses to render the png and the page as you
> did to make something that looks like the Mercator map and still have
> the text look OK. See http://yihui.name/knitr/options if the options
> listed are not familiar. (knitr chunk options can be put in #+ATTR_RAVEL:
> lines for ravel exports to use them.)

Thanks for the reference.

> [more deleted]
>> One other question while we're at it... I noticed that
>> #+begin/end_center produces this in the output .md file:
>> <div class="center">
>> ![nil](map.png)
>> </div>
>> This doesn't export with slidify. [snip more details]
> Right. IMO, using the knitr tools for dealing with such issues beats
> wrestling with the babel and md exporter. i.e. fig.align="center" handles
> this. A good part of my motivation for ox-ravel is that I can deal with
> fine tuning output from knitr more easily than I can w/ babel exports.

I'll look into those. I just cloned your repo and loaded ox-ravel.
Quite nice! It worked /pretty/ well out of the box. One issue is that
it doesn't seem to obey :eval no for babel blocks. I exported to .Rmd
successfully, but the presentation has a bunch of errors in the code
blocks from trying to actually execute the code. The .Rmd doesn't have
any instances of ```{r eval=F}; could this feature be added?

I'm also getting some odd code highlighting (see attached). Every once
in a while, it's like it can't differentiate non strings (black) from
strings (red)? Any idea why that might be? I still have some
attr_latex stuff to prune out, so perhaps that's gunking up proper
code recognition... then again, any of my latex options shouldn't be
touching the contents of ```{r} chunks, so I'm perplexed.

Other than that and figuring out my plot/image strategy, I think this
will work wonderfully! I won't be able to transition my slides to
Slidify by tomorrow, but am quite hopeful for transitioning in the
future! Love the idea of embedding shiny apps or d3 right in a
presentation vs. having to open a browser :) Also makes it so much
easier to share presentations, embed them in a web page, or whatnot.
No more things like relying on box/dropbox/google drive to have
in-browser PDF displays!

Thanks so much for chiming in -- I'd not seen ox-ravel before and am
really glad to have discovered it!

> HTH,
> Chuck

Attachment: 2014-02-07_233046.png
Description: PNG image

Attachment: 2014-02-07_233122.png
Description: PNG image

reply via email to

[Prev in Thread] Current Thread [Next in Thread]