图像和文本并排Rstudio演示文稿/ .rpres [英] image and text side by side Rstudio presentation / .rpres

查看:294
本文介绍了图像和文本并排Rstudio演示文稿/ .rpres的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想实现的基本布局,99%的演示文稿使用幻灯片标题下面的文本,然后一个图像下面的文字到它的一边。显然,这是一个非常困难的任务,在rstudio演示文稿(



这是我到目前为止所尝试的:

 标题
====== ============================
incremental:false

< font color = darkred>
其他文字在这里< / font>

< div align =center>
< img src =fake.png>
< / div>

***

< p>& nbsp;< / p>
< p>& nbsp;< / p>


- 文本在这里
- 文本在这里
- 文本在这里

这显然产生了一个荒谬的结果:





当前输出问题:




  • 下面的标题和文字太近

  • 文字下面的标题太靠左(与标题对应)

  • 图片也应与标题对齐



这是我尝试解决这些问题:

 标题
=== ===============================
incremental:false

< p>& nbsp;< / p>

< div style =margin-left:1em;>
< font color =darkred>
其他文字在这里< / font>
< / div>

< p>& nbsp;< / p>


< div align =center>
< img src =fake.png>
< / div>

***

< p>& nbsp;< / p>
< p>& nbsp;< / p>
< p>& nbsp;< / p>


- 文本在这里
- 文本在这里
- 文本在这里

我尝试了

 < div style =padding:10px;> ; 
< font color =darkred>
其他文字在这里< / font>
< / div>

这两个都没有做任何事,我试图搞砸css并添加以下内容:

 < style> 
p {
text-indent:240px;
}
< / style>

这产生了以下内容:



a href =https://i.stack.imgur.com/wbDen.png =nofollow noreferrer>



但一些主要问题仍然存在:




  • 这改变了我的双方的标题 - 我不能这样。我尝试将 p 更改为相应的标题标签 h5 (第5页)
  • 图片不完美对齐

  • 我想减少空格b / w标题和文字下面我知道我可以删除< p>& nbsp;< / p> ,但间距过近(如第一张图片所示)。



我对html和css的了解是没有什么,所以感谢与我的关系。我只是不相信,幻灯片放映的最基本的功能是一些如何从Rstudio的典型格式的演示文稿(图像与文本上面和相邻) - 显然我必须缺少的东西。任何帮助是非常赞赏。



哦和两个最后一点 - 当我转到实际的幻灯片,它出现了我想要的(如果我已经摆脱间距和CSS样式)可能小于1秒或2(而它的渲染)。此外,我想我会检查Rpubs只是为了检查我的理智 - 假设有一些项目的这种布局。我经历了也许30个不同的演示文稿和1)演示文稿没有一个布局幻灯片我想要的形式(他们的2/3)和剩下的演示文稿,有一个布局都遭受完全相同的问题,我。每个单一的演示文稿,像这样的格式,看起来绝对可怕的像上面的图像。我想Rstudio的好人比使用Rstudio演示文稿格式更合理的幻灯片使用选择更重要的工具,这是绝对精细。不幸的是,slidingify是一个噩梦在发展的炼狱,beamer的模板是非常神秘的看,我不能找到一个ioslide项目的一个例子在互联网上,所以我甚至没有打扰那个兔子洞。我对其他演示文稿格式的建议,可以与R使用,否则我卡住了我的R输出和代码的屏幕截图上传到一个powerpoint(**** cringe ****)。谢谢。

解决方案

我似乎找到了一个解决方案。在我上面发布的示例中,我正在Rstudio的查看器中以及在我的Safari浏览器中检查地块。两者产生相同的结果,但我决定给它一个与Chrome和Firefox和它们都生成相同的漂亮外观格式。我想Rstudio演示文稿的格式是浏览器依赖 - 也许不奇怪,因为我看到不同的浏览器推荐不同的网站/用途,但我没有看到任何关于记录在Rstudio的帮助论坛。





更新:我刚刚仔细检查了Rstudio的文档,看起来像他们说chrome,firefox,和safari 都是



更新2: strong>我刚刚发现浏览器输出之间的另一个差异。当我进入全屏模式(使用键 F )在一切正常预期和在Safari一切看起来像它在非全屏幕。但是,在Chrome全屏模式下,标题幻灯片后面的所有幻灯片的背景颜色都呈现为黑色。这一点已在



