Convert

Other file formats can be converted to reStructuredText with Pandoc.

Installation of Pandoc

Pandoc is a powerful document conversion utility. We use it for simple conversions, but it is capable of much more.

Installation

You can install Pandoc for the different platforms:

$  sudo apt install pandoc
$  brew install pandoc
$  choco install pandoc

Convert

In the terminal, navigate to the directory containing the documents to be converted. Then enter the command pandoc -s --toc -f INPUT_FORMAT -t rst MYDOC.SUFFIX:

-s

creates an independent document

--toc

creates a table of contents (optional)

-t

creates a reStructuredText output

-f

tells Pandoc the input format. You can find an overview of the available input formats in General options.

Correcting the converted document

The extent of the correction for the converted document depends on the file format you are converting from. Here are a few things you should pay attention to:

  • Multi-line titles must be converted to single-line titles

  • Independent ** characters

  • ***BOLD*** should be **BOLD**

  • Incorrect tables