diff options
Diffstat (limited to 'doc/groff.html.node/Dummy-Characters.html')
-rw-r--r-- | doc/groff.html.node/Dummy-Characters.html | 166 |
1 files changed, 166 insertions, 0 deletions
diff --git a/doc/groff.html.node/Dummy-Characters.html b/doc/groff.html.node/Dummy-Characters.html new file mode 100644 index 0000000..769574d --- /dev/null +++ b/doc/groff.html.node/Dummy-Characters.html @@ -0,0 +1,166 @@ +<!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>Dummy Characters (The GNU Troff Manual)</title> + +<meta name="description" content="Dummy Characters (The GNU Troff Manual)"> +<meta name="keywords" content="Dummy Characters (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="Using-Fonts.html" rel="up" title="Using Fonts"> +<link href="Italic-Corrections.html" rel="prev" title="Italic Corrections"> +<style type="text/css"> +<!-- +a.copiable-link {visibility: hidden; text-decoration: none; line-height: 0em} +div.example {margin-left: 3.2em} +span.r {font-family: initial; font-weight: normal; font-style: normal} +span:hover a.copiable-link {visibility: visible} +strong.def-name {font-family: monospace; font-weight: bold; font-size: larger} +ul.mark-bullet {list-style-type: disc} +--> +</style> + + +</head> + +<body lang="en"> +<div class="subsection-level-extent" id="Dummy-Characters"> +<div class="nav-panel"> +<p> +Previous: <a href="Italic-Corrections.html" accesskey="p" rel="prev">Italic Corrections</a>, Up: <a href="Using-Fonts.html" accesskey="u" rel="up">Using Fonts</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="Dummy-Characters-1">5.19.10 Dummy Characters</h4> + +<p>As discussed in <a class="ref" href="Requests-and-Macros.html">Requests and Macros</a>, the first character on an +input line is treated specially. Further, formatting a glyph has many +consequences on formatter state (see <a class="pxref" href="Environments.html">Environments</a>). Occasionally, +we want to escape this context or embrace some of those consequences +without actually rendering a glyph to the output. +</p> +<dl class="first-deffn"> +<dt class="deffn" id="index-_005c_0026-1"><span class="category-def">Escape sequence: </span><span><strong class="def-name"><code class="t">\&</code><span class="r"><i class="slanted"></i></span><code class="t"></code></strong><a class="copiable-link" href='#index-_005c_0026-1'> ¶</a></span></dt> +<dd><a class="index-entry-id" id="index-_005c_0026"></a> +<a class="index-entry-id" id="index-dummy-character-_0028_005c_0026_0029"></a> +<a class="index-entry-id" id="index-character_002c-dummy-_0028_005c_0026_0029"></a> +<p>Interpolate a dummy character, which is constitutive of output but +invisible.<a class="footnote" id="DOCF81" href="groff.html_fot.html#FOOT81"><sup>81</sup></a> Its presence alters the interpretation context of a +subsequent input character, and enjoys several applications. +</p> +<ul class="itemize mark-bullet"> +<li>Prevent insertion of extra space after an end-of-sentence character. + +<div class="example"> +<div class="group"><pre class="example-preformatted">Test. +Test. + ⇒ Test. Test. +Test.\& +Test. + ⇒ Test. Test. +</pre></div></div> + +</li><li>Prevent recognition of a control character. + +<div class="example"> +<div class="group"><pre class="example-preformatted">.Test + error→ warning: macro 'Test' not defined +\&.Test + ⇒ .Test +</pre></div></div> + +</li><li>Prevent kerning between two glyphs. + + +</li><li>Translate a character to “nothing”. + +<div class="example"> +<div class="group"><pre class="example-preformatted">.tr JIjiK\&k\&UVuv +Post universitum, alea jacta est, OK? + ⇒ Post vniversitvm, alea iacta est, O? +</pre></div></div> +</li></ul> + +<p>The dummy character escape sequence sees use in macro definitions as a +means of ensuring that arguments are treated as text even if they begin +with spaces or control characters. +</p> +<div class="example"> +<div class="group"><pre class="example-preformatted">.de HD \" typeset a simple bold heading +. sp +. ft B +\&\\$1 \" exercise: remove the \& +. ft +. sp +.. +.HD .\|.\|.\|surprised? +</pre></div></div> +</dd></dl> + +<p>One way to think about the dummy character is to imagine placing the +symbol ‘<samp class="samp">&</samp>’ in the input at a certain location; if doing so has all +the side effects on formatting that you desire except for sticking an +ugly ampersand in the midst of your text, the dummy character is what +you want in its place. +</p> +<dl class="first-deffn"> +<dt class="deffn" id="index-_005c_0029-1"><span class="category-def">Escape sequence: </span><span><strong class="def-name"><code class="t">\)</code><span class="r"><i class="slanted"></i></span><code class="t"></code></strong><a class="copiable-link" href='#index-_005c_0029-1'> ¶</a></span></dt> +<dd><a class="index-entry-id" id="index-_005c_0029"></a> +<a class="index-entry-id" id="index-transparent-dummy-character-_0028_005c_0029_0029"></a> +<a class="index-entry-id" id="index-character_002c-transparent-dummy-_0028_005c_0029_0029"></a> +<a class="index-entry-id" id="index-dummy-character_002c-transparent-_0028_005c_0029_0029"></a> +<p>Interpolate a <i class="slanted">transparent</i> dummy character—one that is +transparent to end-of-sentence detection. It behaves as <code class="code">\&</code>, +except that <code class="code">\&</code> is treated as letters and numerals normally are +after ‘<samp class="samp">.</samp>’, ‘<samp class="samp">?</samp>’ and ‘<samp class="samp">!</samp>’; <code class="code">\&</code> cancels end-of-sentence +detection, and <code class="code">\)</code> does not. +</p> +<div class="example"> +<div class="group"><pre class="example-preformatted">.de Suffix-& +. nop \&\\$1 +.. +. +.de Suffix-) +. nop \)\\$1 +.. +. +Here's a sentence.\c +.Suffix-& ' +Another one.\c +.Suffix-) ' +And a third. + ⇒ Here's a sentence.' Another one.' And a third. +</pre></div></div> +</dd></dl> + + + + +</div> +<hr> +<div class="nav-panel"> +<p> +Previous: <a href="Italic-Corrections.html">Italic Corrections</a>, Up: <a href="Using-Fonts.html">Using Fonts</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> + + + +</body> +</html> |