Changes

Jump to navigation Jump to search
305 bytes removed ,  16:11, 3 June 2023
no edit summary
<?xml version='1.0'?>
<!-- this file was generated on 2020-08-20T09:05 -->
<cd:commandgroup generated="yes" name="unit" xmlns:cd="http://wiki.contextgarden.net/commanddoc/20200807">
<cd:shortdesc><!-- a short command summary goes here -->
The instances of <tt>\<i>unit</i></tt> are used for typesetting physical units.
</cd:shortdesc>
</cd:command>
</cd:variants>
<cd:description>The {{cmd|unit}} command typesets physical units, with or with without a number preceding them. Units and their prefixes may be spelled out or abbreviated, with or without spaces or initial capitals; this will be converted to the correct abbreviated form and typeset. Any numbers that are encountered after units are assumed to be powers; one may also write e.g. <code>squared meter</code>. Multiplication is implicit; division may be written as <code>per</code>. The font automatically adapts to the environment.
The number before the digits is interpreted as just that, a number. There are a few special characters you can put in to format it; most importantly, <code>e123</code> is interpreted as <code>times 10^123</code>. The <code>^{...}</code> used to be interpreted as a synonym for <code>e</code>, but nowadays (since nov 2012) it functions in the normal TeX way, namely to typeset an exponent.
</cd:description>
<cd:examples><cd:example title="">Various ways to write a unit:
<context source="yes">
\startlines
\stoplines
</context>
</cd:example><cd:example title="">Units automatically have a space put in front of them.
<context source="yes">
[\unit{micro ohm}]\par % space before unit
[\unit{10 micro ohm}]\par % space before unit
</context>
</cd:example><cd:example title="">There are various ways put separators in numbers:
<context source="yes">
\starttabulate[|l|l|l|]
\stoptabulate
</context>
</cd:example><cd:example title="">Since mid-May 2020 it is possible to directly input ranges or measures of uncertainty in {{cmd|unit}}:
<context source="yes">
\startlines
</context>
</cd:example></cd:examples>
<cd:notes>
<cd:note author="[[User:Taco|Taco]] ([[User talk:Taco|talk]])" date="12:35, 21 August 2020 (CEST)">The last example ('&squo;unitless'&squo;) does not work with 20200630 LMTX. </cd:note></cd:notes>
<cd:seealso>
<!-- one or more of these:
<cd:commandref name="xx"></cd:commandref>
<cd:wikipage page="xx"></cd:wikipage>
<cd:url url="https://xx"></cd:url>
<cd:manual pdf="xx"></cd:manual>
<cd:source file="xx"></cd:source>
-->
<cd:commandref name="defineunit" originator="system"></cd:commandref>
<cd:commandref name="setupunit" originator="system"></cd:commandref>
<cd:source file="phys-dim.mkiv" originator="system"></cd:source> <cd:wikipage originator="system" page="Category:Symbols"></cd:wikipage>
<cd:commandref name="digits"></cd:commandref>
<cd:commandref name="registerunit"></cd:commandref>
<cd:commandref name="setupunittext"></cd:commandref></cd:seealso>
</cd:commandgroup>
1

edit

Navigation menu