Search code examples
cssrestructuredtextrst2pdf

rst2pdf header / footer text color


How can I change the header / footer text color in the style sheet?

I tried, fruitlessly:

footer: {
  parent: normal,
  alignment: TA_CENTER,
  textColor: red
},

Solution

  • The header or footer are not really styled that way because they are arbitrary restructured text.

    So, if you want to change the color, the easiest way is probably to use a class, or a role.

    So, you could do:

    .. footer::
    
       class:: foo
    
       This is the footer, with style foo
    

    Or

    .. footer::
    
       :foo:`This is the footer with style foo`
    

    If you do the latter, you will have to add a

    .. role:: foo
    

    somewhere.