Atreyagaurav / litex-mode

LiTeX mode for emacs; A minor mode to convert valid lisp expressions to LaTeX
GNU General Public License v3.0
43 stars 4 forks source link

Support For units and unit conversion #23

Closed Atreyagaurav closed 2 years ago

Atreyagaurav commented 2 years ago

Simple support for units like:

X = 12 meters

or

w = 120 kg

Would be great to have, so that it can be included in the conversion to latex part, lisp can ignore this completely.

And additionally while implementing the units, a way to convert the units might be even better.

The unit can be an attribute to the variable, and we can convert it to another. Simplest implementation can allow the user to give the factor. like:

(setq x (convert 12 "kg" "g" 1000))

that'd simply multiply the value by the factor.

A little complex implementation can be made by using some programs like units(1) so that the conversion is automatic.

Atreyagaurav commented 2 years ago

This feature will be completed after the module https://github.com/Atreyagaurav/units-mode has been made functional. And added to melpa, as litex is already in melpa hence we need to avoid dependencies problem.