johnthagen
johnthagen

Reputation: 9159

How can the line wrapping width on Sphinx with alabaster be increased?

Is there a simple way to increase the line wrapping width when using html_theme = 'alabaster' using Sphinx 1.3.1?

alabaster is now the default theme and looks great except that it wraps lines very tightly, and I'd like to be able to configure this.

Upvotes: 11

Views: 3458

Answers (1)

IKavanagh
IKavanagh

Reputation: 6187

The alabaster theme sets the default page width to 940px using CSS. You can alter this using one of its options page_width. Valid values for this can be anything from auto to a px, cm or em or even a percentage. For more on valid values w3schools.com has a good page where you can play around with things. To set the page width you would add the following to your conf.py replacing auto with your desired width

html_theme_options = {
    'page_width': 'auto',
}

The alabaster theme also includes the sidebar_width option that works in the exact same way as the page_width option. It defaults to 220px. You can find more information on its theme options at it PyPi.

Upvotes: 25

Related Questions