Page MenuHomePhabricator

Feature: Let Math accept certain Unicode input (eg. ∫ \frac{∂f}{∂τ}dτ )
Open, MediumPublic

Description

Using utf8 characters allow a much more readable expression. Math Stackexchange does this.

This can be achieved by modifying one line in textvc:

Just add 4 new range of unicode-points to the allowed character set.

This is possible because MathJax recognize these characters. If MathJax doesn't, it just put the verbatim character to the output svg.

The proposed allowed sets of characters are :

  1. greeks \u0370-\u03FF
  2. operators \u2200-\u22FF eg. ∀ ∃ ∂ ∈ ⊂ ∫
  3. ℕ ℤ ℙ ℚ ℝ ℂ ℍ
  4. arrows \u2190-\u21FF eg → ↔ ⇀ ⇒ ↪ ↦
  5. ¬±×÷♭♮♯

Character table: link

Diff: https://github.com/physikerwelt/texvcjs/pull/1/files

- literal_id =      [a-zA-Z]
+ /* greeks, operators, letter-like symbols, arrows */
+ literal_id =      [a-zA-Z¬±×÷♭♮♯\u0370-\u03FF\u2200-\u22FF\u2100-\u214F\u2190-\u21FF]

If accepted add \overparen and make \overarc an alias of that.

Event Timeline

Golopotw renamed this task from Allow utf-8 characters in math input so user can write α→β instead of \alpha\to\beta to Make the math renderer understand utf-8 input so user can write α→β instead of \alpha\to\beta.May 19 2017, 12:53 PM
Golopotw renamed this task from Make the math renderer understand utf-8 input so user can write α→β instead of \alpha\to\beta to Feature: Accept certain Unicode input so users can write α→β instead of \alpha\to\beta.Jun 8 2017, 11:44 PM
Golopotw updated the task description. (Show Details)
Golopotw renamed this task from Feature: Accept certain Unicode input so users can write α→β instead of \alpha\to\beta to Feature: Accept certain Unicode input (eg. ∫ \frac{∂f}{∂τ}dτ ).Jun 8 2017, 11:57 PM
Golopotw renamed this task from Feature: Accept certain Unicode input (eg. ∫ \frac{∂f}{∂τ}dτ ) to Feature: Let Math accept certain Unicode input (eg. ∫ \frac{∂f}{∂τ}dτ ).Jun 9 2017, 12:00 AM
Physikerwelt subscribed.

I like the idea. However, I think it would be better to replace the unicode chars by the respective commands for furhter processing. That way the formulae can still be rendered using pdflatex (with \usepackage{texvc}). Some symbols are already listed here https://github.com/physikerwelt/utf8tex/blob/master/unicode2classicTex.csv What do you think?

I think both approach are good. More code is needed to replace chars, but it is manageable.

I think a reasonable way to go forward is to build that into the VE