-
-
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
Figure Captions with Multiple Figures and echo=FALSE Does not Print the Caption #1524
Comments
On further looking, this has been previously reported: https://groups.google.com/forum/#!topic/knitr/MJVLiVyGCro If there were a way to make this fix automatic, that would be beneficial. If not, perhaps it could be documented in more detail. |
As a followup thought: Perhaps a simple knit_print method doing similar to the following would fix the issue. Since it has caused confusion for about 4 years (given the Google groups thread), it will probably continue to cause problems in the future, too.
And then doing similar for base graphics and lattice so that they all use the same method. The real method would probably need to be more complex, but hopefully this general idea could help. |
@billdenney thanks for the solution |
@yihui I am not sure how to classify this one. Currently, for LaTeX output when there is caption, we add a space after the markdown syntax so that it is not seen by Pandoc as a inline image. Line 61 in a38d783
![cap](img/path) However, when there are several images in the same chunk and
This leads to no caption by Pandoc as seen as inline images. This does not happen when This also happens with HTML output also. Should we consider the addition of I am not sure of the potential effect of such change. |
Oh great thanks @atusy ! I am going though old issues to make some triage and know what is in the backlog before looking at the PR. Aim is to match when possible! And you've just help me. Thank you! I'll link these 2 so that we remember it will close. |
When printing multiple figures per chunk (and maybe in other scenarios with multiple outputs per chunk), figure captions do not show up unless extra line breaks are inserted between them. In the example below, the first and third chunks caption as expected, but the second does not. (This is similar to #820, but it still appears to be an issue.)
The text was updated successfully, but these errors were encountered: