Opened 11 years ago

Last modified 8 years ago

#9778 needs_work enhancement

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

Reported by: cousteau Owned by: burcin
Priority: minor Milestone:
Component: symbolics Keywords: latex, SI prefixes, units, sd40.5
Cc: was, eviatarbach Merged in:
Authors: Javier Mora Reviewers:
Report Upstream: N/A Work issues:
Branch: Commit:
Dependencies: Stopgaps:

Status badges

Description

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.

Attachments (1)

trac_9778_latex_prefixes_units.patch (4.5 KB) - added by cousteau 11 years ago.
Adds LaTeX symbols and SI prefixes to the units module

Download all attachments as: .zip

Change History (7)

Changed 11 years ago by cousteau

Adds LaTeX symbols and SI prefixes to the units module

comment:1 Changed 11 years ago by cousteau

  • Status changed from new to needs_work

comment:2 Changed 9 years ago by kcrisman

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

comment:3 Changed 9 years ago by cousteau

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.

comment:4 Changed 9 years ago by kcrisman

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).

comment:5 Changed 9 years ago by kcrisman

  • Keywords sd40.5 added

comment:6 Changed 8 years ago by eviatarbach

  • Cc eviatarbach added
Note: See TracTickets for help on using tickets.