lk/vision/lowdown.md

30 lines
606 B
Markdown
Raw Permalink Normal View History

2024-04-10 21:42:21 +00:00
---
title: "Markdown to PDF"
tags: [ "Documentation", "Markdown", "PDF", "Vision" ]
---
Turn a markdown file into a pdf:
```bash
lowdown -stms "$FILE".md | pdfroff -itk -mspdf > "$FILE".pdf
```
2024-11-28 16:08:31 +00:00
*Example:* put [this Makefile](lowdown/example.txt) in a directory, rename it `Makefile`, then do:
```bash
make example
make
```
2024-04-10 21:42:21 +00:00
To give the document a title, put that title in the metadata:
```bash
sed -i "1 i---" "$FILE".md
sed -i "1 ititle: $TITLE" "$FILE".md
sed -i "1 i---" "$FILE".md
lowdown -L "$FILE".md
lowdown -X title "$FILE".md
lowdown -stms "$FILE".md | pdfroff -itk -mspdf > "$FILE".pdf
```