Sphinx docx builder extension
Project description
Docxbuilder is a Sphinx extension to build docx formatted documents.
Requirements
- Python:
2.7, 3.5 or latter
- Sphinx:
1.7.6 or later
Install
Use pip:
pip install docxbuilder
Usage
Add ‘docxbuilder’ to extensions configuration of conf.py:
extensions = ['docxbuilder']
and build your documents:
make docx
You can control the generated document by adding configurations into conf.py:
docx_documents = [
('index', 'docxbuilder.docx', {
'title': project,
'creator': author,
'subject': 'A manual of docxbuilder',
}, True),
]
docx_style = 'path/to/custom_style.docx'
docx_pagebreak_before_section = 1
For more details, see the documentation.
Style file
Generated docx file’s design is customized by a style file (The default style is docxbuilder/docx/style.docx). The style file is a docx file, which defines some paragraph, character, and table styles.
The below lists shows typical styles.
Character styles:
Emphasis
Strong
Literal
Hyperlink
Footnote Reference
Paragraph styles:
Body Text
Footnote Text
Definition Term
Literal Block
Image Caption, Table Caution, Literal Caption
Heading 1, Heading 2, …, Heading N
TOC Heading
toc 1, toc 2, …, toc N
List Bullet
List Number
Table styles:
Table
Field List
Admonition Note
TODO
Support math role and directive.
Support tabular_col_spec directive.
Support URL path for images.
Licence
MIT Licence
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file docxbuilder-1.1.2.tar.gz
.
File metadata
- Download URL: docxbuilder-1.1.2.tar.gz
- Upload date:
- Size: 67.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.33.0 CPython/3.7.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 66f8593dc0aca4c4998703bbe94bbe21a0c1ef6cc0a139643f19581e1c791461 |
|
MD5 | 4c761180b9d10f46f023e9651cb5785b |
|
BLAKE2b-256 | e773a6139f165aeccd457caf967625b2e23052e7e8e7ad2cf3e5c79e4a6d3464 |
Provenance
File details
Details for the file docxbuilder-1.1.2-py2.py3-none-any.whl
.
File metadata
- Download URL: docxbuilder-1.1.2-py2.py3-none-any.whl
- Upload date:
- Size: 71.9 kB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.33.0 CPython/3.7.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | e42b2af1960cd456d407169f8ac6940f3a3c3b2fe9e500f9a6627238ce1d892a |
|
MD5 | a6aa6c2885df6806914fb706407c2a00 |
|
BLAKE2b-256 | 6c6d863a41b12a8d845c9832f4d3a0decc6339b634b19d0498292288af94c3b1 |