Skip to content

Commit

Permalink
README: Add quick into to Sphinx
Browse files Browse the repository at this point in the history
Mention support for Sphinx by way of a quick intro. People seeking more
information can refer to the manual.

Signed-off-by: Stephen Finucane <stephen@that.guru>
Closes: #535
  • Loading branch information
stephenfin committed Jun 15, 2020
1 parent af4c411 commit dc46ab6
Showing 1 changed file with 29 additions and 3 deletions.
32 changes: 29 additions & 3 deletions README.rst
Expand Up @@ -10,10 +10,9 @@
.. image:: https://img.shields.io/pypi/l/rst2pdf.svg
:target: https://pypi.org/project/rst2pdf/


========================================
=======================================
rst2pdf: Use a text editor. Make a PDF.
========================================
=======================================

The usual way of creating PDF from reStructuredText is by going through LaTeX.
This tool provides an alternative by producing PDF directly using the ReportLab
Expand Down Expand Up @@ -48,8 +47,11 @@ Features

* Supports hyphenation and kerning (using wordaxe).

* `Sphinx`__ integration

* `Full user's manual`__

__ https://www.sphinx-doc.org/
__ https://rst2pdf.org/static/manual.pdf


Expand Down Expand Up @@ -95,3 +97,27 @@ Usage
To convert a reStructuredText document to a PDF, simply run::

$ rst2pdf <document name> output.pdf

For information on available options, use ``-h``::

$ rst2pdf -h

To enable basic integration with Sphinx, modify your ``conf.py`` file to enable
the ``rst2pdf.pdfbuilder`` extension and configure the ``pdf_documents``
option. For example::

extensions = [
# ...
'rst2pdf.pdfbuilder',
]

# Grouping the document tree into PDF files. List of tuples
# (source start file, target name, title, author, options).
pdf_documents = [
('index', 'MyProject', 'My Project', 'Author Name'),
]

For information on the ``pdf_documents`` option and the many other options
available, refer to the `manual`__.

__ https://rst2pdf.org/static/manual.pdf

0 comments on commit dc46ab6

Please sign in to comment.