Skip to content

Latest commit

 

History

History
66 lines (41 loc) · 3.43 KB

examples.md

File metadata and controls

66 lines (41 loc) · 3.43 KB
title
Examples

rst2pdf Examples

Here are a few examples of the kinds of things that rst2pdf can do, along with the source and style files so that you can use them as starting points for your own projects. You are very welcome to suggest additional examples by opening an issue on our source repo and to add your own examples - follow the CONTRIBUTING.md file for more information.

Basic Document

A simple document with some headings and the basic rst2pdf styling.

Document with Simple Styling

The same basic document with some styles added.

Basic Presentation: Dark and Light Themes

Here is a simple sample presentation (inspired by https://github.com/akrabat/rst2pdf_example_presentation), with both dark and light styles. These could be a starting point for your own presentations.

Code Samples

A document with a few code samples (pull requests to expand the set are very welcome) to show how to use the syntax highlight. You can use any of the built in styles or create your own!

  • PDF: code1.pdf
  • Content: code1.rst
  • Command: rst2pdf code1.rst .... try using some of the built in stylesheets such as murphy, solarized-light or xcode to change the way the code looks.

Tip: to set the background, use the backColor directive in the code section of your style file.

Structured Document

This document has automatically numbered headings and a generated table of contents. These are ReStructuredText Directives, more info in the docs for that here: https://docutils.sourceforge.io/docs/ref/rst/directives.html#document-parts