Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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.

like image 384
phoenix Avatar asked Aug 24 '15 18:08

phoenix


1 Answers

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.

like image 128
IKavanagh Avatar answered Sep 19 '22 07:09

IKavanagh