-
-
Notifications
You must be signed in to change notification settings - Fork 982
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add alt text to images added to Ppt via rmarkdown #2106
Comments
Source:
|
Just for context for me later, there are several things in this issue. This markdown syntax ![This should be alt text and not caption](https://upload.wikimedia.org/wikipedia/commons/9/94/Puffin_Mrkoww.jpg) will be processed by Pandoc and not knitr or rmarkdown directly. So better support for alt text in the Markdown syntax is something to do on the Pandoc side. Doc about the syntax is here: https://pandoc.org/MANUAL.html#images
But
So I have looked into this while working on adding With DOCX, the syntax would work (in some way) - see yihui/knitr#1965 (comment)
Oddly we don't get that with PPTX and I think you've found a new bug in Pandoc @apreshill ! It should at least be the same as with DOCX. I'll report that to Pandoc repo maybe. Also I am curious about using |
Thank you for filing that issue @cderv! |
I tried the syntax I did because JJ told me to try:
|
Just to share that this will be taken into account in Pandoc. It has already been merged (see the issue in pandoc repo) and it will be available in a future Pandoc version. |
Here is the PR: jgm/pandoc#7507 |
Since Pandoc 2.14.2, It is now possible to pass a description text to inlucde in Powerpoint using the Title part of the syntax
So with original example this should be ---
title: "Making presentations in R"
author: "jsg"
date: "3/29/2021"
output:
powerpoint_presentation
---
## Issue example: Puffin image
![This is the caption](https://upload.wikimedia.org/wikipedia/commons/9/94/Puffin_Mrkoww.jpg "And here is more information in description") This require a recent Pandoc which is included in RStudio current Daily version, and will be in next release. Thanks for opening this issue! |
This old thread has been automatically locked. If you think you have found something related to this, please open a new issue by following the issue guide (https://yihui.org/issue/), and link to this old issue if necessary. |
When using rmarkdown to add images to PowerPoint files, the alt text designation in the image tag becomes the title/caption. If using a web-based image, the url becomes the alt text. This isn't optimal for screen readers (the main reason I'm trying to add alt text to the images) (see answer provided to question on stackoverflow by Josh: https://stackoverflow.com/questions/66959628/how-do-you-add-alt-text-for-accessibility-to-images-in-powerpoint-files-create). Is it possible to update the code so the alt text truly becomes alt text and the caption is handled elsewhere (like a fig.cap argument)?
Example of issue:
By filing an issue to this repo, I promise that
xfun::session_info('rmarkdown')
. I have upgraded all my packages to their latest versions (e.g., R, RStudio, and R packages), and also tried the development version:remotes::install_github('rstudio/rmarkdown')
.I understand that my issue may be closed if I don't fulfill my promises.
The text was updated successfully, but these errors were encountered: