-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Add large table example #61
Conversation
doc/showcase/tables.rst
Outdated
----------- | ||
|
||
.. csv-table:: A wide table | ||
:header: Label,Parameter1,Parameter2,Parameter3,Parameter4,Measure1,Measure2,Measure3,Measure4 |
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.
:header: Label,Parameter1,Parameter2,Parameter3,Parameter4,Measure1,Measure2,Measure3,Measure4 | |
:header: Label,Parameter1,Parameter2,Parameter3,Parameter4,Measure1,Measure2,Measure3 |
Or did you want to add another column of data?
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.
Changed it accordingly
doc/showcase/tables.rst
Outdated
Some fancy name5,fifth linear classifier,dancing,denoised,emotional,0.4,0.6,9.37 | ||
Some fancy name6,sixth linear classifier,sliding,noisy,emotional,0.8,0.6,4.32 | ||
Some fancy name7,seventh linear classifier,walking,denoised,non emotional,0.9,0.6,2.12 | ||
Some fancy name8,eights linear classifier,diving,noisy,emotional,0.2,0.4,4.32 |
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.
Some fancy name8,eights linear classifier,diving,noisy,emotional,0.2,0.4,4.32 | |
Some fancy name8,eighth linear classifier,diving,noisy,emotional,0.2,0.4,4.32 |
That's a strange word, but according to some online dictionaries it's spelled with "h" in the end.
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.
Changed it accordingly
I agree that the scrollbar should be immediately below the table. It looks like plain Sphinx doesn't allow that, but Strangely, this manipulation seems to be done on RTD even if I think we could insert our own CSS class in a similar way, but if possible, I would prefer a solution that doesn't need JavaScript. BTW, there seem to be multiple table-related issues: |
Does the theme support changing the width of a specific page to accommodate a wider table without the scrollbar? |
I guess at the moment not. There is a way to do this, I implemented a solution where you have to provide the page names you want to have as wide pages to a config option, see https://audeering.github.io/sphinx-audeering-theme/example-wide-pages.html But it's not the most elegant solution. |
No, not explicitly. And I'm not sure if it's a good idea to add such an option, because if we do that, we might as well provide every option for specific pages, which will quickly become confusing. Also, I'm not even sure if making the page wider is actually a good solution. Regarding work-arounds: to make a single page wider, you don't really need the support of the theme, you can just include something like this in the reST code of the page: .. raw:: html
<style>
div.body {
max-width: 1600px;
}
</style> |
@hagenw and @mgeier thank you for detailed answers, tips, and comments. I got a lot of inspiration checking https://insipid-sphinx-theme.readthedocs.io/en/0.2.8/ and your repositories. |
I've just created #66 which implements wrapping tables into I've also applied the same thing to images, because I think they should behave the same way. |
This adds a large table to the table example.
I'm not sure if we really need this for documentation purposes, but it is helpful for testing how the theme can cope with it.
It can test basically two things:
For 1. the behavoir is better than expected. Usually I like when every second row is using a different color, like in the RTD tables.
But I also like the insipid approach which looks much better when using with
autosummary
.For 2. the current behavior is to display a scroll bar at the end of the page, which could have the disadvantage that the user will not find it. So maybe it would be better if the scrollbar would be immediatly below the table and would only scroll the table.