<?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-texinfo" role="wrap">
  <?dbhtml filename="texinfo.html"?>

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

  <title>Texinfo-&texinfo-version;</title>

  <indexterm zone="ch-system-texinfo">
    <primary sortas="a-Texinfo">Texinfo</primary>
  </indexterm>

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

    <para>Texinfo 软件包包含阅读、编写和转换 info 页面的程序。</para>

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

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

  </sect2>

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

    <para>修复一个在退化测试中产生大量失败的文件：</para>

<screen><userinput remap="pre">sed -i '5481,5485 s/({/(\\{/' tp/Texinfo/Parser.pm</userinput></screen>

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

<screen><userinput remap="configure">./configure --prefix=/usr --disable-static</userinput></screen>

    <variablelist>
      <title>配置选项的含义：</title>

      <varlistentry>
        <term><parameter>--disable-static</parameter></term>
        <listitem>
          <para>在本例中，顶层配置脚本会抱怨说这是一个无法识别的选项，
          	  但 XSParagraph 配置脚本能够识别它，并禁止将静态库
			  <filename class="libraryfile">XSParagraph.a</filename>
			  安装到
			  <filename class="directory">/usr/lib/texinfo</filename>。
		  </para>
        </listitem>
      </varlistentry>

    </variablelist>

    <para>编译该软件包：</para>

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

    <para>运行以下命令以测试编译结果：</para>

<screen><userinput remap="test">make check</userinput></screen>

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

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

    <para>可选地，安装属于 TeX 环境的组件：</para>
    <!-- FIXME: doesn't the TeX installation in BLFS overwrite files there? -->

<screen><userinput remap="install">make TEXMF=/usr/share/texmf install-tex</userinput></screen>

    <variablelist>
      <title>make 命令参数的含义：</title>

      <varlistentry>
        <term><parameter>TEXMF=/usr/share/texmf</parameter></term>
        <listitem>
          <para><envar>TEXMF</envar> Makefile 变量包含之后可能安装的 TeX
			  软件包的 TeX 目录树根位置。</para>
        </listitem>
      </varlistentry>

    </variablelist>

    <!--para>The Info documentation system uses a plain text file to hold its list of
    menu entries. The file is located at <filename>/usr/share/info/dir</filename>.
    Unfortunately, due to occasional problems in the Makefiles of various packages,
    it can sometimes get out of sync with the info pages installed on the system.
    If the <filename>/usr/share/info/dir</filename> file ever needs to be
    recreated, the following optional commands will accomplish the task:</para-->
    <para>Info 文档系统使用纯文本文件保存目录项的列表，
		该文件位于 <filename>/usr/share/info/dir</filename>。
		不幸的是，由于一些软件包 Makefile 中的偶然问题，
		它偶尔会与系统实际安装的 info 页面不同步。
		如果需要重新创建 <filename>/usr/share/info/dir</filename> 文件，
		可以运行以下命令完成这一工作：</para>

<screen role="nodump"><userinput>pushd /usr/share/info
rm -v dir
for f in *
  do install-info $f dir 2&gt;/dev/null
done
popd</userinput></screen>

  </sect2>

  <sect2 id="contents-texinfo" role="content">
    <title>Texinfo 的内容</title>

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

      <seglistitem>
        <seg>info, install-info, makeinfo (到 texi2any 的链接),
        pdftexi2dvi, pod2texi, texi2any, texi2dvi, texi2pdf, 以及 texindex</seg>
        <seg>XSParagraph.so</seg>
        <seg>/usr/share/texinfo 和 /usr/lib/texinfo</seg>
      </seglistitem>
    </segmentedlist>

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

      <varlistentry id="info">
        <term><command>info</command></term>
        <listitem>
          <para>用于阅读和 man 页面类似的 info 页面，
			  man 页面一般只解释可用的命令行选项，而 info 页面更为深入
			  [例如，可以对比 <command>man bison</command> 和
			  <command>info bison</command>。]</para>
          <indexterm zone="ch-system-texinfo info">
            <primary sortas="b-info">info</primary>
          </indexterm>
        </listitem>
      </varlistentry>

      <varlistentry id="install-info">
        <term><command>install-info</command></term>
        <listitem>
          <para>用于安装 info 页面；该命令更新
          <command>info</command> 索引文件</para>
          <indexterm zone="ch-system-texinfo install-info">
            <primary sortas="b-install-info">install-info</primary>
          </indexterm>
        </listitem>
      </varlistentry>

      <varlistentry id="makeinfo">
        <term><command>makeinfo</command></term>
        <listitem>
          <para>将给定 Texinfo 源代码文档转换成 info 页面、
          纯文本或 HTML</para>
          <indexterm zone="ch-system-texinfo makeinfo">
            <primary sortas="b-makeinfo">makeinfo</primary>
          </indexterm>
        </listitem>
      </varlistentry>

      <varlistentry id="pdftexi2dvi">
        <term><command>pdftexi2dvi</command></term>
        <listitem>
          <para>将给定 Texinfo 文档格式化为可移植文档格式（PDF）文件</para>
          <indexterm zone="ch-system-texinfo pdftexi2dvi">
            <primary sortas="b-pdftexi2dvi">pdftexi2dvi</primary>
          </indexterm>
        </listitem>
      </varlistentry>

      <varlistentry id="pod2texi">
        <term><command>pod2texi</command></term>
        <listitem>
          <para>将 Pod 转换成 Texinfo 格式</para>
          <indexterm zone="ch-system-texinfo pod2texi">
            <primary sortas="b-pod2texi">pod2texi</primary>
          </indexterm>
        </listitem>
      </varlistentry>

      <varlistentry id="texi2any">
        <term><command>texi2any</command></term>
        <listitem>
          <para>将 Texinfo 文档转换成其他几种格式</para>
          <indexterm zone="ch-system-texinfo texi2any">
            <primary sortas="b-texiany">texi2any</primary>
          </indexterm>
        </listitem>
      </varlistentry>

      <varlistentry id="texi2dvi">
        <term><command>texi2dvi</command></term>
        <listitem>
          <para>将给定 Texinfo 文档格式化为可打印的设备无关文件</para>
          <indexterm zone="ch-system-texinfo texi2dvi">
            <primary sortas="b-texi2dvi">texi2dvi</primary>
          </indexterm>
        </listitem>
      </varlistentry>

      <varlistentry id="texi2pdf">
        <term><command>texi2pdf</command></term>
        <listitem>
          <para>将给定 Texinfo 文档格式化为可移植文档格式（PDF）文件</para>
          <indexterm zone="ch-system-texinfo texi2pdf">
            <primary sortas="b-texi2pdf">texi2pdf</primary>
          </indexterm>
        </listitem>
      </varlistentry>

      <varlistentry id="texindex">
        <term><command>texindex</command></term>
        <listitem>
          <para>用于排序 Texinfo 索引文件</para>
          <indexterm zone="ch-system-texinfo texindex">
            <primary sortas="b-texindex">texindex</primary>
          </indexterm>
        </listitem>
      </varlistentry>

    </variablelist>

  </sect2>

</sect1>
