Snippet Export To Pdf
An Obsidian CSS Snippet in order to enhance document structure and style for export to PDF
Features
- Type scale system based on vertical rythm best practices on a Minor Third modulo for h1 to h5
- Classic serif style for work-compatible documents
- Typography best practices : lowercase numbers,
all-small-capsfor caps titles,tabular-numsfor tables... - Automatic pagination
- Blockquotes
Obsidian & the hidden customization of CSS snippets in order to control PDF export formatting
Obsidian is amazing, not documenting hidden CSS customization is not @kepano
In order to control the font of the exported PDF you have to tweak two CSS vars --font-print and --font-text and use the precise name of the font as it appears installed in your OS (cc @OzAmoyal for pointing this); for example "EB Garamond" won't work, it has to be the name under the font directory of the font as it is registered by your OS. Why ? It's not explained in the Obsidian docs.
All CSS rules must have !important to take effect. It's mandatory in order to override the native Obsidian CSS that applies when exporting to PDF
How to Install
- Download the repository ZIP below
- Unzip it and find the CSS snippet file
- Move the CSS file into your vault's
.obsidian/snippets/folder - Open Obsidian → Settings → Appearance → CSS Snippets → Enable it
Stats
Stars
0
Forks
0
Last updated 6mo ago
Categories
Tags