Comments (7)
I don't know much about HTML, but I was able to easily edit the output of Sphinx to get what I want. I only had to change the SVG height to auto and the width to a custom value. Would it be possible to set image dimensions from the reST directive for live-rendered plots? It seems like it would probably be pretty straightforward.
from sphinx-wavedrom.
Hi,
- I'll try to take a look at this still this week. I'm a bit swamped at the moment though, so can't promise much. Any concrete input from your trials would be welcome (the actual html changes you made, the actual diagram if you're allowed to share it) and could speed things up.
- As for the wavedrompy part, I'm sure @wallento would be interested in the different behaviour you noticed (maybe in an issue in the wavedrompy project, not here 😄 ) Getting the wavedrom-cli tool integrated would also be cool, but I don't see that happening short-term
from sphinx-wavedrom.
I did some research. It looks like it's not really possible to change the scale when live-rendering. The image tag doesn't exist until the JS runs, and Wavedrom does not have the ability to set the width or height of the output from javascript. You get what you get.
However, the wavedrom-cli
is dead simple to use. I think that is the best path going forward. It's not a Python dependency, but it's not difficult to install. I appreciate what @wallento has done with wavedrompy
, but I don't know that it makes sense to maintain an entirely independent rendering engine when wavedrom-cli
exists. It makes the system Python-only, but it comes at the cost of a significant maintenance burden. He even mentions in the code for wavedrompy
# Originally translated to Python from original file
# Now many parts have been rewritten and diverged
We've already seen that it has become out of date as Wavedrom has evolved.
I think I can add support for the wavedrom-cli
fairly easily. Would you accept a PR? I don't think we need to install it for the user though. I think we can just provide instructions on how to install it manually in the README. Do you like that approach?
from sphinx-wavedrom.
By the way, right now wavedrom-cli
can only write to and read from files. You can't pipe data to or from it. In the first iteration of wavedrom-cli
support, I would use temporary files. But I would also like to make a PR to wavedrom-cli
to add support for piping. It used to support piping, but something about the interface was changed, and support was dropped. I think it will be easy to add it back though.
from sphinx-wavedrom.
I think I can add support for the wavedrom-cli fairly easily. Would you accept a PR?
I'd absolutely welcome such a PR.
I don't think we need to install it for the user though.
Agreed. I think we can assume that the user has installed it and the executable is in the path. We can indeed link to the installation instructions in the README
In the first iteration of wavedrom-cli support, I would use temporary file
I'm fairly sure that's also how the plantuml sphinx plugin works. Seems like a good start to me!
from sphinx-wavedrom.
For clarity, could you close this issue and open a separate one for the wavedrom-cli integration?
from sphinx-wavedrom.
Sure. See #23.
from sphinx-wavedrom.
Related Issues (20)
- Make the wavedrom link configurable HOT 10
- Support for bit fields HOT 4
- Followup of #12: Fix wavedrom build in CI HOT 1
- No tag with id="pmx" found HOT 3
- Graph is not drawing without name HOT 2
- Unable to install: Issues in installing cairo dependency HOT 4
- Plugin does not work in combination with hieroglyph HOT 2
- Latest Wavedrom release (v2.0.0) broken with Sphinx v3.0 HOT 6
- Add support for the wavedrom CLI HOT 8
- Consider adding the sphinx-extension GitHub topic HOT 1
- Release HOT 2
- Fall back to wavedrompy, or give more helpful error message HOT 4
- Question: What is the 'xcffib' dependency used for HOT 5
- Python3.10 issue: ImportError: cannot import name 'Mapping' from 'collections' HOT 8
- Can this extension be marked parallel read and/or write safe? HOT 4
- wavedrom not working with make latexpdf HOT 6
- Relative paths for wavedrom-cli HOT 2
- Feature request - support .yaml files as well as .json files for input HOT 2
- Projects with sphinxcontrib.wavedrom extension fail to build on Mac with M2 chip HOT 4
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-wavedrom.