diff options
Diffstat (limited to 'doc/groff.html.node/Default-Units.html')
-rw-r--r-- | doc/groff.html.node/Default-Units.html | 87 |
1 files changed, 87 insertions, 0 deletions
diff --git a/doc/groff.html.node/Default-Units.html b/doc/groff.html.node/Default-Units.html new file mode 100644 index 0000000..168c5cc --- /dev/null +++ b/doc/groff.html.node/Default-Units.html @@ -0,0 +1,87 @@ +<!DOCTYPE html> +<html> +<!-- Created by GNU Texinfo 7.0.3, https://www.gnu.org/software/texinfo/ --> +<head> +<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> +<!-- This manual documents GNU troff version 1.23.0. + +Copyright © 1994-2023 Free Software Foundation, Inc. + +Permission is granted to copy, distribute and/or modify this document +under the terms of the GNU Free Documentation License, Version 1.3 or +any later version published by the Free Software Foundation; with no +Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts. A +copy of the license is included in the section entitled "GNU Free +Documentation License". --> +<title>Default Units (The GNU Troff Manual)</title> + +<meta name="description" content="Default Units (The GNU Troff Manual)"> +<meta name="keywords" content="Default Units (The GNU Troff Manual)"> +<meta name="resource-type" content="document"> +<meta name="distribution" content="global"> +<meta name="Generator" content="makeinfo"> +<meta name="viewport" content="width=device-width,initial-scale=1"> + +<link href="index.html" rel="start" title="Top"> +<link href="Request-Index.html" rel="index" title="Request Index"> +<link href="index.html#SEC_Contents" rel="contents" title="Table of Contents"> +<link href="Measurements.html" rel="up" title="Measurements"> +<link href="Motion-Quanta.html" rel="prev" title="Motion Quanta"> +<style type="text/css"> +<!-- +div.example {margin-left: 3.2em} +--> +</style> + + +</head> + +<body lang="en"> +<div class="subsection-level-extent" id="Default-Units"> +<div class="nav-panel"> +<p> +Previous: <a href="Motion-Quanta.html" accesskey="p" rel="prev">Motion Quanta</a>, Up: <a href="Measurements.html" accesskey="u" rel="up">Measurements</a> [<a href="index.html#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="Request-Index.html" title="Index" rel="index">Index</a>]</p> +</div> +<hr> +<h4 class="subsection" id="Default-Units-1">5.3.2 Default Units</h4> +<a class="index-entry-id" id="index-default-units"></a> +<a class="index-entry-id" id="index-units_002c-default"></a> + +<p>A general-purpose register (one created or updated with the <code class="code">nr</code> +request; see see <a class="pxref" href="Registers.html">Registers</a>) is implicitly dimensionless, or reckoned +in basic units if interpreted in a measurement context. But it is +convenient for many requests and escape sequences to infer a scaling +unit for an argument if none is specified. An explicit scaling unit +(not after a closing parenthesis) can override an undesirable default. +Effectively, the default unit is suffixed to the expression if a scaling +unit is not already present. GNU <code class="code">troff</code>’s use of integer +arithmetic should also be kept in mind (see <a class="pxref" href="Numeric-Expressions.html">Numeric Expressions</a>). +</p> +<p>The <code class="code">ll</code> request interprets its argument in ems by default. +Consider several attempts to set a line length of 3.5 inches when +the type size is 10 points on a terminal device with a resolution +of 240 basic units and horizontal motion quantum of 24. Some +expressions become zero; the request clamps them to that quantum. +</p> +<div class="example"> +<div class="group"><pre class="example-preformatted">.ll 3.5i \" 3.5i (= 840u) +.ll 7/2 \" 7u/2u -> 3u -> 3m -> 0, clamped to 24u +.ll (7 / 2)u \" 7u/2u -> as above +.ll 7/2i \" 7u/2i -> 7u/480u -> 0 -> as above +.ll 7i/2 \" 7i/2u -> 1680u/2m -> 1680u/24u -> 35u +.ll 7i/2u \" 3.5i (= 840u) +</pre></div></div> + +<a class="index-entry-id" id="index-measurements_002c-specifying-safely"></a> +<p>The safest way to specify measurements is to attach a scaling unit. To +multiply or divide by a dimensionless quantity, use ‘<samp class="samp">u</samp>’ as its +scaling unit. +</p> + + +</div> + + + +</body> +</html> |