-
-
Notifications
You must be signed in to change notification settings - Fork 878
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
fig.alt cause figure to disappear in word_document #1965
Comments
The knitted document contains some HTML code for the figure
We don't want that for Ideally we would like to generate the markdown syntax that work for docx #1900 (comment) |
Instead of juts fixing this, I would like to try understand better the plot logic. Currently, the plot logic is this:
After that,
This means that the output that will be written in the markdown file by knitr will be very dependent of set of options and formats - it will not be the same for each format. Maybe we could review that for later to something simpler like
For now, we just need to insure that docx output are recognized and markdown is used. |
BTW, this is how Pandoc 2.11.4 is parsing the Image syntax:
❯ echo '![la lune](lalune.jpg "Voyage to the moon")' | pandoc -t json | jq . {
"pandoc-api-version": [
1,
22
],
"meta": {},
"blocks": [
{
"t": "Para",
"c": [
{
"t": "Image",
"c": [
[
"",
[],
[]
],
[
{
"t": "Str",
"c": "la"
},
{
"t": "Space"
},
{
"t": "Str",
"c": "lune"
}
],
[
"lalune.jpg",
"fig:Voyage to the moon"
]
]
}
]
}
]
} And what it is translated to
For DOCX, this in markdown ```r
plot(mtcars)
```
![A plot](test_files/figure-docx/unnamed-chunk-1-1.png "Description") Will lead to having
I post this here for later reference because I looked into it. |
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. |
There is something not currently working as expected because the plot does not show in Word but shows in HTML
On windows
The text was updated successfully, but these errors were encountered: