Marey.Units
0.2.0
dotnet add package Marey.Units --version 0.2.0
NuGet\Install-Package Marey.Units -Version 0.2.0
<PackageReference Include="Marey.Units" Version="0.2.0" />
<PackageVersion Include="Marey.Units" Version="0.2.0" />
<PackageReference Include="Marey.Units" />
paket add Marey.Units --version 0.2.0
#r "nuget: Marey.Units, 0.2.0"
#:package Marey.Units@0.2.0
#addin nuget:?package=Marey.Units&version=0.2.0
#tool nuget:?package=Marey.Units&version=0.2.0
Marey.Units
Unit witnesses and unit rendering for Marey, a dimensionally-typed visualization system for F#.
SI base units, 22 derived units and 18 common non-SI units, each as a witness carrying its symbol, dimension, conversion factor and — where it needs one — its affine offset, together with the rendering machinery that lets an axis write its own title.
open Marey
// Canonicalisation is keyed on the dimension, not on strings. A newton composed out of base
// units and a newton stated outright are the same unit, and print the same symbol.
let composed = U.mul U.kilogram U.metrePerSecondSquared
printfn "%s" (UnitDisplay.unitText Unicode UnitRegistry.si Prefix.none composed) // N
// Four spellings, because a LaTeX document and a terminal want different things.
printfn "%s" (UnitDisplay.unitText Siunitx UnitRegistry.si Prefix.none composed) // \qty{}{\newton}
What it does
- Canonical symbols from physics, not from string matching. The registry is keyed on the
seven-element dimension vector, so anything that composes to a newton prints
N. - Prefix selection. A domain spanning 1e-9 to 5e-9 metres yields an axis labelled
nmwith ticks1, 2, 3, 4, 5. The kilogram is handled correctly — a prefix of 10⁻⁶ onfloat<kg>printsmg, against the gram, notµkg. - Composed units still name themselves.
U.div Derived.volt U.metrehas no SI name and its dimension spells out askg·m·s⁻³·A⁻¹. It rendersV·m⁻¹, andMV·m⁻¹when prefixed, because the witness records the factorisation it was built from. Nothing is guessed: a bare dimension is never factorised, since the same vector is bothJ/KandN·m/K. - Four rendering styles — Unicode, ASCII, LaTeX and
siunitx. - Affine units. Degrees Celsius and Fahrenheit carry an offset, and
IsAffinereports it. A composed unit built from an affine one drops the offset, because the quotient of an affine unit is not affine. - Non-SI units physics actually writes in —
electronvolt,angstrom,parsec,lightYear,dalton,atmosphere,bar,barn,calorie,gauss,litre,minute,hour,day,year. An electronvolt axis readskeV, notkJ.
Depends on Marey.Core and nothing else.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net5.0 was computed. net5.0-windows was computed. net6.0 was computed. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 was computed. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 was computed. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 was computed. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
| .NET Core | netcoreapp3.0 was computed. netcoreapp3.1 was computed. |
| .NET Standard | netstandard2.1 is compatible. |
| MonoAndroid | monoandroid was computed. |
| MonoMac | monomac was computed. |
| MonoTouch | monotouch was computed. |
| Tizen | tizen60 was computed. |
| Xamarin.iOS | xamarinios was computed. |
| Xamarin.Mac | xamarinmac was computed. |
| Xamarin.TVOS | xamarintvos was computed. |
| Xamarin.WatchOS | xamarinwatchos was computed. |
-
.NETStandard 2.1
- FSharp.Core (>= 10.1.400)
- Marey.Core (>= 0.2.0)
NuGet packages (2)
Showing the top 2 NuGet packages that depend on Marey.Units:
| Package | Downloads |
|---|---|
|
Marey.Plot
Themes, palettes, constraint layout, and the axis/legend compiler that turns figures into Scene IR. |
|
|
Marey.Html
HTML renderings of Marey values for notebooks: figures and scenes as inline SVG, colours as swatches, ramps resampled through Oklab, palettes, dimensions, unit witnesses and erased scales. Host-neutral and dependency-free. |
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 0.2.0 | 164 | 8/21/2026 |
| 0.1.1 | 160 | 8/19/2026 |
| 0.1.0 | 169 | 8/19/2026 |
| 0.1.0-rc.1 | 78 | 8/18/2026 |