9 Comments
Guest *pat-s* @ 2019-02-21 08:34:12 originally posted:
Oh wow, this sounds great. Can't wait to test it!
Guest *Aaron Simumba* @ 2019-02-21 11:14:09 originally posted:
Another outstanding delivery Yihui! I can't wait to test the new features.
Guest *Romain Lesur* @ 2019-02-22 01:57:26 originally posted:
This is absolutely awesome!
This reminds me this old unanswered SO question.
When I discovered the remarkable scrolling feature, I wondered whether it can be implemented in R Markdown. The remarkable implementation is not too complex, but I cannot figure out how to do the trick.
As I mentioned in the post, the key challenge is to establish the map between source lines and output. One way to do it for general HTML output formats is to add special markers as HTML comments to the Rmd source, e.g., <!-- data-line=1 -->A paragraph. The comments will be preserved in the HTML output. Then we can search these for markers as we scroll in the source. The tricky thing here is to make sure not to add such comments to verbatim code blocks.
A less precise way is to "flatten" the source lines by removing any formatting, and match pure text in the HTML output (element.innerText). Or only match section headers, which might be enough.
Anyway, this is certainly trickier than the case of slides, so I only tackled the easier task.
Originally posted on 2019-02-22 03:36:54
Guest *Obryan Poyser* @ 2019-02-22 15:20:12 originally posted:
Nice work!!!
Guest *Evil Mammoth* @ 2019-02-23 23:09:18 originally posted:
This looks fantastic! Been meaning to check out xaringan, and this was the push I needed.
For some reason, I can't get the live preview to work. I have the RStudio Preview installed and set options(servr.interval = 0.5) before running inf_mr(). The slides re-render only when I save the .Rmd document. I'm on Windows 10 Pro.
Guest *Evil Mammoth* @ 2019-02-23 23:13:18 originally posted:
... okay, so not two minutes later, I deleted all existing text and started entering my slide content. Live preview started to work. Awesome! Thank you again.
Guest *Pablo Cabrera* @ 2019-02-26 16:16:09 originally posted:
Hi Yihui. Thanks very much for this developement, it is quite useful. I'm trying to use the infinite add in in R-studio with Windows and I get this error:
Error in server_config(dir, ..., baseurl = baseurl) :
unused argument (ws_handler = pkg_resource("js", "ws-handler.js"))
I'm sorry if this is very basic but I'm new and I have been looking for a solution for two days with no luck. Thanks in advance. Pablo.
That means the servr package was not successfully installed from Github. In theory, remotes::install_github() should take care of that. I don't know why it failed. Anyway, please restart R and try remotes::install_github('yihui/xaringan', upgrade = TRUE) again. If it still fails, try remotes::install_github('yihui/servr') and restart R.
Originally posted on 2019-02-26 16:23:54
Guest *Pablo Cabrera* @ 2019-02-26 16:51:08 originally posted:
That was the problem, I had to reinstall servr. Thanks very much, very appreciated.
Guest *Danilo Freire* @ 2019-03-03 18:54:42 originally posted:
Wow, this is fantastic! I can confirm it works very well on macOS. Many thanks!
Guest *Liechi Zhang* @ 2019-05-10 03:57:19 originally posted:
Hi, I am just wondering whether it is possible (or a good idea) to implement this magic to blogdown (or bookdown)? I think it might be quite useful for revising posts (or book chapters) locally on RStudio.
Added 3 min later:
I just saw the comment from Romain Lesur. I think we basically talked about the same thing. And now I understand it is not an easy thing to achieve.
For blogdown, yes, the live-preview can be lightening fast if you use the method mentioned here: https://bit.ly/2018-blogdown#20 (full documentation: https://bookdown.org/yihui/blogdown/livereload.html ).
For bookdown, it cannot be so fast, but it shouldn't be too bad: https://bookdown.org/yihui/bookdown/serve-the-book.html
Originally posted on 2019-05-10 04:14:34
Guest *Liechi Zhang* @ 2019-05-10 04:42:37 originally posted:
That's great!
You're right, these two options in blogdown are definitely worth $580 out of $600 : ). Thanks a lot for the great design and sharing. I am not a heavy bookdown user, but I will try it to write my work note.
Guest *Michael Caselli* @ 2019-09-09 14:42:29 originally posted:
In the ~7 months since this post, have these new features made it into RStudio or xaringan releases? Or are preview distributions still required?
The newer version of xaringan has been on CRAN for a few months.
For RStudio, it depends on whether you currently have problems with previewing slides on Windows. If not, you can stay with your current version of RStudio.
Originally posted on 2019-09-10 03:05:26
Sign in to join the discussion
Sign in with GitHub