ramnathv / slidify

Generate reproducible html5 slides from R markdown
http://www.slidify.org
844 stars 338 forks source link

probably a very simple thing I'm missing, and yet... #88

Closed marciopie closed 11 years ago

marciopie commented 12 years ago

Ok, I just started playing with slidify, so bear with me on this.

I just installed the latest versions of slidify, knitr, whisker and markdown on RStudio 0.96.330. I wrote a very simple markdown file, something like this: "

First slide

some text

some more text

" Then, if I use:

slidify("test.md")

it'll generate another md file. Shouldn't it generate an html5 file?

Also, if I use:

slidify("aula1.md", framework = "deck.js")

it will give me this:

unused argument(s) (framework = "deck.js")

any suggestions?

ramnathv commented 12 years ago

Two suggestions. One, slidify excepts the input file to have the extension Rmd. Two, you need to pass the framework within an options list slidify('aula1.Rmd', options = list(framework = 'deck.js'))

marciopie commented 12 years ago

Thanks!

Those 2 issues seem to have been solved, but I'm getting this error message:

Error in mapply(function(i, j) doc[i:j], begin, end, SIMPLIFY = FALSE) : Zero-length inputs cannot be mixed with those of non-zero length

ramnathv commented 12 years ago

This error usually occurs when you have not used a slide separator correctly. Make sure you have a --- followed by a newline separating your slides. If you can post your Rmd file as a gist, I could take a look.

marciopie commented 12 years ago

Beautiful! It works!

I just got a few more potential glitches:

slidify works perfectly if I only use the default settings, like:

slidify('test.Rmd')

but if I use:

slidify('test.Rmd', options = list(framework = 'shower'))

Error in file(con, "r") : cannot open the connection In addition: Warning message: In file(con, "r") : cannot open file 'assets/templates/slide.tpl': No such file or directory

The other issue has to do with rpubs. If I use:

slidify('test.Rmd', options = list(embed = TRUE)) rpubsUpload('My First Presentation', 'test.html')

I get:

$id [1] "https://api.rpubs.com/api/v1/document/1325/e25a1d63d742481f9703fc19793091e0"

$continueUrl [1] "http://rpubs.com/publish/claim/1325/a93c63de56d64f6bad79fe16aa19ca06"

but nothing appears on rpubs. In addition, exactly the same file that gives me a perfect deck, if I use embed = TRUE returns an empty html.

Thanks so much for your help.

ramnathv commented 12 years ago

I made a few changes that broke some frameworks. For now, only deck.js and htm5slides will work. I am working on a brand new version of slidify with several cool features and once I have that ready, I will push changes to github. Given that it is almost a complete rewrite, it will take some time before I push it here. If you would like to use shower just let me know and I can push a patch in a different branch.

I suspect that the issue is due to a small bug. Whenever you run slidify it creates a folder called assets/templates. When you are changing frameworks, delete this folder since currently it is not rewritten. I will push a fix for this, but for now you will have to do this manually.

Let me know how it turns out.

marciopie commented 12 years ago

Wrt the frameworks, don't worry. deck.js and htm5slides are more than enough at this point, so I really don't mind waiting for the new version of slidify.

OTOH, any hints about the rpubs issue? the possibility of posting decks on the fly would be really useful at this point.

ramnathv commented 12 years ago

Can you post test.html as a gist so that I can take a look at what is produced? It should be pretty straightforward to resolve the issue then.

On second thoughts, I think I know what the issue could have been. When publishing to RPubs, I serve all required CSS and JS files from the GoogleCode repository for slidify, which I hadn't updated in quite a while. I just pushed the stable version of slidify to GoogleCode, so your Rpubs file should work.

Let me know if the issue still persists.

ramnathv commented 12 years ago

Did you manage to resolve this?

ramnathv commented 11 years ago

I am closing this issue. A new version of Slidify should be available in a few days and will fix most of the problems you indicated here. Post another issue if you still have trouble.