返回 marp
fitting-header.md
根目录 / website / docs / guide / fitting-header.md
1 # Fitting header
2
3 When the `<!--fit-->` comment is placed in a heading, the heading will be scaled to fit onto a single line.
4
5 ```markdown
6 # <!-- fit --> Fitting header
7 ```
8
9 ```markdown:marp
10 # <!-- fit --> Fitting header
11 ```
12
13 The syntax is similar to [Deckset's `[fit]` keyword](https://docs.decksetapp.com/English.lproj/Formatting/01-headings.html), but Marp uses an HTML comment to hide the keyword when the Markdown is rendered.
14
15 > This feature is inherited from [Marp Core](https://github.com/marp-team/marp-core).
16
17 ## Examples
18
19 ### Takahashi-style
20
21 You can efficiently make [Takahashi-style](https://en.wikipedia.org/wiki/Takahashi_method) slides like the [Big](https://github.com/tmcw/big) presentation system by using the fitting header. Combining fitting headers with the [heading divider](/docs/guide/heading-divider) directive will allow you to write one slide per line.
22
23 ```markdown
24 ---
25 theme: uncover
26 headingDivider: 1
27 ---
28
29 # <!--fit--> Takahashi-style<br />presentation
30
31 # <!--fit--> Feature
32
33 # <!--fit--> Huge text
34
35 # <!--fit--> A few words
36 ```
37
38 ```markdown:marp
39 ---
40 theme: uncover
41 headingDivider: 1
42 ---
43
44 # <!--fit--> Takahashi-style<br />presentation
45
46 # <!--fit--> Feature
47
48 # <!--fit--> Huge text
49
50 # <!--fit--> A few words
51 ```
52
52 lines MARKDOWN