lk/vision/lowdown.md

30 lines
583 B
Markdown
Raw Normal View History

2024-04-10 21:42:21 +00:00
---
title: "Markdown to PDF"
2025-02-11 19:47:50 +00:00
tags: [ "Markdown", "PDF", "Vision" ]
2024-04-10 21:42:21 +00:00
---
Turn a markdown file into a pdf:
2025-02-12 14:01:15 +00:00
```sh
2024-04-10 21:42:21 +00:00
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:
2025-02-12 14:01:15 +00:00
```sh
2024-11-28 16:08:31 +00:00
make example
make
```
2024-04-10 21:42:21 +00:00
To give the document a title, put that title in the metadata:
2025-02-12 14:01:15 +00:00
```sh
2024-04-10 21:42:21 +00:00
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
```