Markdown tables convertor to a multiline format.
Project description
# Multiline tables for Foliant
Multiline tables preprocessor converts tables in project markdown files to multiline format (very useful especially for pandoc processing). It helps to make tables in doc and pdf formats more proportional — column with more text in it will be more wide. Also it helps whith processing of extremely wide tables with pandoc.
## Installation
```shell
$ pip install foliantcontrib.multilinetables
```
## Config
To enable the preprocessor with default options, add `multilinetables` to `preprocessors` section in the project config:
```yaml
preprocessors:
- multilinetables
```
The preprocessor has a number of options (best values set by default):
```yaml
preprocessors:
- multilinetables:
min_table_width: 100
keep_narrow_tables: true
table_columns_to_scale: 3
enable_hyphenation: false
hyph_combination: '<br>'
targets:
- docx
- pdf
```
`min_table_width`
: Wide markdown tables will be shrinked to this width in symbols.
`keep_narrow_tables`
: If `true` narrow tables will not be stretched to minimum table width.
`table_columns_to_scale`
: Minimum amount of columns to process the table.
`enable_hyphenation`
: Switch breaking text in multiline tables with the tag set in `hyph_combination`.
`hyph_combination`
: Custom tag to break a text in multiline tables.
`targets`
: Allowed targets for the preprocessor. If not specified (by default), the preprocessor applies to all targets.
## Usage
Just add preprocessor to the project config and enjoy the result.
Multiline tables preprocessor converts tables in project markdown files to multiline format (very useful especially for pandoc processing). It helps to make tables in doc and pdf formats more proportional — column with more text in it will be more wide. Also it helps whith processing of extremely wide tables with pandoc.
## Installation
```shell
$ pip install foliantcontrib.multilinetables
```
## Config
To enable the preprocessor with default options, add `multilinetables` to `preprocessors` section in the project config:
```yaml
preprocessors:
- multilinetables
```
The preprocessor has a number of options (best values set by default):
```yaml
preprocessors:
- multilinetables:
min_table_width: 100
keep_narrow_tables: true
table_columns_to_scale: 3
enable_hyphenation: false
hyph_combination: '<br>'
targets:
- docx
```
`min_table_width`
: Wide markdown tables will be shrinked to this width in symbols.
`keep_narrow_tables`
: If `true` narrow tables will not be stretched to minimum table width.
`table_columns_to_scale`
: Minimum amount of columns to process the table.
`enable_hyphenation`
: Switch breaking text in multiline tables with the tag set in `hyph_combination`.
`hyph_combination`
: Custom tag to break a text in multiline tables.
`targets`
: Allowed targets for the preprocessor. If not specified (by default), the preprocessor applies to all targets.
## Usage
Just add preprocessor to the project config and enjoy the result.
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
Close
Hashes for foliantcontrib.multilinetables-1.1.3.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | bd7e5c03cc2e65dd2d4a779c90224b249b8b02af541b34e5f97f7fd4a7ce30cf |
|
MD5 | dd28399d0a3e0fe5b6f7fb3ace1c3eb8 |
|
BLAKE2b-256 | 1f05363edefe022efd4eb2af9067ab302d13061a9b358aefe35c30102329123e |