<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
  "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
  <!ENTITY % general-entities SYSTEM "../general.ent">
  %general-entities;
]>

<sect1 id="ch-system-groff" role="wrap">
  <?dbhtml filename="groff.html"?>

  <sect1info condition="script">
    <productname>groff</productname>
    <productnumber>&groff-version;</productnumber>
    <address>&groff-url;</address>
  </sect1info>

  <title>Groff-&groff-version;</title>

  <indexterm zone="ch-system-groff">
    <primary sortas="a-Groff">Groff</primary>
  </indexterm>

  <sect2 role="package">
    <title/>

    <para>Groff 软件包包含处理和格式化文本的程序。</para>

    <segmentedlist>
      <segtitle>&buildtime;</segtitle>
      <segtitle>&diskspace;</segtitle>

      <seglistitem>
        <seg>&groff-ch6-sbu;</seg>
        <seg>&groff-ch6-du;</seg>
      </seglistitem>
    </segmentedlist>

  </sect2>

  <sect2 role="installation">
    <title>安装 Groff</title>

    <para>Groff 期望环境变量 <envar>PAGE</envar> 包含默认纸张大小。
		对于美国用户来说，<parameter>PAGE=letter</parameter> 是正确的。
		对于其他地方的用户，<parameter>PAGE=A4</parameter> 可能更好。
		尽管在编译时配置了默认纸张大小，可以通过向
		<filename>/etc/papersize</filename> 文件写入
		<quote>A4</quote> 或 <quote>letter</quote> 覆盖默认值。</para>

    <para>准备安装 Groff：</para>

<screen><userinput remap="configure">PAGE=<replaceable>&lt;paper_size&gt;</replaceable> ./configure --prefix=/usr</userinput></screen>

    <para>该软件包不支持并行构建。编译该软件包：</para>

<screen><userinput remap="make">make -j1</userinput></screen>

    <para>该软件包不包含测试套件。</para>

    <para>安装该软件包：</para>

