@linloir/limr 0.1.0 → 1.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (97) hide show
  1. package/README.en.md +151 -0
  2. package/README.md +80 -127
  3. package/benchmarks/results/layout.json +2593 -0
  4. package/benchmarks/results/markstream-code.json +1823 -0
  5. package/benchmarks/results/markstream-reading-repeat.json +1152 -0
  6. package/benchmarks/results/markstream.json +12486 -0
  7. package/benchmarks/results/streaming-browser.json +77 -0
  8. package/benchmarks/results/streaming.json +357 -0
  9. package/dist/base.css +93 -10
  10. package/dist/{chunk-7JF5HHVF.js → chunk-BG5QUQFR.js} +340 -72
  11. package/dist/chunk-BG5QUQFR.js.map +1 -0
  12. package/dist/chunk-BVHHOVMT.js +179 -0
  13. package/dist/chunk-BVHHOVMT.js.map +1 -0
  14. package/dist/chunk-FJZCQY2S.js +155 -0
  15. package/dist/chunk-FJZCQY2S.js.map +1 -0
  16. package/dist/chunk-FSI5OTBW.js +1 -0
  17. package/dist/{chunk-ETHLPBKQ.js → chunk-GU2RPESF.js} +238 -131
  18. package/dist/chunk-GU2RPESF.js.map +1 -0
  19. package/dist/{chunk-65V5OZ4G.js → chunk-SUAAUGAX.js} +1350 -511
  20. package/dist/chunk-SUAAUGAX.js.map +1 -0
  21. package/dist/core/index.d.ts +6 -3
  22. package/dist/core/index.js +15 -5
  23. package/dist/extensions/index.d.ts +30 -5
  24. package/dist/extensions/index.js +15 -3
  25. package/dist/index.d.ts +4 -4
  26. package/dist/index.js +31 -8
  27. package/dist/{engine-43u8B4yt.d.ts → knuth-plass-C8mgFm7W.d.ts} +67 -1
  28. package/dist/knuth-plass-layout-CHQCWKB5.js +449 -0
  29. package/dist/knuth-plass-layout-CHQCWKB5.js.map +1 -0
  30. package/dist/react/index.d.ts +7 -5
  31. package/dist/react/index.js +7 -3
  32. package/dist/styles.css +93 -10
  33. package/dist/{translations-BliabrPd.d.ts → translations-BXzSwLBJ.d.ts} +49 -4
  34. package/docs/README.md +13 -0
  35. package/docs/api.md +5 -158
  36. package/docs/assets/rendered.svg +9 -0
  37. package/docs/assets/source.svg +9 -0
  38. package/docs/en/README.md +28 -0
  39. package/docs/en/ai-skills.md +57 -0
  40. package/docs/en/annotations.md +86 -0
  41. package/docs/en/api.md +115 -0
  42. package/docs/en/architecture.md +41 -0
  43. package/docs/en/extensions.md +208 -0
  44. package/docs/en/getting-started.md +69 -0
  45. package/docs/en/integration.md +154 -0
  46. package/docs/en/modules.md +84 -0
  47. package/docs/en/performance.md +93 -0
  48. package/docs/en/plugin-packages.md +68 -0
  49. package/docs/en/styles.md +99 -0
  50. package/docs/en/syntax.md +455 -0
  51. package/docs/extensions.md +5 -306
  52. package/docs/implementation.md +5 -76
  53. package/docs/performance.md +5 -81
  54. package/docs/screenshots/blocks.png +0 -0
  55. package/docs/screenshots/dark.png +0 -0
  56. package/docs/screenshots/desktop.png +0 -0
  57. package/docs/screenshots/plugin-mobile.png +0 -0
  58. package/docs/styles.md +5 -100
  59. package/docs/visual-upgrade.md +5 -145
  60. package/docs/zh-CN/README.md +28 -0
  61. package/docs/zh-CN/ai-skills.md +57 -0
  62. package/docs/zh-CN/annotations.md +86 -0
  63. package/docs/zh-CN/api.md +115 -0
  64. package/docs/zh-CN/architecture.md +41 -0
  65. package/docs/zh-CN/extensions.md +210 -0
  66. package/docs/zh-CN/getting-started.md +69 -0
  67. package/docs/zh-CN/integration.md +154 -0
  68. package/docs/zh-CN/modules.md +84 -0
  69. package/docs/zh-CN/performance.md +93 -0
  70. package/docs/zh-CN/plugin-packages.md +68 -0
  71. package/docs/zh-CN/styles.md +99 -0
  72. package/docs/zh-CN/syntax.md +457 -0
  73. package/examples/notes.tsx +18 -11
  74. package/examples/packages/paper-theme/index.css +25 -0
  75. package/examples/packages/paper-theme/package.json +7 -0
  76. package/examples/packages/reading-tools/index.d.ts +2 -0
  77. package/examples/packages/reading-tools/index.js +25 -0
  78. package/examples/packages/reading-tools/package.json +16 -0
  79. package/package.json +17 -5
  80. package/skills/limr-plugin-development/SKILL.md +22 -0
  81. package/skills/limr-plugin-development/agents/openai.yaml +4 -0
  82. package/skills/limr-plugin-development/assets/plugin-template/README.md +30 -0
  83. package/skills/limr-plugin-development/assets/plugin-template/package.json +36 -0
  84. package/skills/limr-plugin-development/assets/plugin-template/src/index.tsx +50 -0
  85. package/skills/limr-plugin-development/assets/plugin-template/src/styles.css +9 -0
  86. package/skills/limr-plugin-development/assets/plugin-template/tsconfig.json +20 -0
  87. package/skills/limr-plugin-development/assets/plugin-template/tsup.config.ts +8 -0
  88. package/skills/limr-plugin-development/references/contract.md +51 -0
  89. package/skills/limr-use/SKILL.md +23 -0
  90. package/skills/limr-use/agents/openai.yaml +4 -0
  91. package/skills/limr-use/references/integration.md +49 -0
  92. package/skills/limr-use/references/syntax.md +20 -0
  93. package/dist/chunk-65V5OZ4G.js.map +0 -1
  94. package/dist/chunk-7JF5HHVF.js.map +0 -1
  95. package/dist/chunk-ETHLPBKQ.js.map +0 -1
  96. package/dist/chunk-V2OG4Y3F.js +0 -1
  97. /package/dist/{chunk-V2OG4Y3F.js.map → chunk-FSI5OTBW.js.map} +0 -0
