LaTeX / Markdown integration for text editor
Hypertext-infused philosophy personal database software
Brought to you by:
jasonwinning
I had similar thoughts as those in ticket 9 and ticket 25: it would be nice to use symbols in the text editor. Maybe you thought about this already, but a more general solution would be to integrate the mathematical environment from LaTeX with the text editor.
I'm also quite used to writing in Markdown, so having the possibility of using it would feel very natural. I guess it would also make it easy to add some cool packages as Mermaid for making diagrams.
Can you point me to an existing example of an application with an embedded text editor with LaTeX integrated in? It would be good to see how this is done elsewhere.
I was actually thinking of web apps, mainly in GitLab's text editor for submitting comments in issues. It uses a Markdown version with an integrated engine wich renders math symbols. Further details are specified in the documentation.
However, the engine used in GitLab works with Javascript. In the comments of this post there are links to Java libraries for TeX rendering which I believe will be better suited for Hypernomicon integration.
I couldn't find any actual Java app which has this kind of integration, but I hope that this is useful anyway.
I wasn't thinking so much about the under-the-hood implementation details, I was just wondering if there is any application (including web application) out there that has an embedded text editor with LaTeX integration, java or not (aside from, of course, applications where the sole purpose is to function as a LaTeX editor). It's not clear to me how it would function from the end-user standpoint.
Oh right! In that case, GitLab's editor for comments would be what I have in mind. It doesn't have a full LaTeX implementation, so it won't allow you to download packages or use many built-in enviroments. But when writing between $` `$ it will render the text in math symbols. In that sense, the rest of the interface could remain just the same: in fact, it's not that different from this box in SourceForge.
A strong +1 from me for both Markdown and Latex (insofar as Latex is the best way to write formulas other than manually picking the symbols from the symbol palette, which is arduous).
Jason, I'm not entirely sure what you were asking for (and I'm not sure if Joaquín answered it), but the closest thing I can think of is MathJax. I wrote this page entirely in Markdown, with Latex defined both inline and in blocks. Hugo converts the Markdown to HTML, and MathJax converts the resultant Latex declarations into nice looking formulas.
Overall, there have been a lot of feature requests and bug reports having to do with the main text editor. Right now it uses the built-in HTML editing functionality that comes with the JavaFX framework, which is a little under-developed as far as rich editors go. Expanding its features requires modifying it with hacky solutions. I am thinking what will need to be done at some point is to switch to using some totally different solution for editing the main text instead, like one of the Javascript-based editors, which are much more mature and full-featured. I can try to see if there is one that can incorporate Latex and/or Markdown. This will be a big project but probably worth it in the long run.
Bumping this because I just noticed Zotero notes appear to be fully "markdownified" now. Within the notes panel you have various formatting options; when text is copied from the notes panel to somewhere else it carries the markdown formatting with it. Within the note the text just looks formatted, the markdown is "hidden" until you copy-paste it somewhere else.
For me this would be basically perfect in the Hypernomicon text editor. Perhaps also with an option to switch between "formatted" (as Zotero notes now do) and "show formatting" (as e.g. Notepad++ does).
I still appreciate what you said in the last comment in this thread, that it's a huge amount of work. I'm just restating my opinion that this would be valuable to me.