Skip to content

Advanced: settings, options and details for people who want full control. Most people only need Studio.

All settings ​

Every key a settings file or a project .markdown-pdf.json accepts. Most people never need this page: Studio writes these for you. Where the files live and how they combine: Settings file. Which keys a document's front matter accepts: Per-document options.

Short presets ​

The quickest way to set many things at once.

SettingWhat it doesValuesDefault
lookPage style preset: clean (Default. GitHub-style, neutral.) report (Serif headings, strong title rule. Business reports.) academic (Serif body, justified, minimal colour. Papers and theses.) compact (Dense and small. More text per page.) technical (For documents with code: framed code blocks, blue accents.) Explicit keys in this file override it.clean, report, academic, compact, technical
fontFont preset for the text. Use font_family for a custom stack.sans, serif, book, humanist, geometric, office, mono, system
heading_fontFont preset for titles (h1-h6). Use heading_font_family for a custom stack.sans, serif, book, humanist, geometric, office, mono, system
templateHeader/footer preset. Explicit header/footer keys in this file override it.minimal, simple, corporate, academic, two-logo

Page ​

SettingWhat it doesValuesDefault
page_formatPaper format.A4, Letter, Legal, Tabloid, Ledger, A0, A1, A2, A3, A5, A6A4
orientationPaper orientation.portrait, landscapeportrait
marginPage margins.object: top, right, bottom, lefttop: 15mm, right: 15mm, bottom: 15mm, left: 15mm
scaleScale of the page rendering (default 1).number1
page_rangesPaper ranges to print, e.g. '1-5, 8, 11-13'. Empty means all pages.string
print_backgroundWhether to print background colours and images.booleantrue

Text, fonts and code ​

SettingWhat it doesValuesDefault
font_familyCSS font-family value for the document body and header/footer. Overrides the default system font stack. Example: "Georgia, 'Times New Roman', serif".string
heading_font_familyCSS font-family value for headings (h1-h6). Default: same as the body text.string
accent_colorAccent colour of the page style, as #rgb or #rrggbb: title rules, coloured titles, code block bars. Used by the report and technical looks; the others have no accent.string
stylesheet_pathCSS file applied after the built-in stylesheet (relative to this settings file).string
include_default_stylesInclude the built-in default CSS stylesheet.booleantrue
highlightEnable syntax highlighting for code blocks.booleantrue
highlight_styleHighlight.js style filename to use (e.g. 'github.css', 'monokai.css').one of 80 names, e.g. github.css, github-dark.css, monokai.cssgithub.css

Content ​

SettingWhat it doesValuesDefault
breaksEnable hard line breaks in the Markdown renderer.booleanfalse
emojiRender :emoji: shortcodes as Unicode characters.booleantrue
mathRender LaTeX math via KaTeX. Use $inline$ and $$display$$ syntax.booleanfalse
math_optionsKaTeX rendering options.object: throw_on_error, error_color, macrosthrow_on_error: false, error_color: #cc0000
heading_anchorsAdd id slugs to headings (required infrastructure for TOC links).booleanfalse
tocRender a [[toc]] marker as an auto-generated table of contents (also enables heading anchors).booleanfalse
toc_optionsTable-of-contents rendering options.object: level, list_typelevel: [1,2,3], list_type: ul

See Header and footer.

SettingWhat it doesValuesDefault
headerPage header.object, see below
footerPage footer.object, see below
display_header_footerDisplay header and footer on each page. Content comes from header / footer (here, in settings or in front matter); without them the header and footer are empty. Enabled automatically when header or footer is given.booleanfalse

Files ​

SettingWhat it doesValuesDefault
output_directoryFolder for the PDFs, relative to each Markdown file. Default: next to it.string
assets_directoryFolder for "@/name.svg" image references (relative to this settings file).string
open_after_exportOpen the PDF after export.booleanfalse
KeyWhat it doesValues
heightHeight of the area.string
paddingCSS padding.string
font_familystring
font_sizeDefault font-size.string
font_stylenormal, italic, oblique
font_weightstring or number
colorDefault text color.string
backgroundstring
border_bottomHeader only.string
border_topFooter only.string
styleExtra inline CSS, e.g. "letter-spacing: 1px".string
leftElement, array of elements, or null to clear the zone.
centerElement, array of elements, or null to clear the zone.
rightElement, array of elements, or null to clear the zone.
left_textShorthand: text in the left zone; placeholders allowed, e.g. "Page {page} of {pages}".string
left_imageShorthand: image in the left zone (relative to the settings file, or "@/name.svg").string
left_image_heightShorthand: height of the left image.string
center_textShorthand: text in the center zone; placeholders allowed, e.g. "Page {page} of {pages}".string
center_imageShorthand: image in the center zone (relative to the settings file, or "@/name.svg").string
center_image_heightShorthand: height of the center image.string
right_textShorthand: text in the right zone; placeholders allowed, e.g. "Page {page} of {pages}".string
right_imageShorthand: image in the right zone (relative to the settings file, or "@/name.svg").string
right_image_heightShorthand: height of the right image.string

The structured form (left, center, right as objects): Structured header and footer.

Released under the MIT License.