summaryrefslogtreecommitdiffstats
path: root/doc/groff.html.node/troff-and-nroff-Modes.html
diff options
context:
space:
mode:
Diffstat (limited to 'doc/groff.html.node/troff-and-nroff-Modes.html')
-rw-r--r--doc/groff.html.node/troff-and-nroff-Modes.html114
1 files changed, 114 insertions, 0 deletions
diff --git a/doc/groff.html.node/troff-and-nroff-Modes.html b/doc/groff.html.node/troff-and-nroff-Modes.html
new file mode 100644
index 0000000..257d36e
--- /dev/null
+++ b/doc/groff.html.node/troff-and-nroff-Modes.html
@@ -0,0 +1,114 @@
+<!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>troff and nroff Modes (The GNU Troff Manual)</title>
+
+<meta name="description" content="troff and nroff Modes (The GNU Troff Manual)">
+<meta name="keywords" content="troff and nroff Modes (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="GNU-troff-Reference.html" rel="up" title="GNU troff Reference">
+<link href="Line-Layout.html" rel="next" title="Line Layout">
+<link href="Character-Translations.html" rel="prev" title="Character Translations">
+<style type="text/css">
+<!--
+a.copiable-link {visibility: hidden; text-decoration: none; line-height: 0em}
+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="section-level-extent" id="troff-and-nroff-Modes">
+<div class="nav-panel">
+<p>
+Next: <a href="Line-Layout.html" accesskey="n" rel="next">Line Layout</a>, Previous: <a href="Character-Translations.html" accesskey="p" rel="prev">Character Translations</a>, Up: <a href="GNU-troff-Reference.html" accesskey="u" rel="up">GNU <code class="code">troff</code> Reference</a> &nbsp; [<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>
+<h3 class="section" id="troff-and-nroff-Modes-1">5.14 <code class="code">troff</code> and <code class="code">nroff</code> Modes</h3>
+<a class="index-entry-id" id="index-troff-mode"></a>
+<a class="index-entry-id" id="index-mode_002c-troff"></a>
+<a class="index-entry-id" id="index-nroff-mode"></a>
+<a class="index-entry-id" id="index-mode_002c-nroff"></a>
+
+<p>Historically, <code class="code">nroff</code> and <code class="code">troff</code> were two separate programs;
+the former for terminal output, the latter for typesetters. GNU
+<code class="code">troff</code> merges both functions into one executable<a class="footnote" id="DOCF68" href="groff.html_fot.html#FOOT68"><sup>68</sup></a> that sends its output to a
+device driver (<code class="code">grotty</code> for terminal devices, <code class="code">grops</code> for
+PostScript, and so on) which interprets this intermediate output format.
+When discussing <abbr class="acronym">AT&amp;T</abbr> <code class="code">troff</code>, it makes sense to talk
+about <em class="dfn"><code class="code">nroff</code> mode</em> and <em class="dfn"><code class="code">troff</code> mode</em> since the
+differences are hard-coded. GNU <code class="code">troff</code> takes information from
+device and font description files without handling requests specially if
+a terminal output device is used, so such a strong distinction is
+unnecessary.
+</p>
+<p>Usually, a macro package can be used with all output devices.
+Nevertheless, it is sometimes necessary to make a distinction between
+terminal and non-terminal devices: GNU <code class="code">troff</code> provides two
+built-in conditions &lsquo;<samp class="samp">n</samp>&rsquo; and &lsquo;<samp class="samp">t</samp>&rsquo; for the <code class="code">if</code>, <code class="code">ie</code>,
+and <code class="code">while</code> requests to decide whether GNU <code class="code">troff</code> shall
+behave like <code class="code">nroff</code> or like <code class="code">troff</code>.
+</p>
+<dl class="first-deffn">
+<dt class="deffn" id="index-_002etroff"><span class="category-def">Request: </span><span><strong class="def-name"><code class="t">.troff</code></strong><a class="copiable-link" href='#index-_002etroff'> &para;</a></span></dt>
+<dd><a class="index-entry-id" id="index-troff"></a>
+<a class="index-entry-id" id="index-troffrc-4"></a>
+<a class="index-entry-id" id="index-troffrc_002dend-2"></a>
+<p>Make the &lsquo;<samp class="samp">t</samp>&rsquo; built-in condition true (and the &lsquo;<samp class="samp">n</samp>&rsquo; built-in
+condition false) for <code class="code">if</code>, <code class="code">ie</code>, and <code class="code">while</code> conditional
+requests. This is the default if GNU <code class="code">troff</code> (<em class="emph">not</em>
+<code class="code">groff</code>) is started with the <samp class="option">-R</samp> switch to avoid loading of
+the startup files <samp class="file">troffrc</samp> and <samp class="file">troffrc-end</samp>. Without
+<samp class="option">-R</samp>, GNU <code class="code">troff</code> stays in <code class="code">troff</code> mode if the output
+device is not a terminal (e.g., &lsquo;ps&rsquo;).
+</p></dd></dl>
+
+<dl class="first-deffn">
+<dt class="deffn" id="index-_002enroff"><span class="category-def">Request: </span><span><strong class="def-name"><code class="t">.nroff</code></strong><a class="copiable-link" href='#index-_002enroff'> &para;</a></span></dt>
+<dd><a class="index-entry-id" id="index-nroff"></a>
+<a class="index-entry-id" id="index-tty_002etmac"></a>
+<p>Make the &lsquo;<samp class="samp">n</samp>&rsquo; built-in condition true (and the &lsquo;<samp class="samp">t</samp>&rsquo; built-in
+condition false) for <code class="code">if</code>, <code class="code">ie</code>, and <code class="code">while</code> conditional
+requests. This is the default if GNU <code class="code">troff</code> uses a terminal
+output device; the code for switching to <code class="code">nroff</code> mode is in the
+file <samp class="file">tty.tmac</samp>, which is loaded by the startup file
+<code class="code">troffrc</code>.
+</p></dd></dl>
+
+<p>See <a class="xref" href="Conditionals-and-Loops.html">Conditionals and Loops</a>, for more details on built-in conditions.
+</p>
+
+
+</div>
+<hr>
+<div class="nav-panel">
+<p>
+Next: <a href="Line-Layout.html">Line Layout</a>, Previous: <a href="Character-Translations.html">Character Translations</a>, Up: <a href="GNU-troff-Reference.html">GNU <code class="code">troff</code> Reference</a> &nbsp; [<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>