Update README

Signed-off-by: trivernis <trivernis@protonmail.com>
pull/6/head
trivernis 4 years ago
parent d84b0d86dd
commit ce311853cc
Signed by: Trivernis
GPG Key ID: DFFFCC2C7A02DB45

@ -197,90 +197,107 @@ Placeholder
``` ```
Metadata can also be defined in a separate toml file with simple key-value pairs. Metadata can also be defined in a separate toml file with simple key-value pairs.
The file `Manifest.toml` will always be included by default.
Example: Example:
```toml ```toml
# bibliography.bib.toml # document metadata
author = "Snek" [metadata]
published = "2020" # language setting of the document
test-key = ["test value", "test value 2"] language = 'en'
# those files won't get imported
ignored-imports = ["style.css"]
# stylesheets that should be included
included-stylesheets = ["style2.css"]
# other metadata files that should be included # author of the document
included-configs = [] author = 'author'
# bibliography that should be included
included-bibliography = ["mybib.toml"]
# glossary that sould be included # features used in the document
included-glossary = ["myglossary.toml"] [features]
# if external sources (images, stylesheets, MathJax) # if external sources (images, stylesheets, MathJax)
# should be embedded into the document (default: true) # should be embedded into the document (default: true)
embed-external = true embed_external = true
# If SmartArrows should be used (default: true) # If SmartArrows should be used (default: true)
smart-arrows = true smart_arrows = true
include_mathjax = true
# Includes a MathJax script tag in the document to render MathML in chromium.
# (default: true)
include-math-jax = true
### Image processing options ### [imports]
# those files won't get imported
ignored_imports = []
# Force convert images to the specified format. # stylesheets that should be included
# Supported formats are png, jpeg, gif, bmp, (ico needs size <= 256), avif, pnm included_stylesheets = ['style.css']
# (default: keep original)
image-format = "jpg"
# the max width for the images. # bibliography that should be included
# if an image is larger than that it get's resized. included_bibliography = ['Bibliography.toml']
# (default: none)
image-max-width = 700
# the max width for the images. # glossary that sould be included
# if an image is larger than that it get's resized. included_glossaries = ['Glossary.toml']
# (default: none)
image-max-height = 800
### PDF Options - needs the pdf feature enabled ### # settings related to pdf rendering
[pdf]
# If the header and footer of the pdf should be displayed (default: true) # If the header and footer of the pdf should be displayed (default: true)
pdf-display-header-footer = true display_header_footer = true
# PDF header template of each page (default: empty) # PDF header template of each page (default: '<div></div>')
pdf-header-template = "<div><span class='title'></span></div>" header_template = '<div></div>'
# PDF footer template of each page (default: see chromium_pdf assets) # PDF footer template of each page (default: see chromium_pdf assets)
pdf-footer-template = "<div><span class='pageNumber'></span></div>" footer_template = '''
<div style="font-size: 10px; text-align: center; width: 100%;">
<span class="pageNumber"></span>/<span class="totalPages"></span>
</div>'''
# The scale at which the website is rendered into pdf.
page_scale = 1.0
# Top margin of the pdf. Should be between 0 and 1. (default: 1.0) # margin of the pdf document
pdf-margin-top = 1 [pdf.margin]
# Bottom margin of the pdf. Should be between 0 and 1. (default: 1.0) # Top margin of the pdf. Should be between 0 and 1. (default: 0.5)
pdf-margin-bottom = 1 top = 0.5
# Bottom margin of the pdf. Should be between 0 and 1. (default: 0.5)
bottom = 0.5
# Left margin of the pdf. Should be between 0 and 1. # Left margin of the pdf. Should be between 0 and 1.
pdf-margin-left = 0 left = 0
# Right margin of the pdf. Should be between 0 and 1. # Right margin of the pdf. Should be between 0 and 1.
pdf-margin-right = 0 right = 0
# Page height of the pdf
pdf-page-height = 100
# Page width of the pdf # image settings
pdf-page-width = 80 [images]
# The scale at which the website is rendered into pdf. # Force convert images to the specified format.
pdf-page-scale = 1.0 # Supported formats are png, jpeg, gif, bmp, (ico needs size <= 256), avif, pnm
# (default: keep original)
format = "png"
# the max width for the images.
# if an image is larger than that it get's resized.
# (default: none)
max_width = 700
# the max width for the images.
# if an image is larger than that it get's resized.
# (default: none)
max_height = 500
[formatting]
# how bibliography references should be displayed
bib_ref_display = '{{number}}'
# custom metadata
# String -> String Mappings
[custom_attributes]
custom_key1 = "Custom Value"
``` ```
The `[Section]` keys are not relevant as the structure gets flattened before the values are read. The `[Section]` keys are not relevant as the structure gets flattened before the values are read.

Loading…
Cancel
Save