Comments (9)
The problem comes from extending the css to better handle the table width. There is this issue in the sphinx_rtd_theme repository. I copy the code from a comment fixing the issue, but generating the problem described in this issue:
/* _static/theme_overrides.css */
/* override table width restrictions */
.wy-table-responsive table td, .wy-table-responsive table th {
white-space: normal;
}
.wy-table-responsive {
margin-bottom: 24px;
max-width: 100%;
overflow: visible;
}
# conf.py
html_static_path = ['_static']
html_context = {
'css_files': [
'_static/theme_overrides.css', # overrides for wide tables in RTD theme
],
}
@chrisjsewell The link you posted does not work anymore.
from sphinx-copybutton.
holy moly! that is huge :-) I haven't seen that on the RTD theme before. Do you think you could try using the "master" branch and see if that fixes it? And if so, we can make a new release
from sphinx-copybutton.
Well to add on each code cell that image would enlarge my content of the page drastically ;-)
I've tried the master branch code from https://github.com/choldgraf/sphinx-copybutton/tree/master/sphinx_copybutton
But then no button appears. I've also changed the icon in the conf.py with a smaller one, which helps ,but the location is still wrong.
copybutton_image_path = 'img/copybutton.svg'
Like your css is not taken into consideration. I've also tried adding my own css but this has also no effect:
html_static_path = ['_static']
html_css_files = [
'css/copybutton.css',
]
# or
html_context = {
'cssfiles': ['_static/css/copybutton.css']
}
from sphinx-copybutton.
hmmm - it is strange that no button appears when on master. I just tried out the sphinx_rtd_theme on my local master branch and it worked fine:
I'm not sure how to debug on your side, but you shouldn't need to manually add any extra CSS files yourself...maybe also make sure your Sphinx is updated?
from sphinx-copybutton.
It was my error why the master had no button, I corrected it but got the same error as on the pip install version.
In the mean time I also tried building without any extentions without luck. In the end I got it to work with the external css file.
herafter my conf.py: https://github.com/tschinz/zawiki/blob/master/source/conf.py
Thanks for your help
from sphinx-copybutton.
FYI the RTD theme works fine for me: https://17-145482568-gh.circle-artifacts.com/0/html/intro/get_started.html#quick-installation
from sphinx-copybutton.
@choldgraf Did you have time to look into this issue based on my comment?
from sphinx-copybutton.
I haven't had time - but I am more than happy to review a PR from somebody that both
- Fixes this in the RTD theme
- Doesn't break this in any other Sphinx theme
👍
from sphinx-copybutton.
I don't know why and what has changed, but this problem no longer happens since
- sphinx_rtd_theme 0.5.0
- sphinx_copybutton 0.3.0
Edit: Just to document, that it really works: custom CSS from the issue I mentioned in #69 (comment): https://github.com/swaldhoer/native-lua/blob/a4d4f83fe16f2248b61d62ef740e6492a33869fd/docs/_static/custom.css
and the documentation works fine: https://native-lua.readthedocs.io/en/latest/build.html
from sphinx-copybutton.
Related Issues (20)
- Custom CSS issue HOT 1
- Allow setting `copybutton_prompt_text` for specific codeblocks only HOT 3
- Convert documentation into MyST Markdown
- Update the copybutton image to match GitHub's copybutton style
- Modularize our documentation a bit HOT 1
- Copy button stays put sometimes when other objects shrink its container
- Copy button does not show up for productionlist HOT 1
- issue to store media HOT 1
- Post message after all copy buttons added HOT 3
- Build failed for config doc when importing an extension sphinx_copybutton HOT 4
- Failed build in RTD for extension sphinx-copybutton
- Copybutton disappears too quickly if you click copy then move the cursor off the code cell
- Conflict between regex exclusion/prompt selection and copybutton_exclude HOT 12
- Add Trailing New Line to Clipboard Option HOT 1
- Blank Lines Stripped from code
- Use only one tooltip HOT 2
- newline ignored when using emphasize-lines HOT 1
- Copy button not shown on some pages HOT 3
- Example Not Functional HOT 2
- Add expand button for some block elements HOT 1
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 sphinx-copybutton.