Is there currently any way in javascript to convert a KaTeX formular to MathJax, I want to support exporting to Anki which just works with MathJax.
If not, is there a table which shows which commands of KaTeX are not supported in MathJax, I can't seem to find one.
I just need the conversion from KaTeX to MathJax, not the other way around
A workaround might be the new addon for anki that supports katex. I'm not ready to use it yet (there appears to be some bugs with line-breaking. See comments on the link).
https://ankiweb.net/shared/info/1087328706
I have the same use case as you. I write markdown and katex in vscode (with Markdown+Math extension), and export to anki (using ankdown - slightly modified).
I find that sometimes mathjax causes problems - for example with tags.
Recently, I installed the arch community package "mathjax" to be able to render some mathematical formulas in a jupyter notebook.
It works for the notebooks, but after the installation, other things are broken, like the rendering of
special symbols in Terminator and Sublime Text 3.
Here is the symbol in question, displayed in Sublime and in the actual prompt in Terminator:
http://imgur.com/a/lYBk1
My question is, how can I keep mathjax from changing these things.
How can this even happen? I thought the package is just relevant to
in-browser Latex rendering.
Ok, so a really bad solution to this is to move the mathjax folder in /usr/share/fonts to a new location and link to this location in the /usr/share/mathjax folder, overwriting the previous link named "fonts".
This fixes the issues with special symbols in Terminator and Sublime.
At least for Jupyter Notebooks, this does not seem to be breaking the rendering of formulas.
This is just a temporary solution, so I hope someone can find a better one.
I would like to add some macros in my MathJax configuration. Specifically I would like to add:
\arcsin and be displayed as {\rm arcsin}
\arccos and be displayed as {\rm arccos}
\arctan and be displayed as {\rm arctan}
\arccot and be displayed as {\rm arccot}
I have read the MathJaX documentation and although I think that I do the steps right, I end up with either the MathJaX not working properly or not loaded at all. By the way, why are these commands not supported at all? I think they should. Is there a specific reason?
How can I add these macros in my configuration?
MathJax 3 supports all the commands you mentioned (\arcsin, \arccos, \arctan and \arccot) so you don't have to create macros for them. For \arccot, the physics extension must be loaded.
Some Background here:
I've downloaded this example and made it run on my Ubuntu. Everything's fine. I put my own OpenType font into the project and it works fine too! I made sure that HarfBuzz supports my font and my language.Now I need to go further.
I need some guide here:
In the above example,three kinds of language each has it's own font to support the display. I mean,these three languages is rendered separately(as to my understanding of the code).
So, how to make HarfBuzz to select the correct font when many kinds of language are mixed together and render them at once? I mean,without making a font file that supports all languages in the world.
In this example,Chinese script is vertically displayed(which is just as I want),but if I make the Latin script's text_directions to HB_DIRECTION_TTB,which is of course not what I want. I want the whole word 'LATIN' to rotated 90 degree.
So, how can I achieve that? how to make that happen without breaking anything about Chinese layout?
3 .Last but not least,after solving the above problems, I want to make a Text Editor to display and edit many languages at the same time,same place. I don't know if I have to do some work on HarfBuzz or FreeType or implement a text editor that supports this complex text layout? Is there any example that I can refer to ?
Thanks in advance for help.
HarfBuzz is doing shaping just on same script and directionality, you should first split your text, guess or find language and direction of that chunk (using ICU or smt else) then send it to a shaper. Generally on Linux for finding right installed font for a script, you can use fontconfig.
I do not know, I suggest making separate question for that.
Making a text editor starting from shaper is not easy task. You should do bidi, line wrapping and ... that all have their challenges. I suggest use higher level abstraction (pango). For instance browsers doing a lot to support these.
Are there any rich-text editors that have Vi(m) keybindings? Specifically, something like Word where I can compose a document with colors, headings, et al. but use Vi(m) bindings to move around and compose?
So if you have to use MS Word and want vim key bindings, there is an add on, but if you are not bound to that I would def. go for LaTeX + the vim latex suite.
Are you familiar with Latex?
Simply put it allows you to format your documents in plain text using tags or commands.
You then "compile" your document into the final format .pdf,.ps, etc.
Ex:
\documentclass{article}
\title{Cartesian closed categories and the price of eggs}
\author{Jane Doe}
\date{September 1994}
\begin{document}
\maketitle
Hello world!
\end{document}
This will allow you to write in vim, but still get professional non plain text output for your documents.
If you like Markdown or Latex, you could use the free open source Rstudio editor, with VIM-mode enabled. Export as either Word, PDF, or HTML etc.
Download Rstudio:
https://www.rstudio.com/products/RStudio/#Desktop
Read about markdown:
http://rmarkdown.rstudio.com/
If you wish to use vim for text editing, but want to, for example have text in different colors, bold it and such ... you can use Txtfmt plugin. It enables you, by using special characters, to "prettify" plain text files a little. They can look quite nice, and it comes handy if you're used to vim, and are, for example, writing documentation for your programs which you'll later just get in word, and make an adjustment or two, and ship off.
If you want to (or have to) stay with Word and don't want to shell out $100 for a ViEmu license, you can try using this AutoHotKey script for providing some basic vi-like functionality. The repo linked also provides a standalone exe to get the same without using AutoHotKey.
There are many good reasons to ditch word entirely, but sometimes that's just not an option :(
The Txtfmt plugin definitely provides the functionality you are looking for. It's a bit like having "rich text" capability for plain text in Vim.
Txtfmt (The Vim Highlighter)
Screenshots
The latest version supports 8 configurable foreground and background colors, as well as all combinations of bold, underline, italic, etc... The highlighting is token-based, but the tokens are rendered invisible by the syntax, and can be inserted with very convenient and intuitive mappings, which don't require you to remember anything: e.g., "bold-underline" could be specified with a string such as bu or ub. The version under development even supports visual maps, which will permit you to select some text and say (for example) "Make this text red, bold-italic", and have the plugin handle insertion/removal of the appropriate tokens automatically. (It's really quite simple and intuitive, however, even with the non-visual mappings.)
Although the plugin is highly configurable, the default settings are appropriate for most users, and the author is more than happy to answer any setup or usage questions...
There's a way of configuring Abiword to use vi key bindings
You can use the text editor of your choice with vim keys (vim, emacs, sublime, atom, vscode ,etc.) and write your document in markdown. Then use an open source tool called pandoc to translate it into almost any other markup language that you want. It is possible to compile your document to rich text formats including MS Word or even MS Powerpoint.
You can costumize your output by using a template.
Pandoc has extensive documentation and uses a richer markup syntax that allows you to do pretty much anything you want with the text. It is being actively developed by the community. Almost any major text editor has a few plugins for pandoc too.
You can use GlobalVim.
It can simulate vim modes and commands in most editing area.