-
Notifications
You must be signed in to change notification settings - Fork 80
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
Reducing the number of ---- printed at the top of skim() #424
Comments
Basically in the console this is an arbitrary length since different people have different settings that may impact display. The whole thing is opinionated. If you are knitting to HTML you could use CSS to manage this. I'd be willing to look at a PR about this although I'm not sure how it would work or what @michaelquinn32 would think ... but the PR should be against the v2 branch since we are winding down V1. Many aspects of printing have been changed in V2. |
I'm happy to update to V2 if this is more easily tweaked there. I'll test it out in the meantime. |
Maybe adding Line 35 in c4d573c
Then |
I looked at this and cli::rule() does not have a We also spent quite a bit of time with @jenniferthompson who as one of our peer reviewers at ROpenSci talking about the layout , and that is how we came up with the design we have currently. Now that v2 will be simplifying the printing substantially I'm wondering if it's better to think about a larger project that allows more customization in the print methods for those who want to do that. I can think of a few different things people might want to do if they are using skimr in specific situations (for example thousands of variables or creating data tables for journals that have specific styles). |
I’m trying to get the output to work nicely in bookdown. Currently when printing to PDF with the console output it prints all the way into the right hand margin. |
My guess is that having knit_print methods in v2 should make this problem
go away. I don't think it will be very fun to try and deal with special cli
cases in non-cli environments.
…On Mon, Apr 1, 2019 at 10:30 AM Chester Ismay ***@***.***> wrote:
I’m trying to get the output to work nicely in bookdown. Currently when
printing to PDF with the console output it prints all the way into the
right hand margin. skimr::kable() doesn’t work exactly how’d I’d like
either with bookdown. I can work on a quick fix solution in a fork if
that’s easier.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#424 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/ADUCAfLPSiynv1rKMvml68iydOuUrxoDks5vckIngaJpZM4cJMID>
.
--
Best wishes,
Michael
Cell: (917) 808 6508
|
I do think it will be better in v2 but I also think we need to really look at margin handling in knitr when there are many statistics. One big reason for people to use pander is the nice table wrapping, including repeating the row labels. |
If anything that should wrap to be above the second part of the table. We really ultimately need to think about the row splitting issue more carefully although it's kind of a big job. What I might do in v2 is to make a given table a bit more bespoke and take the type table and split it into pieces deliberately. |
See #473 |
So is the basic goal this? |
How about an option to just turn off the hyphens with a parameter? Those that have had issues with it could just switch it off as needed. ModernDive has been published to print using modified output to remove the hyphens, so I’m not as keen on figuring out a solution here given it was six months ago when I opened this and we had to decide how to work with the output. Feel free to keep this closed if you like. |
So interestingly cli::rule() has a width option that defaults to the base::options() value. For bookdown specifically it would probably make sense to set this globally. |
I don't think I was clear enough but this was what I was trying to say in the comment above: #424 (comment) |
Right but we can't arbitrarily add an option to a function from another package. That breaks the rules on inheritance. The other idea I have is to have an option for printing with no rules at all. I think that makes sense in the context of html and pdf now that we are using |
Okay here is a pull request. |
Is there a way to reduce the number of
────────
that appear to be more like the following instead of what is shown at https://github.com/ropensci/skimr/blob/master/README.md#presentation-is-in-a-compact-horizontal-format?The text was updated successfully, but these errors were encountered: