feat(md-print): use mm font and corner page numbers
Body font size is now specified in millimetres and defaults to 3mm. Page numbers move from the centre footer to the outer bottom corners, alternating left and right per A5 page.
This commit is contained in:
+4
-4
@@ -464,7 +464,7 @@ data-config:
|
||||
|
||||
```markdown
|
||||
:md-print[./rules.md]
|
||||
:md-print[./rules.md]{columns="2" margin="10" gap="5" font="9"}
|
||||
:md-print[./rules.md]{columns="2" margin="10" gap="5" font="3"}
|
||||
```
|
||||
|
||||
**功能:**
|
||||
@@ -480,9 +480,9 @@ data-config:
|
||||
| `columns` | number | `2` | 每个 A5 页面的列数(1–4) |
|
||||
| `margin` | number | `10` | 页面边距(毫米) |
|
||||
| `gap` | number | `5` | 列间距(毫米) |
|
||||
| `font` | number | `9` | 正文字号(磅) |
|
||||
| `font` | number | `3` | 正文字号(毫米) |
|
||||
| `title` | string | - | 页眉标题 |
|
||||
| `pageNumbers` | boolean | `true` | 是否显示页码 |
|
||||
| `pageNumbers` | boolean | `true` | 是否在页面外侧角落显示页码 |
|
||||
| `cutMarks` | boolean | `true` | 是否显示 A4 中缝裁切线 |
|
||||
|
||||
**YAML 写法:**
|
||||
@@ -493,7 +493,7 @@ body: ./rules.md
|
||||
columns: 2
|
||||
margin: 10
|
||||
gap: 5
|
||||
font: 9
|
||||
font: 3
|
||||
title: 规则书
|
||||
```
|
||||
|
||||
|
||||
+3
-3
@@ -116,13 +116,13 @@ Prefer the `yaml role=tag` form — it is the only form that supports template l
|
||||
|
||||
Paginates a markdown document into A4 landscape sheets for printing.
|
||||
|
||||
Each sheet holds two A5 pages side by side, and each A5 page flows the markdown into `columns` columns. `margin` and `gap` are in millimetres, `font` is in points. `pageNumbers` adds an `n / total` footer and `cutMarks` draws the centre cut line. The preview modal exports through the browser's print dialog (choose A4 landscape, no margins, 100% scale).
|
||||
Each sheet holds two A5 pages side by side, and each A5 page flows the markdown into `columns` columns. `margin`, `gap`, and `font` are in millimetres (the body font defaults to 3mm). `pageNumbers` adds an `n / total` footer in the outer corner and `cutMarks` draws the centre cut line. The preview modal exports through the browser's print dialog (choose A4 landscape, no margins, 100% scale).
|
||||
|
||||
- Body: markdown path, optional #section
|
||||
- Attributes: `columns`, `margin`, `gap`, `font`, `title`, `pageNumbers`, `cutMarks`
|
||||
|
||||
```markdown
|
||||
:md-print[./rules.md]{columns="2" margin="10" gap="5" font="9"}
|
||||
:md-print[./rules.md]{columns="2" margin="10" gap="5" font="3"}
|
||||
```
|
||||
|
||||
````markdown
|
||||
@@ -132,7 +132,7 @@ body: ./rules.md
|
||||
columns: 2
|
||||
margin: 10
|
||||
gap: 5
|
||||
font: 9
|
||||
font: 3
|
||||
title: 规则书
|
||||
```
|
||||
````
|
||||
|
||||
Reference in New Issue
Block a user