@@ -0,0 +1,455 @@
1
+ # Default syntax
2
+
3
+ > Reading note: this page uses LiMR syntax and interactive examples. Some content cannot be fully displayed by ordinary Markdown viewers such as GitHub; visit the [GitHub Pages documentation](https://linloir.github.io/LiMR/#/docs/en/syntax) for the best reading experience.
4
+
5
+ [Documentation](README.md) · [简体中文](../zh-CN/syntax.md)
6
+
7
+ **Modules** are configuration objects that add capabilities such as formulas, videos, or citations. A factory is called in application code to return an object; the module name is its `name` property, used for replacement and removal; tags and directives are the syntax written in Markdown. See [built-in modules](modules.md) for concepts and configuration.
8
+
9
+ The default modules below ship with `@linloir/limr`. `Reader`, standalone `Markdown`, and `DocumentProvider` enable all of them through `standard()` by default; core-only `createDocument()` starts with CommonMark. The following sections include source and rendered examples, using LiMR itself.
10
+
11
+ ## Module catalog
12
+
13
+ | Factory (application code) | Module name (name) | Capability | Registered tags / directives |
14
+ | --- | --- | --- | --- |
15
+ | `gfm()` | `gfm` | Tables, strikethrough, tasks, autolinks, standard footnotes | `::gfm` |
16
+ | `math()` | `math` | Inline and display math | `$…$`, `$$…$$`, `::math` |
17
+ | `codeHighlight()` | `code-highlight` | Shiki fenced-code highlighting | Standard code fences, `::code` / `::code-highlight` |
18
+ | `definition()` | `definition` | Definitions | Tags / directives: definition, title, content |
19
+ | `question()` | `question` | Exercises and answers | Tags / directives: question and child names below |
20
+ | `extras()` | `extras` | Further reading | Tags / directives: extras, extra |
21
+ | `video()` | `video` | Native video, YouTube, Bilibili | Tags / directives: video, md-video |
22
+ | `figures()` | `figures` | Figure groups and captions | Tags / directives: figures, figure, figcaption, caption, img |
23
+ | `citation()` | `citation` | Reference definitions and markers | Tags / directives: citation, ref |
24
+ | `translations()` | `translations` | Original, translated, and parallel text | Tags and directives: translations, origin, translation |
25
+ | `mermaid()` | `mermaid` | Mermaid diagrams | Mermaid fences, `::mermaid` |
26
+ | `callout()` | `callout` | Typed, titled and collapsible quotes | `> [!type]`, `::callout` |
27
+ | `inlineHighlights()` | `inline-highlights` | Source-authored highlights | `==text==`, `::highlight` |
28
+ | `footnotes()` | `footnotes` | Comment markers and footnote cards | `[^id]`, `^[body]`, `::footnote`, `::footnote-ref` |
29
+
30
+ These are registered static tags in Markdown, not an arbitrary MDX/HTML execution environment. Use string attributes such as `multi="true"` and `answer="[0,2]"`. Do not use `answer={[0,2]}`, event functions, or spread attributes. Unregistered HTML is displayed as text; expressions are not executed and may produce diagnostics. Keep blank lines between block tags and their Markdown content.
31
+
32
+ ## CommonMark and GFM
33
+
34
+ ````markdown
35
+ # Heading
36
+
37
+ **Bold**, *italic*, ~~deleted~~, [link](https://example.com), `inline code`.
38
+
39
+ > A blockquote, labelled Note by the default renderer.
40
+
41
+ - A list item
42
+ - [x] Complete
43
+ - [ ] Pending
44
+
45
+ | Name | Description |
46
+ | --- | --- |
47
+ | LiMR | Markdown renderer |
48
+
49
+ ```typescript
50
+ const value = 42;
51
+ ```
52
+
53
+ A standard footnote[^note].
54
+
55
+ [^note]: Footnote content in a sidebar or floating card.
56
+ ````
57
+
58
+ Rendered result (interactive where applicable):
59
+
60
+ #### Example heading
61
+
62
+ **Bold**, *italic*, ~~deleted~~, [link](https://example.com), `inline code`.
63
+
64
+ > A blockquote, labelled Note by the default renderer.
65
+
66
+ - A list item
67
+ - [x] Complete
68
+ - [ ] Pending
69
+
70
+ | Name | Description |
71
+ | --- | --- |
72
+ | LiMR | Markdown renderer |
73
+
74
+ ```typescript
75
+ const value = 42;
76
+ ```
77
+
78
+ A standard footnote[^syntax-note].
79
+
80
+ [^syntax-note]: Footnote content in a sidebar or floating card.
81
+
82
+ Default `[^note]` footnotes use markers and cards. Remove the `footnotes` module to restore traditional GFM endnotes. Ordinary Markdown supports `![Description](/image.png)`. Raw HTML is not passed through to the DOM. Register an extension or override `components` to customize rendering.
83
+
84
+ ## Math and code
85
+
86
+ ```markdown
87
+ Inline: $E = mc^2$.
88
+
89
+ $$
90
+ \int_0^1 x^2\,dx = \frac{1}{3}
91
+ $$
92
+ ```
93
+
94
+ Rendered result (interactive where applicable):
95
+
96
+ Inline: $E = mc^2$.
97
+
98
+ $$
99
+ \int_0^1 x^2\,dx = \frac{1}{3}
100
+ $$
101
+
102
+ Import `@linloir/limr/math.css`. Configure formulas with `math({ macros, strict })`. Fenced language names select Shiki highlighting. Highlighting loads near the viewport; streaming code waits for closure and for native selections to leave before applying colors. Code over the default 100,000-character limit, unsupported languages, and languages outside the configured list retain readable source. Configure `codeHighlight({ languages, lightTheme, darkTheme, eager, maxLength })`.
103
+
104
+ ## Definitions
105
+
106
+ ```markdown
107
+ <definition title="Entropy">
108
+
109
+ A measure of uncertainty: $H(X)$.
110
+
111
+ </definition>
112
+ ```
113
+
114
+ Rendered result (interactive where applicable):
115
+
116
+ <definition title="Entropy">
117
+
118
+ A measure of uncertainty: $H(X)$.
119
+
120
+ </definition>
121
+
122
+ Use child tags for rich titles and an explicit body:
123
+
124
+ ```markdown
125
+ <definition>
126
+
127
+ <title>**Entropy** / 熵</title>
128
+
129
+ <content>
130
+
131
+ The body supports Markdown.
132
+
133
+ </content>
134
+
135
+ </definition>
136
+ ```
137
+
138
+ The `title` attribute is text. Child tags support rich content. The directive form is `:::definition{title="Entropy"}`, closed by `:::`.
139
+
140
+ ## Exercises
141
+
142
+ ```markdown
143
+ <question title="Which numbers are even?">
144
+
145
+ <question-content>Select all correct options.</question-content>
146
+
147
+ <question-sel-grp multi="true" answer="[0,2]">
148
+
149
+ <question-sel>2</question-sel>
150
+
151
+ <question-sel>3</question-sel>
152
+
153
+ <question-sel>4</question-sel>
154
+
155
+ </question-sel-grp>
156
+
157
+ <question-hint>Consider divisibility by 2.</question-hint>
158
+
159
+ <question-answer>2 and 4 are even.</question-answer>
160
+
161
+ </question>
162
+ ```
163
+
164
+ Rendered result (interactive where applicable):
165
+
166
+ <question title="Which numbers are even?">
167
+
168
+ <question-content>Select all correct options.</question-content>
169
+
170
+ <question-sel-grp multi="true" answer="[0,2]">
171
+
172
+ <question-sel>2</question-sel>
173
+
174
+ <question-sel>3</question-sel>
175
+
176
+ <question-sel>4</question-sel>
177
+
178
+ </question-sel-grp>
179
+
180
+ <question-hint>Consider divisibility by 2.</question-hint>
181
+
182
+ <question-answer>2 and 4 are even.</question-answer>
183
+
184
+ </question>
185
+
186
+ Answer indices are **zero-based**. `multi` is off by default. `answer` is a string containing a JSON array or a single index. Attributes on the selection group take precedence over question attributes. Hints and answers expand independently; configured answers enable submission, scoring, and retry. This module neither connects to AI nor creates question annotations.
187
+
188
+ ## Further reading
189
+
190
+ ```markdown
191
+ <extras>
192
+
193
+ <extra title="Read more" url="https://example.com/article" desc="Background material." />
194
+
195
+ </extras>
196
+ ```
197
+
198
+ Rendered result (interactive where applicable):
199
+
200
+ <extras>
201
+
202
+ <extra title="Built-in modules" url="https://linloir.github.io/LiMR/#/docs/en/modules" desc="Background material." />
203
+
204
+ </extras>
205
+
206
+ `extra` uses `title`, `url`, and `desc`. Links pass through the built-in URL filter.
207
+
208
+ ## Citation cards
209
+
210
+ ```markdown
211
+ One source<ref id="a" />, or several<ref ids='["a","b"]' />.
212
+
213
+ <ref id="a">Referenced **text**</ref>
214
+
215
+ <citation id="a" title="Source A" url="https://example.com/a" description="Full **Markdown** description." summary="Short collapsed summary." />
216
+
217
+ <citation cite-id="b" title="Source B" url="https://example.com/b" desc="Legacy attribute name." />
218
+ ```
219
+
220
+ Rendered result (interactive where applicable):
221
+
222
+ One source<ref id="a" />, or several<ref ids='["a","b"]' />.
223
+
224
+ <ref id="a">Referenced **text**</ref>
225
+
226
+ <citation id="a" title="Source A" url="https://example.com/a" description="Full **Markdown** description." summary="Short collapsed summary." />
227
+
228
+ <citation cite-id="b" title="Source B" url="https://example.com/b" desc="Legacy attribute name." />
229
+
230
+ Citation IDs use `cite-id`, then `id`. Descriptions use `desc`, then `description`. References use `cite-from-ids`, `ids`, then `id`, accepting JSON arrays or comma-separated strings. Definitions do not occupy body space, and multiple markers can reference one definition.
231
+
232
+ Citations do not expand into large cards by default; clicking pins the preview. Collapsed summaries fall back through `summary → description → safe URL → title`, with Markdown stripped. Card content uses description, then summary. Hovering or activating a reference temporarily highlights its nearest text block (paragraph, heading, list item, or table cell), without saving a highlight. External range annotations use their bound range. See [annotations and selection](annotations.md).
233
+
234
+ ## Images, figures, and captions
235
+
236
+ ```markdown
237
+ <figures columns="2" min-width="220" max-width="560" max-height="480">
238
+
239
+ <figure src="/figures/a.png" alt="Experiment A" caption="(a) Experiment A" />
240
+
241
+ <figure id="experiment-b">
242
+
243
+ ![Experiment B](/figures/b.png)
244
+
245
+ <figcaption>**(b)** A Markdown caption.</figcaption>
246
+
247
+ </figure>
248
+
249
+ <figcaption>Figure 1 · Two experiments.</figcaption>
250
+
251
+ </figures>
252
+ ```
253
+
254
+ Rendered result (interactive where applicable):
255
+
256
+ <figures columns="2" min-width="220" max-width="560" max-height="480">
257
+
258
+ <figure src="../assets/source.svg" alt="Experiment A" caption="(a) Experiment A" />
259
+
260
+ <figure id="experiment-b">
261
+
262
+ ![Experiment B](../assets/rendered.svg)
263
+
264
+ <figcaption>**(b)** A Markdown caption.</figcaption>
265
+
266
+ </figure>
267
+
268
+ <figcaption>Figure 1 · Two experiments.</figcaption>
269
+
270
+ </figures>
271
+
272
+ A figure can stand alone. Supply an image through `src` / `url`, nested Markdown, or `<img src="…" alt="…" />`. Use one image per figure and figures for groups. Captions can use an attribute or figcaption / caption child tags; use children for rich text. `id` provides an in-page link target.
273
+
274
+ | Attribute | Default | Meaning |
275
+ | --- | --- | --- |
276
+ | `min-width` / `min-height` | 220 / 120 | Determines when another column fits; narrow containers take priority |
277
+ | `max-width` / `max-height` | 560 / 480 | Image bounds preserving aspect ratio; none / false removes a bound |
278
+ | `columns` / `cols` | Automatic | Requested columns, capped at 24 |
279
+ | `rows` | Automatic | Derives columns from image count when columns are omitted |
280
+ | `responsive` | true | Reduces explicit columns when space is insufficient; false keeps them |
281
+ | `gap` | 16 | Group gap in pixels |
282
+
283
+ Dimensions accept nonnegative numbers or px. Figures inherit group limits and can override them. Factory options use camelCase, such as `figures({ maxHeight: 360, maxWidth: false })`. Images retain their aspect ratio, and captions are not cropped. A single figure copies the image URL; a group copies Markdown source. Neither copies image bytes.
284
+
285
+ Directive example:
286
+
287
+ ```markdown
288
+ :::figures{columns="2"}
289
+ ::figure{src="/a.png" caption="A"}
290
+ ::figure{src="/b.png" caption="B"}
291
+ :::
292
+ ```
293
+
294
+ ## Video
295
+
296
+ ```markdown
297
+ <video src="/demo.mp4" provider="native" title="Demo" />
298
+
299
+ <md-video url="https://www.youtube.com/watch?v=dQw4w9WgXcQ" loading="click" />
300
+
301
+ <video url="https://www.bilibili.com/video/BV1xx411c7mD/?p=2" />
302
+ ```
303
+
304
+ `url` takes precedence over `src`. `provider` defaults to auto and also accepts native, youtube, and bilibili. YouTube supports watch, short, embed, shorts, and live URLs with start times. Bilibili supports BV/av IDs and parts. Other attributes are title and loading.
305
+
306
+ **The default is `loading="visible"`**: the player mounts within 200px of the viewport without autoplay. click waits for a click; eager mounts immediately. Set a module default with `video({ loading: 'click' })`. Actual playback depends on the platform, network, and embedding permissions; local iframe tests do not guarantee remote playback. Use `video({ resolveUrl })` for a custom provider.
307
+
308
+ Click-to-load example (no player is created before clicking):
309
+
310
+ <video url="https://www.youtube.com/watch?v=dQw4w9WgXcQ" loading="click" title="Video example" />
311
+
312
+ ## Translations
313
+
314
+ ```markdown
315
+ <translations default="both">
316
+
317
+ <origin>
318
+
319
+ Original **Markdown**.
320
+
321
+ </origin>
322
+
323
+ <translation>
324
+
325
+ 翻译后的 **Markdown**。
326
+
327
+ </translation>
328
+
329
+ </translations>
330
+ ```
331
+
332
+ Rendered result (interactive where applicable):
333
+
334
+ <translations default="both">
335
+
336
+ <origin>
337
+
338
+ Original **Markdown**.
339
+
340
+ </origin>
341
+
342
+ <translation>
343
+
344
+ 翻译后的 **Markdown**。
345
+
346
+ </translation>
347
+
348
+ </translations>
349
+
350
+ `default` accepts origin, translation, or both, defaulting to origin unless overridden by the factory's defaultMode. The marker cycles through these modes. Parallel mode shows the translation first. During streaming, an available side is shown while the other is missing. This module does not translate content automatically.
351
+
352
+ Global `parameters.translationMode` overrides individual blocks. Pass onTranslationModeChange to accept marker requests; without a callback, a global mode is locked. Setting it to undefined restores local choices. See [application integration](integration.md).
353
+
354
+ ## Selection and replacement
355
+
356
+ Toolbar-authored highlights are annotations; source-authored `==highlights==` offer copying without editing. All registered default tags also support their matching `::` directive. Register plugins for custom tags. See [extension development](extensions.md) to select or replace default modules.
357
+
358
+ ## Two-colon components
359
+
360
+ All default modules accept the [CoMark component form](https://comark.dev/syntax/components), including nesting, scalar attributes, and Markdown children:
361
+
362
+ ```md
363
+ ::definition{title="A definition"}
364
+ **Rich** Markdown content.
365
+ ::
366
+
367
+ ::question{title="A question"}
368
+ ::question-content
369
+ The prompt.
370
+ ::
371
+ ::question-answer
372
+ The answer.
373
+ ::
374
+ ::
375
+ ```
376
+
377
+ Names: `gfm`, `definition`, `title`, `content`, `question` and its existing child tags, `extras`, `extra`, `video`, `md-video`, `figures`, `figure`, `figcaption`, `caption`, `img`, `citation`, `ref`, `translations`, `origin`, `translation`, `code` (alias `code-highlight`), `math`, `mermaid`, `callout`, `highlight`, `footnote`, and `footnote-ref`. `::code{lang="typescript"}` and `::math` preserve their bodies literally. Standard Markdown fences, JSX, single-colon inline directives and existing triple-colon containers remain supported. An unpaired two-colon line in a finished document keeps its legacy leaf-directive meaning. This is component-syntax compatibility, not support for CoMark's YAML props, named slots or frontmatter.
378
+
379
+ During streaming, partial headers, links, inline code/emphasis/math delimiters and table headers are withheld until usable. Registered open components carry `incomplete`; the module chooses a loading view or progressive content. Code fences and display math can render before their closing delimiter. Set `streaming={false}` or call `finish()` to restore normal final Markdown interpretation. Source ranges always refer to the unmodified original input.
380
+
381
+ ## Mermaid diagrams
382
+
383
+ ````markdown
384
+ ```mermaid
385
+ flowchart LR
386
+ A[Start] --> B{Ready}
387
+ B --> C[Read on]
388
+ ```
389
+ ````
390
+
391
+ `::mermaid` is also supported. Open streaming blocks show a loading ring; completed diagrams load asynchronously and fade into view. The math-style surface has one rounded toolbar for copying source, zooming in/out, and switching source/image views. Selection, highlights and markers treat the whole diagram atomically in both views. Mermaid uses strict mode without diagram interaction callbacks.
392
+
393
+ Rendered result:
394
+
395
+ ```mermaid
396
+ flowchart LR
397
+ A[Start] --> B{Ready}
398
+ B --> C[Read on]
399
+ ```
400
+
401
+ Drag to pan, or use arrow keys, Page Up/Down, Home/End and the wheel; Shift+wheel moves horizontally. Click or Enter selects the whole block with its selection toolbar below. Zoomed content scrolls within `--limr-mermaid-max-height`, defaulting to `min(70vh, 36rem)`. The diagram's own copy button copies its body; selection-toolbar and browser copying preserve the full fence or directive. See [styles](styles.md) and [atomic copying](annotations.md).
402
+
403
+ ## Callouts and nested quotes
404
+
405
+ ```markdown
406
+ > [!tip]+ Custom title
407
+ > A useful hint.
408
+ >
409
+ > > An ordinary nested quote.
410
+ > >
411
+ > > > [!warning]- Collapsible reminder
412
+ > > > With **Markdown** content.
413
+ ```
414
+
415
+ Default types are `note`, `abstract`, `info`, `todo`, `tip`, `success`, `question`, `warning`, `failure`, `danger`, `bug`, `example`, and `quote`. Obsidian aliases are supported: summary/tldr, hint/important, check/done, help/faq, caution/attention, fail/missing, error, and cite. Types are case-insensitive; unknown names use note styling. `+` starts expanded, `-` starts collapsed, and no sign creates a regular block. The equivalent component is `::callout{type="tip" title="Title" fold="-"}`.
416
+
417
+ Rendered result; expand the nested reminder:
418
+
419
+ > [!tip]+ Custom title
420
+ > A useful hint.
421
+ >
422
+ > > An ordinary nested quote.
423
+ > >
424
+ > > > [!warning]- Collapsible reminder
425
+ > > > With **Markdown** content.
426
+
427
+ ## Source highlights and footnotes
428
+
429
+ ```markdown
430
+ ==A blue highlight== offers copying without editing.
431
+
432
+ ==A named note==[^note]
433
+
434
+ ==An inline note==^[With **Markdown** content.]
435
+
436
+ [^note]: Footnote content.
437
+
438
+ A second paragraph.
439
+ ```
440
+
441
+ Highlights preserve rich inline formatting. Escaped punctuation, code and math do not create highlights. Override the blue through `--limr-inline-highlight` or `inlineHighlights({ color })`. Their toolbar contains only a copy button and a single-line, left-aligned read-only hint.
442
+
443
+ Footnotes use rounded comment markers, sidebar items on wide readers, and floating cards on narrow readers. Adjacent footnotes reference precisely the highlighted text; standalone markers reference their paragraph. Named definitions can be reused. `::highlight`, `::footnote{id="note"}`, and `::footnote-ref{id="note"}` provide component forms. Removing the `footnotes` module restores GFM superscripts and endnotes.
444
+
445
+ Rendered result; click a highlight or comment marker:
446
+
447
+ ==A blue highlight== offers copying without editing.
448
+
449
+ ==A named note==[^syntax-source-highlight]
450
+
451
+ ==An inline note==^[With **Markdown** content.]
452
+
453
+ [^syntax-source-highlight]: Footnote content.
454
+
455
+ A second paragraph.