From faef5eb1741ab60efcf6f8140bc0366489f57928 Mon Sep 17 00:00:00 2001 From: Stephen Finucane Date: Mon, 15 Jun 2020 11:14:16 +0100 Subject: [PATCH] README: Add quick intro 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 | 35 +++++++++++++++++++++++++++++++---- 1 file changed, 31 insertions(+), 4 deletions(-) diff --git a/README.rst b/README.rst index afe7a09ed..429908ec3 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 @@ -96,10 +98,35 @@ 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 + Contributing ------------ -rst2pdf wishes to be a welcoming community. With that in mind, please refer to our `CODE_OF_CONDUCT`__. +rst2pdf wishes to be a welcoming community. With that in mind, please refer to our `Community Code of Conduct`__. __ CODE_OF_CONDUCT.rst +