From dc46ab6bfd735505b1fbb4b4fe21a226dd0f4e72 Mon Sep 17 00:00:00 2001 From: Stephen Finucane Date: Mon, 15 Jun 2020 11:14:16 +0100 Subject: [PATCH] README: Add quick into to Sphinx Mention support for Sphinx by way of a quick intro. People seeking more information can refer to the manual. Signed-off-by: Stephen Finucane Closes: #535 --- README.rst | 32 +++++++++++++++++++++++++++++--- 1 file changed, 29 insertions(+), 3 deletions(-) diff --git a/README.rst b/README.rst index 41c0cf474..957b5ee11 100644 --- a/README.rst +++ b/README.rst @@ -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 @@ -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 @@ -95,3 +97,27 @@ Usage To convert a reStructuredText document to a PDF, simply run:: $ rst2pdf 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