josephwright / josephwright/siunitx

Typeset numeric types from output by common languages

Open
#208 1 comment 0 reactions 1 assignee View on GitHub

@josephwright is already working on this.

Since May 16, 2013.

enhancement
Dominant language
TeX
Stars
407
Forks
29
Avg merge
11h 20m
Merged PRs (30d)
3

Description

[Anonymous report]

This is originated from this post: http://tex.stackexchange.com/q/83626/1871

It would be very practical if siunitx could parse, even with much intervention (i.e. without specifying options) numeric outputs for common languages. It already does this for many combinations by it doesn't work for some:

For example C++ syntax: std::complex(1.,2.) output: (1.,2.e-3) latex: 1. + 2.\times 10^{-3}\mathrm{i}

Mathematica: syntax: InputForm[1.2^6] output: 1.2^2 latex: 1.2\times 10^6

syntax: InputForm[Complex[1.,2.e6] output: 1. + 2.^6I latex: 1. + 2.\times 10^{-3}\mathrm{i}

syntax: InputForm[List[1, 2, 3]] output: InputForm[List[1, 2, 3 + 4. I]] latex: {1, 2, 3. + 4. \mathrm{i}}

FORTRAN: syntax: CMPLX(1.2, 2.1) output: (1.2,2.1) [same as C++ complex] latex: 1.2 + 2.1\mathrm{i}

Some other numerical output shared by many languages can include 'nan' (or 'NaN') or 'inf' (or 'INF'), which can be interpreted as its literal name (e.g. \mathrm{inf}) or --possibly-- more fancy \infty). Other languages to look at are Matlab and Maple.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.