我很抱歉。我只是要牺牲任何后续的障碍,我面对的不是特定于firefox,因为我在浏览器运行低,我会移动到powerpoint,然后在我的电脑上安装IE。


I'm trying to achieve the basic layout that 99% of presentations use where a slide has a title some text below that and then an image below that with text to its side. Apparently, this is a very difficult task to accomplish in rstudio presentations (the link here was no help). How do I go about doing it? Below is what I'm looking for (made in powerpoint):

Here's what I've tried thus far:

Title
====================================
incremental: false

<font color = "darkred">
 Additional Text Goes Here</font>

<div align="center">
<img src="fake.png">
</div>

***

<p>&nbsp;</p>
<p>&nbsp;</p>


- Text goes here
- Text goes here
- Text goes here

Which clearly produces a ridiculous outcome:

Problems with the current output:

  • Title and text below it are too close
  • Text below title too far to left (should align with title)
  • Image should also align with title

Here's my attempt at addressing those issues:

Title
====================================
incremental: false

<p>&nbsp;</p>

<div style="margin-left: 1em;">
<font color = "darkred">
 Additional Text Goes Here</font>
</div>

<p>&nbsp;</p>


<div align="center">
<img src="fake.png">
</div>

***

<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>


- Text goes here
- Text goes here
- Text goes here

And I tried

<div style="padding: 10px;">
<font color = "darkred">
 Additional Text Goes Here</font>
</div>

Both of those did nothing, I tried messing around with the css and added the following:

<style>
p {
    text-indent: 240px;
}
</style>

Which produced the following:

But some major problems persist:

  • This changed the title for all my sides -I cant have that. I tried changing the p to the appropriate header lable h5 (5th page) but that did nothing.
  • The image isn't perfectly aligned
  • I'd like to reduce the space b/w the title and the text below I know I can remove <p>&nbsp;</p> but then the spacing is too close (like in the first image)

My knowledge of html and css is next to nothing so thanks for bearing with me. I simply in disbelief that the most basic feature of slide shows is some how missing from Rstudio's quintessential format of presentations (images with text above and adjacent) -clearly I must be missing something. Any help is much appreciated.

Oh and two final points -when I turn to the actual slide it appears exactly how I want it (if I've gotten rid of the spacing and css styles) for perhaps less than a second or 2 (while its rendering). Also, I thought I'd check Rpubs just to check my sanity -assuming there would be tones of projects with this layout on there. I went through maybe 30 different presentations and either 1) the presentation did not have a layout slide in the form I desire (2/3rds of them) and the remaining presentations that did have a layout all were suffering from the exact same problem I am. Every single presentation with a format like that look absolutely terrible like the images above. I guess the good folks at Rstudio are busier with more important tools than making Rstudio presentation format a reasonable choice of slideshow to use, which is absolutely fine. Unfortunately, slidify is a nightmare in developmental purgatory, beamer's templates are very arcane looking, and I cant find a single example of an ioslide project on the internet so I didn't even bother going down that rabbit hole. I'm open to suggestions of other presentations formats that can be used with R otherwise I'm stuck taking screenshots of my R output and code to to upload to a powerpoint (****cringe****). Thanks.

解决方案

I seem to have found a "solution". In the examples I posted above I was examining the plots in Rstudio's Viewer as well as in my Safari browser. Both produced identical results but I decided to give it a go with Chrome and Firefox and they both produced the same nice looking format. I guess Rstudio presentation's formats are browser dependent -perhaps not surprising as I've seen different browsers recommended for different sites/uses but I did not see anything in regards to that documented on Rstudio's help forum.

UPDATE: I just double checked the documentation for Rstudio and it looks like they say chrome, firefox, ie, and safari are supported.

UPDATE 2: I just spotted another discrepancy between the browser outputs. When I go into full screen mode (using the key F) in Firefox everything is fine as expected and in Safari everything looks as it does in non-full screen. In Chrome fullscreen, however, the background color of the all the slides following the title slide are rendered black. This has been noted elsewhere too.

I'm baffled. I just have to prey that any subsequent obstacles I face aren't specific to firefox since I'm running low on browsers and I'll move to powerpoint before installing IE on my computer.

这篇关于图像和文本并排Rstudio演示文稿/ .rpres的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