Comments (6)
hey @vepain! thanks for your input! I am not sure about this. Wouldn't this be something that is configured by the sphinx template that you use? you could add some custom css, here is an example: https://docs.readthedocs.io/en/stable/guides/adding-custom-css.html
from autodocsumm.
Thank you @Chilipp for your answer!
It seems that only a few customisations are allowed by furo
theme (see https://pradyunsg.me/furo/customisation/).
Moreover, it seems that tables are centered by default by Sphinx, and I can't find a way to align local table not by default (see sphinx-doc/sphinx#4550)
In the html source file, the tables produced by .. autosummary::
directive are under the following class:
<table class="autosummary longtable docutils align-default">
...
</table>
Here the align-default
key seems to be the issue.
Why not allow for one .. autosummary::
directive detail the table alignment like this?
.. autosummary::
:alig: left
...
that would produce something like this:
<table class="autosummary longtable docutils align-left">
...
</table>
I don't have enough CSS and HTML knowledge, so perhaps I miss some points.
The idea is not to change the align-default
(that will change all the alignment globally).
And even though I wanted to do this, I can't find in Sphinx doc a way to change the default table alignment.
Thank you for your help!
from autodocsumm.
Sorry for the second message,
I find https://docutils.sourceforge.io/docs/ref/rst/directives.html#tables where the directive .. table::
has the option :align: left
(e.g.)
Why not get inspired of that for the table generation of .. autosummary::
directive?
from autodocsumm.
the problem here @vepain is that the .. autosummary
directive that is used here does not come from the autodocsumm
extension. it is coming from the builtin sphinx extension autosummary
. autodocsumm
is just using this directive. So if you want to change anything on the underlying autosummary
directive, you'd need to head over to the main sphinx repo at https://github.com/sphinx-doc/sphinx/ and open an issue there. When this option is implemented, in autosummary
, we can add an additional option here
from autodocsumm.
my suggestion would have been to add a custom css file
html_css_files = [
'css/custom.css',
]
and then in custom.css
have something like
table.autosummary {
/** add some alignment css here **/
}
from autodocsumm.
My bad, I confused your extension with the sphinx builtin.
Thank you for your help, I will write an issue at the right place...
Have a nice day!
from autodocsumm.
Related Issues (20)
- 0.2.4: problematic dependencies definition HOT 3
- get_documenters is deprecated in Sphinx 5
- 0.2.5: sphinx warnings HOT 2
- 0.2.5: pytest warnings HOT 2
- Type annotations are not rendered properly HOT 4
- Missing upper bound on sphinx version for `autodocsumm==2.2.x` HOT 1
- No links to items in summary tables when using __init__.py imports HOT 5
- Some way to put documentation on separate pages like sphinx.ext.autosummary HOT 8
- Reference target not found in specific cases HOT 6
- Alias Expands Nested Class Documentation HOT 1
- 0.2.8: sphinx is failing and some refferences warnings HOT 2
- 0.2.8: pytest warnings HOT 1
- Remove attributes for enums
- Sphinx 5 support
- Estimated date for 0.2.9 release? HOT 3
- Sphinx `ObjectMember`-related deprecations HOT 3
- Sorting sections in the summary HOT 5
- Possible dependency mismatch between Conda and PyPI packages HOT 2
- Surprising effect on attribute documentation
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from autodocsumm.