-
-
Notifications
You must be signed in to change notification settings - Fork 485
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
Online Editor, LaTeX, Codemirror & html div #322
Comments
Hi! I'll try to answer your questions. I have to guess at what you mean by "HTML Presentation component". I don't understand your exact use case, but I hope this is helpful nonetheless!
To host Strut, all you need is a basic webserver (apache, nginx, etc). Follow the build instructions and copy the
I've had really good luck with KaTeX. It's much faster than MathJax. All of them should be usable inside Strut. :)
This is possible. People forget that Markdown is a superset of HTML. All you need to do is paste the codemirror component code into a Markdown slide.
I'm not sure what you mean by "self-define", but I suggest using HTML and CSS (this is the web, after all!) to arrange things in your slides. Anything you can do with HTML/CSS/JS, you can do inside a Strut slide, so Strut has far more capabilities than people tend to assume. |
Ah, thank you for the explanation, I understand better now. To answer your easiest question, there is no back-end code in Strut. It's a pure front-end/client/browser (whatever you want to call it) app. So yes, hosting Strut on your site is as simple as copying the HTML+JS+CSS+images onto your site. I like your ideas for the Code, Math, etc buttons. It would require quite a bit of work to add those features, though. Personally, I prefer to just use the Markdown slides, where I can add anything I want. Code, Math, HTML, etc, can all be used now, by inserting them into Markdown slides. It isn't quite as simple as clicking a button, but it is possible, and much more flexible. My flexible, I mean that you can use whatever syntax highlighting library you want, whatever TeX library you want, instead of having to rely on the one that Strut would pick. Lastly, I don't know if or how Strut uses reveal.js, but I see a lot of references to it in the source code (sorry, I am not the Strut author!). |
Strut used to support reveal but no longer does. Reveal ended up being more trouble than it was worth as new features had to be checked in reveal, impress and bespoke. Bespoke also provides most of the same features as reveal hence why reveal was dropped. Mathjax is a commonly requested feature. If I had more bandwidth I'd add it or if anyone is interested in doing it I'd take their changes for it. |
On Mathjax; I have seen by looking at the source of http://www.lsv.ens-cachan.fr/~schmitz/pub/impress.js that supporting Mathjax kind of amounts to linking to its site and introducing a rewriting function: how can I do this in Strut? Is markdown the way to go or is there a place where I can modify the 'template' of the presentation to pre-introduce the support I need? Thanks a lot, |
You can include mathjax's js file by going to your first slide (or any slide, really) and including the script tag inside the Markdown content. Any HTML can be included inside the Markdown area, so there's no problem adding a Also, all slides are on the same "page", so you don't need to include it on every slide, only one. :) |
Here's an example presentation with MathJax content (save it as
|
Thanks a lot for the feedback. Unfortunately when I import the file Actually I would like to insert into the markdown only the script What I did is to put the scripts declarations into the markdown
--> No 'real math' Refresh the page (I am using the Firefox 36.04 on Windows 7): --> 'real math' is there!! I switch to preview: --> again no real math I save the preview as 'Web page complete': --> no real math I replace (in the saved html)
with
--> real math!! So it is really close ... any further hint? Thanks, |
You may want to check that the MathJax.js file is being loaded properly (by using the Network tab in your browser's devtools). I suspect that Try putting |
The script was already inserted into the markdown. To recap: if I remain in the editing window, I get the math working when I reload the page (which might be ok, I guess) but when I use the green impress button to preview it in the browser, math is not working (as it is not working when I save the show as a web complete page using the browser). So I guess the preview is in fact a correct preview of what I get when I download the presentation. This being the case, it seems to me that the problem is the way the mathjax file is linked: while I am in the editor it is directly fetched from the remote website (and probably sees supporting files correctly) when I preview it assumes the files locally, but the mathjax.js is only part of what should be there and it is not working. So without requesting any change on the 'official' strut, is there any strut file (in the source) where I can force the insertion of the two scripts without using the markdown so that I can use my locally built strut to preview and eventually postprocess the result to cope with a possibly local mathjax installation? Below is my exported json:
a |
Hmm, I imported your presentation and I'm seeing the same thing. I'm not sure why. I suspect it has something to do with how the MathJax config script works. It's black magic to me. I'm pretty sure "text/x-mathjax-config" isnt' a valid mimetype. :p The presenation json I shared with you probabaly didn't work because I'm on a slightly customized version of strut. Here's the Markdown content from my slides that you can try:
That approach works well in all views (editor, preview, presentation, saved locally). Is MathML an option for you? |
Thanks a lot: it works ... but you loose the convenience of using the graphical interface to personalize text presentation (font, position, etc...) |
I have had a quick view at all the issues already exist, but still do not find the solution that i need.
Sorry, I am not a good web developer and know quite less about Grunt, Node.js and so on.
I have been a Android and iOS developer for some time and currently I want and start to learn to set up my own blog site and want to integrate one "HTML Presentation" component to my future site.
For finding the right component, i get to know impress.js, reveal.js, deck.js and so on.
My result are presented here: http://isjohnwong.appspot.com/post/6013787169619968
As a result, Strut is the only satisfying open source editor for html presentation i found.
And here are some of my needs,
This is exactly somewhat the same as issues Integrate with my website #321 and Integrate Strut in my website #319 .
Well, to make it more clear, things like to host one copy of strut.io in my VPS. And i can use it under my blog domain.
Comparing to MathJax, I prefer LaTeX. Somewhat like Latex / MathJax #151
Maybe integrad codemirror
Somewhat like issue Add ability to insert raw html&js into slides #3 , but not for the whole slide, only for one area.
Here is a relatively better Commercial Version of HTML Presentation Online Editor, but unfortunately not open source. So i can not count on this.
Sorry again, seems a lot of needs. If fact, I am currently a senior in one University and after a month, i will finish all my exams and i intend to try to implement all the needs above if i can not find on already implemented solution.
Question is that, i am really just one beginner for web development. So is there anyone who can provide me some instruction or guide... THX!
BTW, I am considering using Python3&Django as back-end Programming language.
The text was updated successfully, but these errors were encountered: