-
Notifications
You must be signed in to change notification settings - Fork 75
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
Multiple Cell Rendering #1004
Comments
@ashra-academy could you elaborate on your question? It's not clear to me what you're asking to do, or why you need to do it, so I am not particularly able to help :/ |
Hii @agoose77. Thaanks for reply. I'm trying to render a page with multiple code and md cells like Colab. So I'm trying to combine all the md and render once, then split output and place in their place in the UI. But to do this I'll need access to CSS and JS code that Myst renderer is producing. Currently it's only giving the HTML which is not enough. Thanks again! |
@ashra-academy can you elaborate on
If you're using |
I am using this react code to render myst. |
HI @agoose77 , You may look at this repository https://github.com/ashra-academy/myst-realtime where I tried to demonstrate the issue. So in the screen shot, we see 3 separate cells, but they all have separate equation references. But it'll be great to have consistent references across all cells. So the equations referenced would be 1, 2, 3, 4, 5, 6 instead of 1, 2, 1, 2, 1, 2. |
Hi @ashra-academy -- exciting project that you have going! It looks like you are not sharing context between each cell. In this line you are creating a new preview: You will have to bring the rendering code up a level so that it can process the entire document all at once. If you want to parse incrementally in each cell and cache the results, that is also possible, and would require you to run the majority of the transforms afterwards. This is the way JupyterLab-MyST works if you want to check out the code there: The CSS is created using tailwind. You can see that working here: Best of luck -- we are also on discord for real-time chat on this if you need additional help and pointers: |
Thaaanks @rowanc1 for the help. And yea it's gonna be exciting when released this summer! I'm still trying to wrap my head around how to share contexts between cells. Do you have an existing code snippet where this is done with mystmd (ideally in react or nextjs)? Cheers, |
Hii @rowanc1
I've been trying to combine multiple markdown cells and split the rendered output to get something like Jupyterbook with different cells while having shared references among cells . This seem to require modifying CSS and js code after rendering to be able to split the rendered stuff and place in their cell. But currently I could only see an HTML renderer. Is there an existing functionality that also renders the CSS and js code for more control?
Cheers,
Ashra
The text was updated successfully, but these errors were encountered: