-
-
Notifications
You must be signed in to change notification settings - Fork 872
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 an option for adding subfloat separators #2116
Comments
I'm okay with adding this chunk option, but I may not have enough time to do it. Would you be willing to implement it by yourself and send a pull request? Thanks! Line 38 in c1b6d83
|
I'm time constrained also, but if I find some, I will definitely take a look at it. Not later than in the summer. 😅 Not promising, though. 😉 Thank you for pointing to the place in code. |
I have open a PR with the necessary changes to add such option (#2140); |
…oat environment (#2140) Co-authored-by: Yihui Xie <xie@yihui.name>
@jakubkaczor I just merged @pedropark99's PR, and you may try the dev version now (with the chunk option you proposed, i.e., remotes::install_github('yihui/knitr') |
Oh wait a minute. It turns out that I have already had a chunk option |
I've extended the existing |
Thanks! I tested it and it worked. 😉 |
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. |
Currently, LaTeX code generated for sub floats places them one by one without separation. This results in adjacent images, as well as captions, in the output. It would be very handy to have an option to specify separator. One could write something like
fig.subsep = "\\hfill"
, what would result with something likeHere is an extreme illustration of the problem with the
![image](https://user-images.githubusercontent.com/57760986/160457011-c63af684-a10d-404f-98ea-7f217cc583ab.png)
out.width
set to 30 percent.It would also be useful to specify separators not only in between the sub figures, but also before and after the first one and the last one respectively. This would allow more flexible layouts and centering sub figures in columns. From the interface perspactive, perhaps this could be achieved by passing a vector of separators. Eg.
fig.subsep=c("\\hspace {1 cm}", "\\hfill", "\\hspace {1 cm}")
.By filing an issue to this repo, I promise that
xfun::session_info('knitr')
. 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('yihui/knitr')
.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: