sagemath / sage

Main repository of SageMath
https://www.sagemath.org
Other
1.45k stars 482 forks source link

Addition of LaTeX and better support of SI prefixes on units module #9778

Open cousteaulecommandant opened 14 years ago

cousteaulecommandant commented 14 years ago

Since maybe the developers are reluctant to implement the "metrology" module I submitted in #9763, when there's already a "units" module that has the same purpose, I'm trying to port the LaTeX capabilities to the already existing "units" module.

TO DO: Complete the latexdict list of units and LaTeX representation (if a unit isn't there, its symbol will be replaced by its name)

Also, I'm implementing an easier way to use SI prefixes on the units module. The patch I submitted in #9759 wasn't very intuitive (you had to type "units.length.meter.kilo"), partly because I didn't know very well how did that module work. This new version allows you to simply type "units.length.kilometer" (even if it's not tab-completed) and it will do the rest.

CC: @williamstein @eviatarbach

Component: symbolics

Keywords: latex, SI prefixes, units, sd40.5

Author: Javier Mora

Issue created by migration from https://trac.sagemath.org/ticket/9778

cousteaulecommandant commented 14 years ago

Attachment: trac_9778_latex_prefixes_units.patch.gz

Adds LaTeX symbols and SI prefixes to the units module

kcrisman commented 12 years ago
comment:2

Is the "todo" necessary, or could it be postponed to another ticket?

cousteaulecommandant commented 12 years ago
comment:3

Well, latexdict only contains a few units (10) and prefixes (5) so that it worked as an example; it would need to be completed with the names of all SI units and prefixes, at least for the LaTeX representation part.

By the way, I made this patch 2 years ago so I remember pretty little of it.

kcrisman commented 12 years ago
comment:4

This supersedes #9759.

If someone wanted to complete this, they'd just have to make sure they implemented all the SI units etc. that Sage supports (see the 'todo' above).

kcrisman commented 12 years ago

Changed keywords from latex, SI prefixes, units to latex, SI prefixes, units, sd40.5