cortex-js / compute-engine

An engine for symbolic manipulation and numeric evaluation of math formulas expressed with MathJSON
https://cortexjs.io
MIT License
349 stars 41 forks source link

Support Newton notation for derivative. #163

Open walking-octopus opened 3 months ago

walking-octopus commented 3 months ago

Problem

In the domain of physics, dot notation is often preferred due to its compactness. As of today, ComputeEngine does not recognize it and MathLive fails to correctly render \\ddot{x} = ..., cutting the right padding.

Ideally, it would also be welcome to add dot notation to the on-screen keyboard and/or as a keyboard input chord (similar to say int => integral sign).

arnog commented 3 months ago

@walking-octopus to clarify, you would expect \dot{x} to produce ["D", "x", "t"], that is "derivative of x with respect to t".

What keyboard input shortcuts would you like to see?

walking-octopus commented 3 months ago

You would expect \dot{x} to produce ["D", "x", "t"]?

Yes, of course.

What keyboard input shortcuts would you like to see?

This is more of an issue for MathLive, but I think dot and ddot could get their own autocommands, spawning and focusing a \ddot{placeholder}.

My interest in this issue had been prompted by trying to build an app that needed an input widget for differencial equation systems.