Marey.Units 0.2.0

dotnet add package Marey.Units --version 0.2.0
                    
NuGet\Install-Package Marey.Units -Version 0.2.0
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Marey.Units" Version="0.2.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Marey.Units" Version="0.2.0" />
                    
Directory.Packages.props
<PackageReference Include="Marey.Units" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Marey.Units --version 0.2.0
                    
#r "nuget: Marey.Units, 0.2.0"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package Marey.Units@0.2.0
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Marey.Units&version=0.2.0
                    
Install as a Cake Addin
#tool nuget:?package=Marey.Units&version=0.2.0
                    
Install as a Cake Tool

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 nm with ticks 1, 2, 3, 4, 5. The kilogram is handled correctly — a prefix of 10⁻⁶ on float<kg> prints mg, against the gram, not µkg.
  • Composed units still name themselves. U.div Derived.volt U.metre has no SI name and its dimension spells out as kg·m·s⁻³·A⁻¹. It renders V·m⁻¹, and MV·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 both J/K and N·m/K.
  • Four rendering styles — Unicode, ASCII, LaTeX and siunitx.
  • Affine units. Degrees Celsius and Fahrenheit carry an offset, and IsAffine reports 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 inelectronvolt, angstrom, parsec, lightYear, dalton, atmosphere, bar, barn, calorie, gauss, litre, minute, hour, day, year. An electronvolt axis reads keV, not kJ.

Depends on Marey.Core and nothing else.

Product 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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

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