I don't really know if the question I'm going to ask is appropriate for this site.

I'd like to create PDF documents from .texi files that are bundled in most packages from the GNU project (for example tar, coreutils, bash) as I prefer reading documentation in a PDF reader instead of a terminal. After several failed attempts, I managed to create working PDF documents with the following command: texi2dvi --pdf <name>.texi (sometimes the -e option is also needed, but the reason is obscure to me).

Is this method correct? Is there perhaps a better way to accomplish this?

For example, here there's a reference to a shell script called gendocs.sh. Should I use it instead?


The texi2dvi script is part of the GNU suite texinfo for documentation. From the same file one can get both printable documents and also info pages or HTML; the original documents are written in a dialect of TeX.

With the option -p or --pdf the printable document will be in PDF format. This is clearly the better way.

The -e option is so described in the man page:

  -e, -E, --expand
          force macro expansion using makeinfo

I guess it's quite an esoteric part of texinfo. :)

The gendoc.sh seems to be a generic documentation maker in a wide range of formats that, for producing PDF, uses precisely texi2dvi --pdf.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.