Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7805637
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T02:17:10+00:00 2026-06-02T02:17:10+00:00

I found this guide for rst2pdf to find out how to style a reStructuredText

  • 0

I found this guide for rst2pdf to find out how to style a reStructuredText file in the resulting pdf document. Having the following in my JSON stylesheet, for example, it is successfully applied to the whole document:

"pageSetup" : {
    "size": "A4",
    "width": null,
    "height": null,
    "margin-top": "2cm",
    [...]
    "margin-gutter": "0cm"
}

How is a particular style applied only to a specific class? For example, how can I apply a particular font the to the h1 class? My immediate difficulty stems from the fact that I’m unsure about whether it’s actually called h1, H1, header1, or Header1.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-02T02:17:13+00:00Added an answer on June 2, 2026 at 2:17 am

    The rst2pdf.py manual does not seem very informative with regards to the style names. However, the section on Styles (chapter 8) has this example:

    ["heading1" , {
      "parent": "normal",
      "fontName": "Tuffy_Bold",
      "fontSize": 18,
      "keepWithNext": true,
      "spaceAfter": 6
    }],
    

    So it seems that heading1 is the appropriate style name.

    One thing to note is that

    If your document requires a style that is not defined in your stylesheet, it will print a warning and use bodytext instead.

    So presuming that you don’t get any warnings when generating your document the styles must be set in the default stylesheet, so have a look through this to get a feel for the style names used.

    You can make rst2pdf print the default stylesheet using

    rst2pdf --print-stylesheet
    

    If you want to add styles, just create a stylesheet, (or take the standard stylesheet and modify it) and pass it with the -s option

    rst2pdf mydoc.txt -s mystyles.txt
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm following this guide here: http://www.cyberciti.biz/tips/find-out-if-file-exists-with-conditional-expressions.html Every time I run: $ [ -f /etc/passwd
I'm following this guide (most detailed I've found so far): http://blog.allanglen.com/2009/09/quickly-generate-c-data-objects-from-xml But at Step
Found this rather strange bug in IE8; element.style.top is limited to 1342177 pixels. Even
Found this is some example CSS I was reading and I'm having a hard
I want to create an Application with tabs, and I have found this guide
I'm trying to speed up my site and found this site: http://www.computingunleashed.com/speed-up-wordpress-ultimate-guide-to-make-sites-super-fast.html , which
I'm following this Hiphop installation guide: https://github.com/facebook/hiphop-php/wiki/Building-and-installing-on-ubuntu-10.10 And when I try to make it,
I am using this guide to use Django 'out-of-box' with Google App Engine using
I am following this guide (http://devcenter.heroku.com/articles/omniauth-and-force-com) in hooking up Salesforce.com REST API with ruby
I am trying to create a Nuget package from my project following this guide

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.