Open cben opened 10 years ago
±
for +
.
https://github.com/kasperpeulen/PressAndHold/ does this in an excellent way popping up after long press.https://github.com/thehogfather/brackets-latex has a lot of latex-in-CodeMirror goodies (including \macro autocomplete)
Should alo take a look at MS Office's Equation Editor shortcuts and autocorrect — I hear it's very keyboard friendly these days. http://iun.edu/~mathiho/useful/word07shortcuts.pdf https://support.office.com/en-us/article/Linear-format-equations-and-Math-AutoCorrect-in-Word-2e00618d-b1fd-49d8-8cb4-8d17f25754f8 I'm impressed that they support "Use Math AutoCorrect rules outside of an equation"!
CoffeeTeX is a quite interesting unicode-based latex superset.
Its demo editor is based on PressAndHold (by same person), including auto-converting latex macros to unicode (\alpha
to α
).
It's quite tempting to adopt it wholesale for mathdown!
OTOH, using CoffeeTeX syntaxes that are not currently supported by pandoc/scholdoc (with unicode.tex/xetex/luatex) would be unwise.
E.g. x\overset{ℝ}{+} y=x\overset{ℚ}{+} y
is cool, x+↖ℝ y=x+↖ℚ y
is not.
Should figure out what subset works.
IPython Notebook now also does \symbol autocomplete: http://ipython.org/ipython-doc/dev/whatsnew/version3.html#typing-unicode-identifiers
Turns out unicode "mathematical" chars vs \symbol is a complicated matter. E.g. β (GREEK SMALL LETTER BETA) vs 𝛽 (MATHEMATICAL ITALIC SMALL BETA) vs \beta. Most people typeset all math (including \beta) as italic anyway. Should regular β be normalized to italic? Should italic 𝛽 be disregarded if doing upright typesetting? http://mirrors.ibiblio.org/CTAN/macros/latex/contrib/unicode-math/unicode-math.pdf has a lot of options to control this.
MathJax seems to sometimes normalize β vs 𝛽 or not depending on output renderer.
I'm not sure this matters to encouraging unicode here, but should think more. The default .tex export template (when I implement export) should probably use \usepackage[math-style=literal]{unicode-math}
.
Should offer autocomplete when typing
\foo
.\al
->$\alpha$
(with cursor before closing$
if possible).\arow
should offer\rightarrow
etc.Big question: should I autocomplete to unicode chars (e.g.
\beta
->β
) to encourage Mathdown's "the source is the document" ethos? It's seems to be supported well enough by MathJax(?). Should limit to only chars that work with\usepackage[utf8]{inputenc}
on pdflatex. Anyway there must be an option to export back to ascii.