Skip to content

Commit c2c243a

Browse files
claude: Add Typst margin layout support
Implement Tufte-style margin layout for Typst format using the marginalia package. Features: - Margin notes, figures, tables, and captions via .column-margin class - Margin citations with citeproc support (citation-location: margin) - Full-width content via .column-screen and .column-page classes - Configurable margin-geometry following marginalia's proportions - Support for subfigures and panel layouts in margins - Typst show rule for automatic margin footnote placement Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
1 parent 681e23a commit c2c243a

116 files changed

Lines changed: 6293 additions & 110 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎src/resources/editor/tools/vs-code.mjs‎

Lines changed: 91 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -8002,7 +8002,8 @@ var require_yaml_intelligence_resources = __commonJS({
80028002
],
80038003
formats: [
80048004
"$html-files",
8005-
"$pdf-all"
8005+
"$pdf-all",
8006+
"typst"
80068007
]
80078008
},
80088009
schema: {
@@ -8024,7 +8025,8 @@ var require_yaml_intelligence_resources = __commonJS({
80248025
],
80258026
formats: [
80268027
"$html-files",
8027-
"$pdf-all"
8028+
"$pdf-all",
8029+
"typst"
80288030
]
80298031
},
80308032
schema: {
@@ -8046,7 +8048,8 @@ var require_yaml_intelligence_resources = __commonJS({
80468048
],
80478049
formats: [
80488050
"$html-files",
8049-
"$pdf-all"
8051+
"$pdf-all",
8052+
"typst"
80508053
]
80518054
},
80528055
schema: {
@@ -13252,6 +13255,29 @@ var require_yaml_intelligence_resources = __commonJS({
1325213255
}
1325313256
}
1325413257
}
13258+
},
13259+
{
13260+
id: "marginalia-side-geometry",
13261+
object: {
13262+
closed: true,
13263+
properties: {
13264+
far: {
13265+
string: {
13266+
description: "Distance from page edge to wideblock boundary."
13267+
}
13268+
},
13269+
width: {
13270+
string: {
13271+
description: "Width of the margin note column."
13272+
}
13273+
},
13274+
separation: {
13275+
string: {
13276+
description: "Gap between margin column and body text."
13277+
}
13278+
}
13279+
}
13280+
}
1325513281
}
1325613282
],
1325713283
"schema/document-about.yml": [
@@ -15363,7 +15389,8 @@ var require_yaml_intelligence_resources = __commonJS({
1536315389
"$markdown-all",
1536415390
"muse",
1536515391
"$html-files",
15366-
"pdf"
15392+
"pdf",
15393+
"typst"
1536715394
]
1536815395
},
1536915396
schema: {
@@ -16346,6 +16373,12 @@ var require_yaml_intelligence_resources = __commonJS({
1634616373
},
1634716374
{
1634816375
name: "grid",
16376+
tags: {
16377+
formats: [
16378+
"$html-doc",
16379+
"typst"
16380+
]
16381+
},
1634916382
schema: {
1635016383
object: {
1635116384
closed: true,
@@ -16366,24 +16399,24 @@ var require_yaml_intelligence_resources = __commonJS({
1636616399
},
1636716400
"margin-width": {
1636816401
string: {
16369-
description: "The base width of the margin (right) column in an HTML page."
16402+
description: "The base width of the margin (right) column. For Typst, this controls the width of the margin note column."
1637016403
}
1637116404
},
1637216405
"body-width": {
1637316406
string: {
16374-
description: "The base width of the body (center) column in an HTML page."
16407+
description: "The base width of the body (center) column. For Typst, this is computed as the remainder after other columns."
1637516408
}
1637616409
},
1637716410
"gutter-width": {
1637816411
string: {
16379-
description: "The width of the gutter that appears between columns in an HTML page."
16412+
description: "The width of the gutter that appears between columns. For Typst, this is the gap between the text column and margin notes."
1638016413
}
1638116414
}
1638216415
}
1638316416
}
1638416417
},
1638516418
description: {
16386-
short: "Properties of the grid system used to layout Quarto HTML pages."
16419+
short: "Properties of the grid system used to layout Quarto HTML and Typst pages."
1638716420
}
1638816421
},
1638916422
{
@@ -18073,7 +18106,8 @@ var require_yaml_intelligence_resources = __commonJS({
1807318106
},
1807418107
tags: {
1807518108
formats: [
18076-
"$html-doc"
18109+
"$html-doc",
18110+
"typst"
1807718111
]
1807818112
},
1807918113
default: "document",
@@ -23772,6 +23806,10 @@ var require_yaml_intelligence_resources = __commonJS({
2377223806
short: "Shift heading levels by a positive or negative integer. For example,\nwith <code>shift-heading-level-by: -1</code>, level 2 headings become\nlevel 1 headings.",
2377323807
long: "Shift heading levels by a positive or negative integer. For example,\nwith <code>shift-heading-level-by: -1</code>, level 2 headings become\nlevel 1 headings, and level 3 headings become level 2 headings. Headings\ncannot have a level less than 1, so a heading that would be shifted\nbelow level 1 becomes a regular paragraph. Exception: with a shift of\n-N, a level-N heading at the beginning of the document replaces the\nmetadata title."
2377423808
},
23809+
{
23810+
short: "Schema to use for numbering pages, e.g.&nbsp;<code>1</code> or\n<code>i</code>, or <code>false</code> to omit page numbering.",
23811+
long: 'Schema to use for numbering pages, e.g.&nbsp;<code>1</code> or\n<code>i</code>, or <code>false</code> to omit page numbering.\nSee <a href="https://typst.app/docs/reference/model/numbering/">Typst\nNumbering</a> for additional information.'
23812+
},
2377523813
{
2377623814
short: "Sets the page numbering style and location for the document.",
2377723815
long: 'Sets the page numbering style and location for the document using the\n<code>\\setuppagenumbering</code> command.\nSee <a href="https://wiki.contextgarden.net/Command/setuppagenumbering">ConTeXt\nPage Numbering</a> for additional information.'
@@ -24904,10 +24942,16 @@ var require_yaml_intelligence_resources = __commonJS({
2490424942
"Manuscript configuration",
2490524943
"internal-schema-hack",
2490624944
"List execution engines you want to give priority when determining\nwhich engine should render a notebook. If two engines have support for a\nnotebook, the one listed earlier will be chosen. Quarto\u2019s default order\nis \u2018knitr\u2019, \u2018jupyter\u2019, \u2018markdown\u2019, \u2018julia\u2019.",
24945+
"Distance from page edge to wideblock boundary.",
24946+
"Width of the margin note column.",
24947+
"Gap between margin column and body text.",
2490724948
{
24908-
short: "Schema to use for numbering pages, e.g.&nbsp;<code>1</code> or\n<code>i</code>, or <code>false</code> to omit page numbering.",
24909-
long: 'Schema to use for numbering pages, e.g.&nbsp;<code>1</code> or\n<code>i</code>, or <code>false</code> to omit page numbering.\nSee <a href="https://typst.app/docs/reference/model/numbering/">Typst\nNumbering</a> for additional information.'
24910-
}
24949+
short: "Advanced geometry settings for Typst margin layout.",
24950+
long: "Fine-grained control over marginalia package geometry. Most users\nshould use <code>margin</code> and <code>grid</code> options instead;\nthese values are computed automatically.\nUser-specified values override the computed defaults."
24951+
},
24952+
"Inner (left) margin geometry.",
24953+
"Outer (right) margin geometry.",
24954+
"Minimum vertical spacing between margin notes (default: 8pt)."
2491124955
],
2491224956
"schema/external-schemas.yml": [
2491324957
{
@@ -25136,12 +25180,12 @@ var require_yaml_intelligence_resources = __commonJS({
2513625180
mermaid: "%%"
2513725181
},
2513825182
"handlers/mermaid/schema.yml": {
25139-
_internalId: 218561,
25183+
_internalId: 219143,
2514025184
type: "object",
2514125185
description: "be an object",
2514225186
properties: {
2514325187
"mermaid-format": {
25144-
_internalId: 218553,
25188+
_internalId: 219135,
2514525189
type: "enum",
2514625190
enum: [
2514725191
"png",
@@ -25157,7 +25201,7 @@ var require_yaml_intelligence_resources = __commonJS({
2515725201
exhaustiveCompletions: true
2515825202
},
2515925203
theme: {
25160-
_internalId: 218560,
25204+
_internalId: 219142,
2516125205
type: "anyOf",
2516225206
anyOf: [
2516325207
{
@@ -25240,6 +25284,38 @@ var require_yaml_intelligence_resources = __commonJS({
2524025284
]
2524125285
},
2524225286
description: "The logo image."
25287+
},
25288+
{
25289+
name: "margin-geometry",
25290+
schema: {
25291+
object: {
25292+
closed: true,
25293+
properties: {
25294+
inner: {
25295+
ref: "marginalia-side-geometry",
25296+
description: "Inner (left) margin geometry."
25297+
},
25298+
outer: {
25299+
ref: "marginalia-side-geometry",
25300+
description: "Outer (right) margin geometry."
25301+
},
25302+
clearance: {
25303+
string: {
25304+
description: "Minimum vertical spacing between margin notes (default: 8pt)."
25305+
}
25306+
}
25307+
}
25308+
}
25309+
},
25310+
tags: {
25311+
formats: [
25312+
"typst"
25313+
]
25314+
},
25315+
description: {
25316+
short: "Advanced geometry settings for Typst margin layout.",
25317+
long: "Fine-grained control over marginalia package geometry. Most users should\nuse `margin` and `grid` options instead; these values are computed automatically.\n\nUser-specified values override the computed defaults.\n"
25318+
}
2524325319
}
2524425320
]
2524525321
};

‎src/resources/editor/tools/yaml/all-schema-definitions.json‎

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)