I create powerpoint files using the R package Officer. I would like to make the files accessible by adding alt-text to each slide, and ideally to different parts of each slide. I know how to add alt-text using Rmarkdown when creating word documents, etc. but don't know if it is possible with Officer. I would like to use the Officer package because of the control it provides in placing content, etc.
Is it possible to add alt-text with Officer?
Related
I created a website using bookdown package and I have a nice table of content on the left, which is fine.
But now I would like to add the same table of content in a separate chapter (while keeping the toc on the left). I am looking to something somehow similar to what I can do in Latex when using \tableofcontent and be able to put the table of content whenever I want in any section. Is there a simple way to do so, without having to manually copy paste content from the html output?
Maybe I am not using the right keywords but I can't find any suggestions on how to do it.
I am attempting to render a powerpoint presentation from rmarkdown.
I downloaded this powerpoint template and associated files from sol-eng and am able to generate the powerpoint as is.
However, if I open the template and do
view -> slide master
and adjust any of the slide master (i.e. change the background color)
close slide master -> save
I get the error "The file may be damaged or it may have been created in a pre-release version of PowerPoint." when I attempt to render the powerpoint.
I am unclear why using the template as is vs changing the background would generate an error in making the powerpoint presentation.
Any suggestions would be helpful:)
it might be that R writes binary differently than Powerpoint. Is it possible to create a ioslide or beamer slide file with the original powerpoint file instead? If you do IOSlides or beamer, the view with only need a web browser and could be a more flexible file for presentation
I used a different computer/version of powerpoint; adjusted the master slide and now it works - still unsure why I couldn't adjust with my version of powerpoint so I am guessing some versioning issue.
I am trying to make a "accessible" or 508 compliant PDF using R markdown. To do this I need to have pdf tags attached to figure that provide alternative text. I also need to be able to add tags to section headers etc.
The idea is if you open the pdf in a pdf viewer that then the tags are read in in the "table of context" and allow a user to move between sections.
If you use a markdown header like
# header
R markdown seems to add a label to this so it appear in the table of context. I would like to be able to add these kind of labels manually as well.
Does anyone have any ideas of how to do this?
You should be able to achieve this using pandoc formatting (see http://pandoc.org/MANUAL.html), for example the alt text for an image can be specified as ![alt text or image title](path/to/image)
When I create plots within a single chunk of an R-Studio markdown file, they appear in a nice array with clickable thumbnails:
However, when I publish as an HTML file, these figures are simply displayed vertically, one after the other. Is there any way to achieve the way that it originally looks in RStudio?
Unfortunately there's no way to output what RStudio shows you, but you can do this and a lot of other HTML formatting yourself using the knitrBootstrap package.
Check out the end of this example for a clickable-thumbnail example.
I've been looking into using blogdown for my existing Hugo blog and I think I've narrowed it down to one shortcoming. I'm using the .Rmarkdown file extension because I want to use the Blackfriday markdown processor to take advantage of Hugo features.
Among those is a customization I've added to my theme, which takes any image embedded with the built-in shortcode uses PhotoSwipe to make them appear in a lightbox on click. I've made it so that anything using the {{< figure >}} shortcode does this.
Is it possible either via blogdown or knitr (assuming knitr is part of the process of rendering the Rmarkdown) to customize the output of plots so they are wrapped in the shortcode rather than HTML tags? I think it might even be possible to do this with Go/Blackfriday if I could at least get the plots to be formatted in Markdown ![](/path/to/img.jpg), if that would somehow be easier.
There are two ways: either redefine the plot hook of knitr (requires more knowledge about knitr), or use the following trick:
```{r cars-plot, fig.show='hide'}
plot(cars)
```
{{< figure src="`r knitr::fig_chunk('cars-plot', 'png')`" >}}
In the above example, the plot was generated but hidden in the chunk output (fig.show='hide'; if you want hide the whole code chunk, use include=FALSE). Then its path is retrieved via the function knitr::fig_chunk() and inserted in the figure shortcode.