Index of /sandbox/texinfo-writer

[ICO]NameLast modifiedSizeDescription

[PARENTDIR]Parent Directory   -  
[DIR]tools/ 2018-06-17 08:52 -  
[TXT]texinfo.py 2018-06-17 08:52 30K 
[TXT]test_texinfo.py 2018-06-17 08:52 4.1K 
[   ]setup.py 2018-06-17 08:52 1.1K 
[   ]rst2texinfo.py 2018-06-17 08:52 409  
[TXT]Makefile 2018-06-17 08:52 1.0K 

rst2texinfo

rst2texinfo

Author:

Jon Waltman

Contact:
jonathan.waltman@gmail.com

rst2texinfo is an extension of the Docutils text processing system which adds support for generating Texinfo files from reStructuredText.

Introduction

The purpose of this program is to generate Info files from reStructuredText documents. Info is the underlying format of the on-line help system used by the GNU Project. This system provides a useful and convenient method for reading manuals from the terminal or within the Emacs text editor. Although, the focus of this program is to produce Info output, Texinfo can also be used to generate a variety of different formats, including HTML, Latex, and plain text. More information on Texinfo can be found at http://www.gnu.org/software/texinfo/.

rst2texinfo uses the following components:

To create Info files, you will need the "makeinfo" program which is part of the Texinfo project.

Install

python setup.py install

Invoking rst2texinfo

rst2texinfo.py [options] [<source> [<destination>]]

Reads reStructuredText from source and writes Texinfo to destination.

Texinfo Specific Options

In addition to the general options provided by Docutils, the following options affect the output of rst2texinfo.

--texinfo-filename=<file>

Specify the name of the Info file that would be created after running makeinfo on the generated Texinfo file. Default behavior is to use the base name of the input source.

--texinfo-dir-entry=<name>

Specify the name of the entry to create in the top level DIR menu file.

To create this entry, run install-info on the generated Info file.

--texinfo-dir-description=<desc>

Descriptive text to appear in the top-level DIR menu file.

--texinfo-dir-category=<category>

Specifies the section which this entry will appear in the top-level DIR menu file.

Converting Texinfo to Info

After converting your reStructuredText document to Texinfo, the next step is to convert the Texinfo file to Info. To do this, you will need to use the makeinfo program. Refer to the documentation for more details but its general usage is:

makeinfo --no-split FILENAME.texi

This should create a file named FILENAME.info which can then be read using an "Info reader".

Reading Info Files

There are two main programs for reading Info files, info and GNU Emacs. The info program has less features but is available on most *nix environments and can be quickly accessed at the terminal. Emacs provides better font color displays and supports extensive customization (of course).

Issues

The conversion of reST to Texinfo is not a seamless transition. Info is not as sophisticated as HTML which creates several issues since most reST documents are geared for HTML output. The following sections describe some of these issues.

Notes

The following notes may be helpful if you want to create Texinfo files: