Sphinx mimize CSS template from default theme custom default theme CSS Template

Source: Internet
Author: User

By default, the python document tool sphinx generates tables to show complex content,
A little weak.

The lines on the left and right of the table are not neat .. (Personal opinion)

In fact, the document clearly states the following addresses:

Http://sphinx.pocoo.org/latest/theming.html#static-templates

 

The procedure is very simple. In Conf. py

 
Html_static_path = ['_ static']

Extract

C: \ python27 \ Lib \ Site-packages \ Sphinx-1.1.3-py2.7.egg \ sphes \ themes \ Default \ static

Found here

Default.css _ t

Copy it to the _ static directory in the relative path of conf. py and fill in the content.

Table.doc utils{Border:3px solid;Border-collapse:Collapse;}Table.doc utils TD, table.doc utils th{Border:1px solid # aaa;Border-bottom:1px solid # aaa;Padding:1px 8px 1px 5px;}

 

However, if sphinxfinds that no new file exists, it does not detect default.css _ t file writing.

It is best to touch other source files at the same time to regenerate HTML.

English version

1.

Copy c: \ python27 \ Lib \ Site-packages \ Sphinx-1.1.3-py2.7.egg \ sphinx \ themes \ Default \ static \ default.css _ t workspace \ project \ doc \ source \ _ static \

2.

Append these text to 'default.css _ t'

 
Table.doc utils{Border:3px solid;Border-collapse:Collapse;}Table.doc utils TD, table.doc utils th{Border:1px solid # aaa;Border-bottom:1px solid # aaa;Padding:1px 8px 1px 5px;}

3. Re-generate HTML document.

Make clean; make HTML

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.