-
-
Notifications
You must be signed in to change notification settings - Fork 6
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
Wrapping titles and footnotes automatically #46
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Whether we want to indent after wrapping or not is something of an open question, I'd say focus on the wrapping aspect of it for now and we can add the indent if needed once its in.
@gmbecker I could proceed in propagating this in
|
I don't think we can call it
Yes they should wrap to the same width as the rest of the title/footer materials
I'd say we just do it. Do a check after attempted wrapping and if it didn't wrap, and is still too long, just do a blind hard break at the width. |
I encountered a weird case to me: a <- "sub titl e is"
strwrap(a, 4)
[1] "sub" "titl" "e" "is" while I would expect stringi::stri_wrap(a, 4)
[1] "sub" "titl" "e is" Let me know if it is fine for me to add this to the suggests @gmbecker |
Right, so this is related to a note in the docs:
So basically what that means, from what I can tell, is that the Basically we need to do our manual breaks as we're doing now, and then specify width as 1 larger for the purposes of
I'd rather we work around base::strwrap, rather than adding a strong dependency on |
Ok, I did not know about the workaround. It makes perfect sense now. |
@Melkiades please rebase and make any necessary changes for this PR to be compatible with the table_inset functionality I just added I will need to take over this PR and push it over the finish line if it isn't quite there by your EOD tomorrow (ie friday morning/midday US time) |
Signed-off-by: Davide Garolini <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pretty much there, couple of tweaks.
I think we are there. I modified slightly the |
The points to discuss are wether the current implementation:
toString
as it is done in the newly designed tests).rtables
version oftoString
and where it is used)nchar_max
) to do so.checkmate
?) -> Opened an issue for checking inputs and considered extreme cases where words are extremely large in the following comments.