有什么简单的方法可以查看texi文件?

我正在阅读一些我计划使用的图书馆文件,这些文件的扩展名是'.texi',虽然我可以在gedit中打开这些文件,但是所有的语法和标记使得阅读变得困难。而且,我无法使用文档中的嵌入链接。有没有一个专门用于阅读.texi文件的程序?顺便说一下,我正在使用Ubuntu 13.10。谢谢!
3个回答

使用texinfo软件包中的makeinfo命令
sudo apt install texinfo
makeinfo --html --no-split -o a.html a.texi
firefox a.html

您还可以选择转换为其他多种格式,如果您喜欢的话:
  • makeinfo a.texi

    生成一个a.info文件,可以使用以下命令打开:

    info -f a.info
    

    这是最“本地”的GNU文档格式。

  • makeinfo --pdf a.info

    需要LaTeX。

texi2html在2011年似乎已经被弃用:http://www.nongnu.org/texi2html/

Texi2HTML的开发以及基于Texi2HTML的makeinfo实现在2011年停止。

在Ubuntu 20.04上进行了测试。

Binutils文档

以下是如何构建像GDB和GAS这样的Binutils文档,它们采用texinfo格式,并转换为单个HTML页面的方法:https://unix.stackexchange.com/questions/477303/how-to-build-the-gdb-documentation-from-source/477309#477309


安装texi2html以将Texinfo文件转换为HTML:
sudo apt-get install texi2html

texi2html的手册页面:

SYNOPSIS

   texi2html [options] file

DESCRIPTION

   Texi2html  converts  the  given Texinfo file to a set of HTML files. It
   tries to handle most of the  Texinfo  commands.  It  creates  hypertext
   links for cross-references, footnotes...

   Texi2html  may furthermore use latex2html to generate HTML (code and/or
   images) for @math and @iftex tags (see the --l2h option).

   Texi2html creates several files depending on the contents of  the  Tex‐
   info file and on the chosen options (see FILES).

   The  HTML  files created by texi2html are in general closer to TeX than
   to Info. Using init files (see the --init-file option), other styles or
   output formats may be selected.

[...]


4我认为“texinfo”在2011年就停止维护了,而现在更推荐使用“makeinfo --html”,这是它的首选方式。具体内容请参考:http://askubuntu.com/a/644387/52975 - Ciro Santilli OurBigBook.com
1我觉得你的意思是 texi2html 被停用了,而不是 texinfo - AJM
@AJM就像我刚说的,我认为texi2html在2011年已经停用了,而makeinfo --html更受推荐;-) - Ciro Santilli OurBigBook.com

你可以使用texiinfo:
Texinfo使用一个单一的源文件来生成多种格式的输出,包括在线和打印版(dvi、html、info、pdf、xml等)。这意味着你只需要编写一个文档,而不是为在线信息和打印手册分别编写不同的文档。当需要进行修订时,你只需修改这一个文档即可。Texinfo系统与GNU Emacs紧密集成。
你可以从这里下载它,例如:
cd
wget http://ftp.gnu.org/gnu/texinfo/texinfo-6.0.tar.xz
tar xf texinfo-6.0.tar.xz

编译和安装:
cd texiinfo-6.0
./configure
make
sudo make install

安装后使用man texiinfo并学习如何转换它。

更多信息这里