1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137
|
<!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>Control Characters (The GNU Troff Manual)</title>
<meta name="description" content="Control Characters (The GNU Troff Manual)">
<meta name="keywords" content="Control 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="Formatter-Instructions.html" rel="up" title="Formatter Instructions">
<link href="Invoking-Requests.html" rel="next" title="Invoking Requests">
<link href="Formatter-Instructions.html" rel="prev" title="Formatter Instructions">
<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}
-->
</style>
</head>
<body lang="en">
<div class="subsection-level-extent" id="Control-Characters">
<div class="nav-panel">
<p>
Next: <a href="Invoking-Requests.html" accesskey="n" rel="next">Invoking Requests</a>, Previous: <a href="Formatter-Instructions.html" accesskey="p" rel="prev">Formatter Instructions</a>, Up: <a href="Formatter-Instructions.html" accesskey="u" rel="up">Formatter Instructions</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="Control-Characters-1">5.6.1 Control Characters</h4>
<a class="index-entry-id" id="index-control-characters"></a>
<a class="index-entry-id" id="index-configuring-control-characters"></a>
<a class="index-entry-id" id="index-changing-control-characters"></a>
<p>The mechanism of using <code class="code">roff</code>’s control characters to invoke
requests and call macros was introduced in <a class="ref" href="Requests-and-Macros.html">Requests and Macros</a>.
Control characters are recognized only at the beginning of an input
line, or at the beginning of the branch of a control structure request;
see <a class="ref" href="Conditionals-and-Loops.html">Conditionals and Loops</a>.
</p>
<p>A few requests cause a break implicitly; use the no-break control
character to prevent the break. Break suppression is its sole
behavioral distinction. Employing the no-break control character to
invoke requests that don’t cause breaks is harmless but poor style.
See <a class="xref" href="Manipulating-Filling-and-Adjustment.html">Manipulating Filling and Adjustment</a>.
</p>
<a class="index-entry-id" id="index-control-character_002c-changing-_0028cc_0029"></a>
<a class="index-entry-id" id="index-character_002c-control_002c-changing-_0028cc_0029"></a>
<a class="index-entry-id" id="index-no_002dbreak-control-character_002c-changing-_0028c2_0029"></a>
<a class="index-entry-id" id="index-character_002c-no_002dbreak-control_002c-changing-_0028c2_0029"></a>
<a class="index-entry-id" id="index-control-character_002c-no_002dbreak_002c-changing-_0028c2_0029"></a>
<p>The control ‘<samp class="samp">.</samp>’ and no-break control ‘<samp class="samp">'</samp>’ characters can each
be changed to any ordinary character<a class="footnote" id="DOCF42" href="groff.html_fot.html#FOOT42"><sup>42</sup></a>
with the <code class="code">cc</code> and <code class="code">c2</code> requests, respectively.
</p>
<dl class="first-deffn">
<dt class="deffn" id="index-_002ecc"><span class="category-def">Request: </span><span><strong class="def-name"><code class="t">.cc</code></strong> <var class="def-var-arguments">[<span class="r"><i class="slanted">o</i></span>]</var><a class="copiable-link" href='#index-_002ecc'> ¶</a></span></dt>
<dd><a class="index-entry-id" id="index-cc"></a>
<p>Recognize the ordinary character <var class="var">o</var> as the control character.
If <var class="var">o</var> is absent or invalid, the default control character
‘<samp class="samp">.</samp>’ is selected. The identity of the control character is
associated with the environment (see <a class="pxref" href="Environments.html">Environments</a>).
</p></dd></dl>
<dl class="first-deffn">
<dt class="deffn" id="index-_002ec2"><span class="category-def">Request: </span><span><strong class="def-name"><code class="t">.c2</code></strong> <var class="def-var-arguments">[<span class="r"><i class="slanted">o</i></span>]</var><a class="copiable-link" href='#index-_002ec2'> ¶</a></span></dt>
<dd><a class="index-entry-id" id="index-c2"></a>
<p>Recognize the ordinary character <var class="var">o</var> as the no-break control
character. If <var class="var">o</var> is absent or invalid, the default no-break
control character ‘<samp class="samp">'</samp>’ is selected. The identity of the no-break
control character is associated with the environment
(see <a class="pxref" href="Environments.html">Environments</a>).
</p></dd></dl>
<p>When writing a macro, you might wish to know which control character was
used to call it.
</p>
<dl class="first-deffn">
<dt class="deffn" id="index-_005cn_005b_002ebr_005d"><span class="category-def">Register: </span><span><strong class="def-name"><code class="t">\n[.br]</code></strong><a class="copiable-link" href='#index-_005cn_005b_002ebr_005d'> ¶</a></span></dt>
<dd><a class="index-entry-id" id="index-_002ebr-1"></a>
<p>This read-only register interpolates 1 if the currently executing
macro was called using the normal control character and 0
otherwise. If a macro is interpolated as a string, the <code class="code">.br</code>
register’s value is inherited from the context of the string
interpolation. See <a class="xref" href="Strings.html">Strings</a>.
</p>
<a class="index-entry-id" id="index-intercepting-requests"></a>
<a class="index-entry-id" id="index-requests_002c-intercepting"></a>
<a class="index-entry-id" id="index-modifying-requests"></a>
<a class="index-entry-id" id="index-requests_002c-modifying"></a>
<p>Use this register to reliably intercept requests that imply breaks.
</p>
<div class="example">
<div class="group"><pre class="example-preformatted">.als bp*orig bp
.de bp
. ie \\n[.br] .bp*orig
. el 'bp*orig
..
</pre></div></div>
<p>Testing the <code class="code">.br</code> register outside of a macro definition makes no
sense.
</p></dd></dl>
</div>
<hr>
<div class="nav-panel">
<p>
Next: <a href="Invoking-Requests.html">Invoking Requests</a>, Previous: <a href="Formatter-Instructions.html">Formatter Instructions</a>, Up: <a href="Formatter-Instructions.html">Formatter Instructions</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>
|