<screen><userinput remap="install">make install</userinput></screen>

  </sect2>

  <sect2 id="contents-groff" role="content">
  <title>Groff 的内容</title>

    <segmentedlist>
      <segtitle>安装的程序</segtitle>
      <segtitle>安装的目录</segtitle>

      <seglistitem>
        <seg>addftinfo, afmtodit, chem, eqn, eqn2graph, gdiffmk, glilypond,
        gperl, gpinyin, grap2graph, grn, grodvi, groff, groffer, grog, grolbp,
        grolj4, gropdf, grops, grotty, hpftodit, indxbib, lkbib, lookbib,
        mmroff, neqn, nroff, pdfmom, pdfroff, pfbtops, pic, pic2graph,
        post-grohtml, preconv, pre-grohtml, refer, roff2dvi, roff2html,
        roff2pdf, roff2ps, roff2text, roff2x, soelim, tbl, tfmtodit, 以及
        troff</seg>
        <seg>/usr/lib/groff, /usr/share/doc/groff-&groff-version;,
        以及 /usr/share/groff</seg>
      </seglistitem>
    </segmentedlist>

    <variablelist>
      <bridgehead renderas="sect3">简要描述</bridgehead>
      <?dbfo list-presentation="list"?>
      <?dbhtml list-presentation="table"?>

      <varlistentry id="addftinfo">
        <term><command>addftinfo</command></term>
        <listitem>
          <para>读取 troff 字体文件并为其添加 <command>groff</command>
          系统使用的一些额外字体规格信息</para>
          <indexterm zone="ch-system-groff addftinfo">
            <primary sortas="b-addftinfo">addftinfo</primary>
          </indexterm>
        </listitem>
      </varlistentry>

      <varlistentry id="afmtodit">
        <term><command>afmtodit</command></term>
        <listitem>
          <para>创建供 <command>groff</command> 和
          <command>grops</command> 使用的字体文件</para>
          <indexterm zone="ch-system-groff afmtodit">
            <primary sortas="b-afmtodit">afmtodit</primary>
          </indexterm>
        </listitem>
      </varlistentry>

      <varlistentry id="chem">
        <term><command>chem</command></term>
        <listitem>
          <para>产生化学结构式的 groff 预处理器</para>
          <indexterm zone="ch-system-groff chem">
            <primary sortas="b-chem">chem</primary>
          </indexterm>
        </listitem>
      </varlistentry>

      <varlistentry id="eqn">
        <term><command>eqn</command></term>
        <listitem>
          <para>将 troff 输入文件中嵌入的公式描述编译成
          <command>troff</command> 理解的命令</para>
          <indexterm zone="ch-system-groff eqn">
            <primary sortas="b-eqn">eqn</primary>
          </indexterm>
        </listitem>
      </varlistentry>

      <varlistentry id="eqn2graph">
        <term><command>eqn2graph</command></term>
        <listitem>
          <para>将 troff EQN （公式）转换成裁减好的图像</para>
          <indexterm zone="ch-system-groff eqn2graph">
            <primary sortas="b-eqn2graph">eqn2graph</primary>
          </indexterm>
        </listitem>
      </varlistentry>

      <varlistentry id="gdiffmk">
        <term><command>gdiffmk</command></term>
        <listitem>
			<para>标出 groff/nroff/troff 文件的区别</para>
          <indexterm zone="ch-system-groff gdiffmk">
            <primary sortas="b-gdiffmk">gdiffmk</primary>
          </indexterm>
        </listitem>
      </varlistentry>

      <varlistentry id="glilypond">
        <term><command>glilypond</command></term>
        <listitem>
          <para>将 lilypond 语言写成的乐谱转换为 groff 语言</para>
          <indexterm zone="ch-system-groff glilypond">
            <primary sortas="b-glilypond">glilypond</primary>
          </indexterm>
        </listitem>
      </varlistentry>

      <varlistentry id="gperl">
        <term><command>gperl</command></term>
        <listitem>
          <para>groff 预处理器，允许在 groff 文件中增加 perl 代码</para>
          <indexterm zone="ch-system-groff gperl">
            <primary sortas="b-gperl">gperl</primary>
          </indexterm>
        </listitem>
      </varlistentry>

      <varlistentry id="gpinyin">
        <term><command>gpinyin</command></term>
        <listitem>
          <para>groff 的预处理器，允许在 groff 文件中增加汉语拼音</para>
          <indexterm zone="ch-system-groff gpinyin">
            <primary sortas="b-gpinyin">gpinyin</primary>
          </indexterm>
        </listitem>
      </varlistentry>

      <varlistentry id="grap2graph">
        <term><command>grap2graph</command></term>
        <listitem>
          <para>将 grap 图形转换成裁减好的位图图像</para>
          <indexterm zone="ch-system-groff grap2graph">
            <primary sortas="b-grap2graph">grap2graph</primary>
          </indexterm>
        </listitem>
      </varlistentry>

      <varlistentry id="grn">
        <term><command>grn</command></term>
        <listitem>
          <para>用于 gremlin 文件的<command>groff</command> 预处理器</para>
          <indexterm zone="ch-system-groff grn">
            <primary sortas="b-grn">grn</primary>
          </indexterm>
        </listitem>
      </varlistentry>

      <varlistentry id="grodvi">
        <term><command>grodvi</command></term>
        <listitem>
          <para><command>groff</command> 的驱动程序，
          	  生成 TeX dvi 格式</para>
          <indexterm zone="ch-system-groff grodvi">
            <primary sortas="b-grodvi">grodvi</primary>
          </indexterm>
        </listitem>
      </varlistentry>

      <varlistentry id="groff">
        <term><command>groff</command></term>
        <listitem>
          <para>groff 文档格式化系统的前端；一般来说，它运行
          <command>troff</command> 程序和一个适用于选定设备的后处理器
          </para>
          <indexterm zone="ch-system-groff groff">
            <primary sortas="b-groff">groff</primary>
          </indexterm>
        </listitem>
      </varlistentry>

      <varlistentry id="groffer">
        <term><command>groffer</command></term>
        <listitem>
          <para>在 X 和 tty 终端显示 groff 文件和 man 页面</para>
          <indexterm zone="ch-system-groff groffer">
            <primary sortas="b-groffer">groffer</primary>
          </indexterm>
        </listitem>
      </varlistentry>

      <varlistentry id="grog">
        <term><command>grog</command></term>
        <listitem>
          <para>读取文件，并猜测 <command>groff</command> 选项
          <option>-e</option>, <option>-man</option>, <option>-me</option>,
          <option>-mm</option>, <option>-ms</option>, <option>-p</option>,
		  <option>-s</option>, 以及 <option>-t</option>
		  中哪一个在打印文件时时必须的，并报告包含这些选项的
		  <command>groff</command> 命令</para>
          <indexterm zone="ch-system-groff grog">
            <primary sortas="b-grog">grog</primary>
          </indexterm>
        </listitem>
      </varlistentry>

      <varlistentry id="grolbp">
        <term><command>grolbp</command></term>
        <listitem>
			<para>是一个用于 Canon CAPSL 打印机
				（LBP-4 和 LBP-8 系列激光打印机）的
				<command>groff</command> 驱动程序</para>
          <indexterm zone="ch-system-groff grolbp">
            <primary sortas="b-grolbp">grolbp</primary>
          </indexterm>
        </listitem>
      </varlistentry>

      <varlistentry id="grolj4">
        <term><command>grolj4</command></term>
        <listitem>
          <para>是一个生成用于 HP LaserJet 4 打印机的 PCL5 格式的
			  <command>groff</command> 驱动程序</para>
          <indexterm zone="ch-system-groff grolj4">
            <primary sortas="b-grolj4">grolj4</primary>
          </indexterm>
        </listitem>
      </varlistentry>

      <varlistentry id="gropdf">
        <term><command>gropdf</command></term>
        <listitem>
          <para>将 <command>troff</command> 输出转换成 PDF</para>
          <indexterm zone="ch-system-groff gropdf">
            <primary sortas="b-gropdf">gropdf</primary>
          </indexterm>
        </listitem>
      </varlistentry>

      <varlistentry id="grops">
        <term><command>grops</command></term>
        <listitem>
          <para>将 <command>troff</command> 输出转换成 PostScript</para>
          <indexterm zone="ch-system-groff grops">
            <primary sortas="b-grops">grops</primary>
          </indexterm>
        </listitem>
      </varlistentry>

      <varlistentry id="grotty">
        <term><command>grotty</command></term>
        <listitem>
          <para>将 <command>troff</command>
			  输出转换成用于打字机类设备的形式</para>
          <indexterm zone="ch-system-groff grotty">
            <primary sortas="b-grotty">grotty</primary>
          </indexterm>
        </listitem>
      </varlistentry>

      <varlistentry id="hpftodit">
        <term><command>hpftodit</command></term>
        <listitem>
          <para>根据 HP 标签的字体规格文件，
          	  创建用于 <command>groff -Tlj4</command>的字体文件</para>
          <indexterm zone="ch-system-groff hpftodit">
            <primary sortas="b-hpftodit">hpftodit</primary>
          </indexterm>
        </listitem>
      </varlistentry>

      <varlistentry id="indxbib">
        <term><command>indxbib</command></term>
        <listitem>
          <para>创建用于给定文件文献数据库的反向索引，
          	  以供 <command>refer</command>、<command>lookbib</command>
          	  以及 <command>lkbib</command> 使用</para>
          <indexterm zone="ch-system-groff indxbib">
            <primary sortas="b-indxbib">indxbib</primary>
          </indexterm>
        </listitem>
      </varlistentry>

      <varlistentry id="lkbib">
        <term><command>lkbib</command></term>
        <listitem>
          <para>在文献数据库中搜索包含指定关键字的引用，
          	  并报告找到的所有引用</para>
          <indexterm zone="ch-system-groff lkbib">
            <primary sortas="b-lkbib">lkbib</primary>
          </indexterm>
        </listitem>
      </varlistentry>

      <varlistentry id="lookbib">
        <term><command>lookbib</command></term>
        <listitem>
          <!--para>Prints a prompt on the standard error (unless the standard input
          is not a terminal), reads a line containing a set of keywords from the
          standard input, searches the bibliographic databases in a specified file
          for references containing those keywords, prints any references found
          on the standard output, and repeats this process until the end of
          input</para-->
          <para>在标准错误输出上显示命令提示符（除非标准输入不是终端），
			  读取包含一组关键字的行，
			  在给定文件的文献数据库中搜索包含这些关键字的引用，
			  将它们打印到标准输出，重复这一过程直到输入结束</para>
          <indexterm zone="ch-system-groff lookbib">
            <primary sortas="b-lookbib">lookbib</primary>
          </indexterm>
        </listitem>
      </varlistentry>

      <varlistentry id="mmroff">
        <term><command>mmroff</command></term>
        <listitem>
          <para><command>groff</command> 的简单预处理器</para>
          <indexterm zone="ch-system-groff mmroff">
            <primary sortas="b-mmroff">mmroff</primary>
          </indexterm>
        </listitem>
      </varlistentry>

      <varlistentry id="neqn">
        <term><command>neqn</command></term>
        <listitem>
          <para>将公式格式化为美国标准信息交换代码（ASCII）输出</para>
          <indexterm zone="ch-system-groff neqn">
            <primary sortas="b-neqn">neqn</primary>
          </indexterm>
        </listitem>
      </varlistentry>

      <varlistentry id="nroff">
        <term><command>nroff</command></term>
        <listitem>
          <para>一个使用 <command>groff</command> 仿真
          <command>nroff</command> 命令的脚本</para>
          <indexterm zone="ch-system-groff nroff">
            <primary sortas="b-nroff">nroff</primary>
          </indexterm>
        </listitem>
      </varlistentry>

      <varlistentry id="pdfmom">
        <term><command>pdfmom</command></term>
        <listitem>
          <para>一个 groff 包装器，提供从 mom 宏包编码的文件转换为 PDF
          文档的功能</para>
          <indexterm zone="ch-system-groff pdfmom">
            <primary sortas="b-pdfmom">pdfmom</primary>
          </indexterm>
        </listitem>
      </varlistentry>

      <varlistentry id="pdfroff">
        <term><command>pdfroff</command></term>
        <listitem>
          <para>用 groff 创建 PDF 文档</para>
          <indexterm zone="ch-system-groff pdfroff">
            <primary sortas="b-pdfroff">pdfroff</primary>
          </indexterm>
        </listitem>
      </varlistentry>

      <varlistentry id="pfbtops">
        <term><command>pfbtops</command></term>
        <listitem>
          <para>将 <filename class="extension">.pfb</filename>
          	  格式的 PostScript 字体转换为 ASCII</para>
          <indexterm zone="ch-system-groff pfbtops">
            <primary sortas="b-pfbtops">pfbtops</primary>
          </indexterm>
        </listitem>
      </varlistentry>

      <varlistentry id="pic">
        <term><command>pic</command></term>
        <listitem>
          <para>将 troff 或 TeX 输入文件中嵌入的图片描述编译成
          	  TeX 或 <command>troff</command> 理解的命令</para>
          <indexterm zone="ch-system-groff pic">
            <primary sortas="b-pic">pic</primary>
          </indexterm>
        </listitem>
      </varlistentry>

      <varlistentry id="pic2graph">
        <term><command>pic2graph</command></term>
        <listitem>
          <para>将 PIC 图示转换成裁切好的图像</para>
          <indexterm zone="ch-system-groff pic2graph">
            <primary sortas="b-pic2graph">pic2graph</primary>
          </indexterm>
        </listitem>
      </varlistentry>

      <varlistentry id="post-grohtml">
        <term><command>post-grohtml</command></term>
        <listitem>
          <para>将 GNU <command>troff</command> 的输出翻译成 HTML</para>
          <indexterm zone="ch-system-groff post-grohtml">
            <primary sortas="b-post-grohtml">post-grohtml</primary>
          </indexterm>
        </listitem>
      </varlistentry>

      <varlistentry id="preconv">
        <term><command>preconv</command></term>
        <listitem>
          <para>将输入文件的编码转换成 GNU
          <command>troff</command> 理解的格式</para>
          <indexterm zone="ch-system-groff preconv">
            <primary sortas="b-preconv">preconv</primary>
          </indexterm>
        </listitem>
      </varlistentry>

      <varlistentry id="pre-grohtml">
        <term><command>pre-grohtml </command></term>
        <listitem>
          <para>将 GNU <command>troff</command> 输出翻译成 HTML</para>
          <indexterm zone="ch-system-groff pre-grohtml">
            <primary sortas="b-pre-grohtml">pre-grohtml</primary>
          </indexterm>
        </listitem>
      </varlistentry>

      <varlistentry id="refer">
        <term><command>refer</command></term>
        <listitem>
          <para>将文件内容复制到标准输出，除了在
			  <emphasis>.[</emphasis> 和 <emphasis>.]</emphasis>
			  之间的行被解释为文献引用，
			  <emphasis>.R1</emphasis> 和 <emphasis>.R2</emphasis>
		      之间的行被解释为处理文献引用的方式</para>
          <indexterm zone="ch-system-groff refer">
            <primary sortas="b-refer">refer</primary>
          </indexterm>
        </listitem>
      </varlistentry>

      <varlistentry id="roff2dvi">
        <term><command>roff2dvi</command></term>
        <listitem>
          <para>将 roff 文件转换成 DVI 格式</para>
          <indexterm zone="ch-system-groff roff2dvi">
            <primary sortas="b-roff2dvi">roff2dvi</primary>
          </indexterm>
        </listitem>
      </varlistentry>

      <varlistentry id="roff2html">
        <term><command>roff2html</command></term>
        <listitem>
          <para>将 roff 文件转换成 HTML 格式</para>
          <indexterm zone="ch-system-groff roff2html">
            <primary sortas="b-roff2html">roff2html</primary>
          </indexterm>
        </listitem>
      </varlistentry>

      <varlistentry id="roff2pdf">
        <term><command>roff2pdf</command></term>
        <listitem>
          <para>将 roff 文件转换成 PDF</para>
          <indexterm zone="ch-system-groff roff2pdf">
            <primary sortas="b-roff2pdf">roff2pdf</primary>
          </indexterm>
        </listitem>
      </varlistentry>

      <varlistentry id="roff2ps">
        <term><command>roff2ps</command></term>
        <listitem>
          <para>将 roff 文件转换成 ps 文件</para>
          <indexterm zone="ch-system-groff roff2ps">
            <primary sortas="b-roff2ps">roff2ps</primary>
          </indexterm>
        </listitem>
      </varlistentry>

      <varlistentry id="roff2text">
        <term><command>roff2text</command></term>
        <listitem>
          <para>将 roff 文件转换成文本文件</para>
          <indexterm zone="ch-system-groff roff2text">
            <primary sortas="b-roff2text">roff2text</primary>
          </indexterm>
        </listitem>
      </varlistentry>

      <varlistentry id="roff2x">
        <term><command>roff2x</command></term>
        <listitem>
          <para>将 roff 文件转换成其他格式</para>
          <indexterm zone="ch-system-groff roff2x">
            <primary sortas="b-roff2x">roff2x</primary>
          </indexterm>
        </listitem>
      </varlistentry>

      <varlistentry id="soelim">
        <term><command>soelim</command></term>
        <listitem>
          <para>读取文件，将 <emphasis>.so file</emphasis>
			  形式的行替换为提到的 <emphasis>file</emphasis> 文件
          <emphasis>file</emphasis></para>
          <indexterm zone="ch-system-groff soelim">
            <primary sortas="b-soelim">soelim</primary>
          </indexterm>
        </listitem>
      </varlistentry>

      <varlistentry id="tbl">
        <term><command>tbl</command></term>
        <listitem>
          <para>将 troff 输入中嵌入的表格描述编译成 <command>troff</command>
          	  理解的命令</para>
          <indexterm zone="ch-system-groff tbl">
            <primary sortas="b-tbl">tbl</primary>
          </indexterm>
        </listitem>
      </varlistentry>

      <varlistentry id="tfmtodit">
        <term><command>tfmtodit</command></term>
        <listitem>
          <para>创建用于 <command>groff -Tdvi</command> 的字体文件</para>
          <indexterm zone="ch-system-groff tfmtodit">
            <primary sortas="b-tfmtodit">tfmtodit</primary>
          </indexterm>
        </listitem>
      </varlistentry>

      <varlistentry id="troff">
        <term><command>troff</command></term>
        <listitem>
          <para>和 UNIX <command>troff</command> 高度兼容；
			  它应该由 <command>groff</command> 命令调用，
			  后者也会以正确的顺序和选项运行预处理器和后处理器</para>
          <indexterm zone="ch-system-groff troff">
            <primary sortas="b-troff">troff</primary>
          </indexterm>
        </listitem>
      </varlistentry>

    </variablelist>

  </sect2>

</sect1>
