tinymist_analysis/upstream/
mod.rs1mod tooltip;
4
5pub use tooltip::{Tooltip, tooltip_};
6
7use std::{collections::HashMap, fmt::Write, sync::LazyLock};
8
9use comemo::Tracked;
10use ecow::{EcoString, eco_format};
11use serde::Deserialize;
12use serde_yaml as yaml;
13use typst::{
14 Category, Feature, Features, Library, LibraryExt, World,
15 diag::{StrResult, bail},
16 foundations::{Binding, Content, Func, Module, Type, Value},
17 introspection::MetadataElem,
18 syntax::Span,
19 text::{FontInfo, FontStyle},
20};
21
22pub fn plain_docs_sentence(docs: &str) -> EcoString {
26 crate::log_debug_ct!("plain docs {docs:?}");
27 let docs = docs.replace("```example", "```typ");
28 let mut scanner = unscanny::Scanner::new(&docs);
29 let mut output = EcoString::new();
30 let mut link = false;
31 while let Some(ch) = scanner.eat() {
32 match ch {
33 '`' => {
34 let mut raw = scanner.eat_until('`');
35 if (raw.starts_with('{') && raw.ends_with('}'))
36 || (raw.starts_with('[') && raw.ends_with(']'))
37 {
38 raw = &raw[1..raw.len() - 1];
39 }
40
41 scanner.eat();
42 output.push('`');
43 output.push_str(raw);
44 output.push('`');
45 }
46 '[' => {
47 link = true;
48 output.push('[');
49 }
50 ']' if link => {
51 output.push(']');
52 let cursor = scanner.cursor();
53 if scanner.eat_if('(') {
54 scanner.eat_until(')');
55 let link_content = scanner.from(cursor + 1);
56 scanner.eat();
57
58 crate::log_debug_ct!("Intra Link: {link_content}");
59 let link = resolve(link_content, "https://typst.app/docs/").ok();
60 let link = link.unwrap_or_else(|| {
61 log::warn!("Failed to resolve link: {link_content}");
62 "https://typst.app/docs/404.html".to_string()
63 });
64
65 output.push('(');
66 output.push_str(&link);
67 output.push(')');
68 } else if scanner.eat_if('[') {
69 scanner.eat_until(']');
70 scanner.eat();
71 output.push_str(scanner.from(cursor));
72 }
73 link = false
74 }
75 _ => output.push(ch),
81 }
82 }
83
84 output
85}
86
87#[derive(Debug, Clone, Deserialize)]
89struct GroupData {
90 name: EcoString,
91 category: EcoString,
93 #[serde(default)]
94 path: Vec<EcoString>,
95 #[serde(default)]
96 filter: Vec<EcoString>,
97 }
99
100impl GroupData {
101 fn module(&self) -> &'static Module {
102 let mut focus = &LIBRARY.global;
103 for path in &self.path {
104 focus = get_module(focus, path).unwrap();
105 }
106 focus
107 }
108}
109
110static GROUPS: LazyLock<Vec<GroupData>> = LazyLock::new(|| {
111 let mut groups: Vec<GroupData> = yaml::from_str(include_str!("groups.yml")).unwrap();
112 for group in &mut groups {
113 if group.filter.is_empty() && group.name != "std" {
114 group.filter = group
115 .module()
116 .scope()
117 .iter()
118 .filter(|(_, v)| matches!(v.read(), Value::Func(_)))
119 .map(|(k, _)| k.clone())
120 .collect();
121 }
122 }
123 groups
124});
125
126pub fn resolve(link: &str, base: &str) -> StrResult<String> {
128 if link.starts_with('#') || link.starts_with("http") {
129 return Ok(link.to_string());
130 }
131
132 let (head, tail) = split_link(link)?;
133 let mut route = match resolve_known(head, base) {
134 Some(route) => route,
135 None => resolve_definition(head, base)?,
136 };
137
138 if !tail.is_empty() {
139 route.push('/');
140 route.push_str(tail);
141 }
142
143 if !route.contains(['#', '?']) && !route.ends_with('/') {
144 route.push('/');
145 }
146
147 Ok(route)
148}
149
150fn split_link(link: &str) -> StrResult<(&str, &str)> {
152 let first = link.split('/').next().unwrap_or(link);
153 let rest = link[first.len()..].trim_start_matches('/');
154 Ok((first, rest))
155}
156
157fn resolve_known(head: &str, base: &str) -> Option<String> {
159 Some(match head {
160 "$tutorial" => format!("{base}tutorial"),
161 "$reference" => format!("{base}reference"),
162 "$category" => format!("{base}reference"),
163 "$syntax" => format!("{base}reference/syntax"),
164 "$styling" => format!("{base}reference/styling"),
165 "$scripting" => format!("{base}reference/scripting"),
166 "$context" => format!("{base}reference/context"),
167 "$guides" => format!("{base}guides"),
168 "$changelog" => format!("{base}changelog"),
169 "$community" => format!("{base}community"),
170 "$universe" => "https://typst.app/universe".into(),
171 _ => return None,
172 })
173}
174
175static LIBRARY: LazyLock<Library> = LazyLock::new(|| {
176 Library::builder()
177 .with_features(Features::from_iter([Feature::Html]))
178 .build()
179});
180
181#[track_caller]
183fn get_module<'a>(parent: &'a Module, name: &str) -> StrResult<&'a Module> {
184 match parent.scope().get(name).map(|x| x.read()) {
185 Some(Value::Module(module)) => Ok(module),
186 _ => bail!("module doesn't contain module `{name}`"),
187 }
188}
189
190fn resolve_definition(head: &str, base: &str) -> StrResult<String> {
192 let mut parts = head.trim_start_matches('$').split('.').peekable();
193 let mut focus = &LIBRARY.global;
194 let mut category = None;
195
196 while let Some(name) = parts.peek() {
197 if category.is_none() {
198 category = focus.scope().get(name).and_then(Binding::category);
199 }
200 let Ok(module) = get_module(focus, name) else {
201 break;
202 };
203 focus = module;
204 parts.next();
205 }
206
207 let Some(category) = category else {
208 bail!("{head} has no category")
209 };
210
211 let name = parts.next().ok_or("link is missing first part")?;
212 let value = focus.field(name, ())?;
213
214 if let Some(group) = GROUPS.iter().find(|group| {
216 group.category == category.name() && group.filter.iter().any(|func| func == name)
217 }) {
218 let mut route = format!(
219 "{}reference/{}/{}/#functions-{}",
220 base, group.category, group.name, name
221 );
222 if let Some(param) = parts.next() {
223 route.push('-');
224 route.push_str(param);
225 }
226 return Ok(route);
227 }
228
229 let mut route = format!("{}reference/{}/{name}", base, category.name());
230 if let Some(next) = parts.next() {
231 if let Ok(field) = value.field(next, ()) {
232 route.push_str("/#definitions-");
233 route.push_str(next);
234 if let Some(next) = parts.next()
235 && field
236 .cast::<Func>()
237 .is_ok_and(|func| func.param(next).is_some())
238 {
239 route.push('-');
240 route.push_str(next);
241 }
242 } else if value
243 .clone()
244 .cast::<Func>()
245 .is_ok_and(|func| func.param(next).is_some())
246 {
247 route.push_str("/#parameters-");
248 route.push_str(next);
249 } else {
250 bail!("field {next} not found");
251 }
252 }
253
254 Ok(route)
255}
256
257#[allow(clippy::derived_hash_with_manual_eq)]
258#[derive(Debug, Clone, Hash)]
259enum CatKey {
260 Func(Func),
261 Type(Type),
262}
263
264impl PartialEq for CatKey {
265 fn eq(&self, other: &Self) -> bool {
266 use typst::foundations::FuncInner::*;
267 match (self, other) {
268 (CatKey::Func(a), CatKey::Func(b)) => match (a.inner(), b.inner()) {
269 (Native(a), Native(b)) => a == b,
270 (Element(a), Element(b)) => a == b,
271 _ => false,
272 },
273 (CatKey::Type(a), CatKey::Type(b)) => a == b,
274 _ => false,
275 }
276 }
277}
278
279impl Eq for CatKey {}
280
281static ROUTE_MAPS: LazyLock<HashMap<CatKey, String>> = LazyLock::new(|| {
283 #[allow(clippy::mutable_key_type)]
285 let mut map = HashMap::new();
286 let mut scope_to_finds = vec![
287 (LIBRARY.global.scope(), None, None),
288 (LIBRARY.math.scope(), None, None),
289 ];
290 while let Some((scope, parent_name, cat)) = scope_to_finds.pop() {
291 for (name, bind) in scope.iter() {
292 let cat = cat.or_else(|| bind.category());
293 let name = urlify(name);
294 match bind.read() {
295 Value::Func(func) => {
296 if let Some(cat) = cat {
297 let Some(name) = func.name() else {
298 continue;
299 };
300
301 if let Some(group) = GROUPS.iter().find(|group| {
303 group.category == cat.name()
304 && group.filter.iter().any(|func| func == name)
305 }) {
306 let route = format!(
307 "reference/{}/{}/#functions-{name}",
308 group.category, group.name
309 );
310 map.insert(CatKey::Func(func.clone()), route);
311 continue;
312 }
313
314 crate::log_debug_ct!("func: {func:?} -> {cat:?}");
315
316 let route = format_route(parent_name.as_deref(), name, &cat);
317
318 map.insert(CatKey::Func(func.clone()), route);
319 }
320 if let Some(s) = func.scope() {
321 scope_to_finds.push((s, Some(name), cat));
322 }
323 }
324 Value::Type(t) => {
325 if let Some(cat) = cat {
326 crate::log_debug_ct!("type: {t:?} -> {cat:?}");
327
328 let route = format_route(parent_name.as_deref(), &name, &cat);
329
330 map.entry(CatKey::Type(*t)).or_insert(route);
340 }
341 scope_to_finds.push((t.scope(), Some(name), cat));
342 }
343 Value::Module(module) => {
344 scope_to_finds.push((module.scope(), Some(name), cat));
345 }
346 _ => {}
347 }
348 }
349 }
350 map
351});
352
353fn format_route(parent_name: Option<&str>, name: &str, cat: &Category) -> String {
354 match parent_name {
355 Some(parent_name) if parent_name != cat.name() => {
356 format!("reference/{}/{parent_name}/#definitions-{name}", cat.name())
357 }
358 Some(_) | None => format!("reference/{}/{name}/", cat.name()),
359 }
360}
361
362pub(crate) fn urlify(title: &str) -> EcoString {
364 title
365 .chars()
366 .map(|ch| ch.to_ascii_lowercase())
367 .map(|ch| match ch {
368 'a'..='z' | '0'..='9' => ch,
369 _ => '-',
370 })
371 .collect()
372}
373
374pub fn route_of_value(val: &Value) -> Option<&'static String> {
376 let key = match val {
378 Value::Func(func) => CatKey::Func(func.clone()),
379 Value::Type(ty) => CatKey::Type(*ty),
380 _ => return None,
381 };
382
383 ROUTE_MAPS.get(&key)
384}
385
386pub fn summarize_font_family<'a>(variants: impl Iterator<Item = &'a FontInfo>) -> EcoString {
388 let mut infos: Vec<_> = variants.collect();
389 infos.sort_by_key(|info: &&FontInfo| info.variant);
390
391 let mut has_italic = false;
392 let mut min_weight = u16::MAX;
393 let mut max_weight = 0;
394 for info in &infos {
395 let weight = info.variant.weight.to_number();
396 has_italic |= info.variant.style == FontStyle::Italic;
397 min_weight = min_weight.min(weight);
398 max_weight = min_weight.max(weight);
399 }
400
401 let count = infos.len();
402 let mut detail = eco_format!("{count} variant{}.", if count == 1 { "" } else { "s" });
403
404 if min_weight == max_weight {
405 write!(detail, " Weight {min_weight}.").unwrap();
406 } else {
407 write!(detail, " Weights {min_weight}–{max_weight}.").unwrap();
408 }
409
410 if has_italic {
411 detail.push_str(" Has italics.");
412 }
413
414 detail
415}
416
417pub fn truncated_repr_<const SZ_LIMIT: usize>(value: &Value) -> EcoString {
419 use typst::foundations::Repr;
420
421 let data: Option<Content> = value.clone().cast().ok();
422 let metadata: Option<MetadataElem> = data.and_then(|content| content.unpack().ok());
423
424 let repr = if let Some(metadata) = metadata {
426 metadata.value.repr()
427 } else {
428 value.repr()
429 };
430
431 if repr.len() > SZ_LIMIT {
432 eco_format!("[truncated-repr: {} bytes]", repr.len())
433 } else {
434 repr
435 }
436}
437
438pub fn truncated_repr(value: &Value) -> EcoString {
440 const _10MB: usize = 10 * 1024 * 1024;
441 truncated_repr_::<_10MB>(value)
442}
443
444pub fn with_vm<T>(
446 world: Tracked<dyn World + '_>,
447 f: impl FnOnce(&mut typst_shim::eval::Vm) -> T,
448) -> T {
449 use comemo::Track;
450 use typst::engine::*;
451 use typst::foundations::*;
452 use typst::introspection::*;
453 use typst_shim::eval::*;
454
455 let library = world.library();
456 let introspector = EmptyIntrospector;
457 let traced = Traced::default();
458 let mut sink = Sink::new();
459 let engine = Engine {
460 library,
461 world,
462 route: Route::default(),
463 introspector: typst::utils::Protected::new(introspector.track()),
464 traced: traced.track(),
465 sink: sink.track_mut(),
466 };
467
468 let context = Context::none();
469 let mut vm = Vm::new(
470 engine,
471 context.track(),
472 Scopes::new(Some(world.library())),
473 Span::detached(),
474 );
475
476 f(&mut vm)
477}
478
479#[cfg(test)]
480mod tests {
481 use crate::upstream::ROUTE_MAPS;
482
483 #[test]
484 fn docs_test() {
485 assert_eq!(
486 "[citation](https://typst.app/docs/reference/model/cite/)",
487 super::plain_docs_sentence("[citation]($cite)")
488 );
489 assert_eq!(
490 "[citation][cite]",
491 super::plain_docs_sentence("[citation][cite]")
492 );
493 assert_eq!(
494 "[citation](https://typst.app/docs/reference/model/cite/)",
495 super::plain_docs_sentence("[citation]($cite)")
496 );
497 assert_eq!(
498 "[citation][cite][cite2]",
499 super::plain_docs_sentence("[citation][cite][cite2]")
500 );
501 assert_eq!(
502 "[citation][cite](test)[cite2]",
503 super::plain_docs_sentence("[citation][cite](test)[cite2]")
504 );
505 }
506
507 #[test]
508 fn routes() {
509 let access = |route: &String| format!("https://typst.app/docs/{route}");
510 let mut values = ROUTE_MAPS.values().map(access).collect::<Vec<_>>();
511 values.sort();
512
513 insta::assert_snapshot!(values.as_slice().join("\n"), @"
514 https://typst.app/docs/reference/data-loading/cbor/
515 https://typst.app/docs/reference/data-loading/cbor/#definitions-encode
516 https://typst.app/docs/reference/data-loading/csv/
517 https://typst.app/docs/reference/data-loading/json/
518 https://typst.app/docs/reference/data-loading/json/#definitions-encode
519 https://typst.app/docs/reference/data-loading/read/
520 https://typst.app/docs/reference/data-loading/toml/
521 https://typst.app/docs/reference/data-loading/toml/#definitions-encode
522 https://typst.app/docs/reference/data-loading/xml/
523 https://typst.app/docs/reference/data-loading/yaml/
524 https://typst.app/docs/reference/data-loading/yaml/#definitions-encode
525 https://typst.app/docs/reference/foundations/arguments/
526 https://typst.app/docs/reference/foundations/arguments/#definitions-at
527 https://typst.app/docs/reference/foundations/arguments/#definitions-filter
528 https://typst.app/docs/reference/foundations/arguments/#definitions-len
529 https://typst.app/docs/reference/foundations/arguments/#definitions-map
530 https://typst.app/docs/reference/foundations/arguments/#definitions-named
531 https://typst.app/docs/reference/foundations/arguments/#definitions-pos
532 https://typst.app/docs/reference/foundations/array/
533 https://typst.app/docs/reference/foundations/array/#definitions-all
534 https://typst.app/docs/reference/foundations/array/#definitions-any
535 https://typst.app/docs/reference/foundations/array/#definitions-at
536 https://typst.app/docs/reference/foundations/array/#definitions-chunks
537 https://typst.app/docs/reference/foundations/array/#definitions-contains
538 https://typst.app/docs/reference/foundations/array/#definitions-dedup
539 https://typst.app/docs/reference/foundations/array/#definitions-enumerate
540 https://typst.app/docs/reference/foundations/array/#definitions-filter
541 https://typst.app/docs/reference/foundations/array/#definitions-find
542 https://typst.app/docs/reference/foundations/array/#definitions-first
543 https://typst.app/docs/reference/foundations/array/#definitions-flatten
544 https://typst.app/docs/reference/foundations/array/#definitions-fold
545 https://typst.app/docs/reference/foundations/array/#definitions-insert
546 https://typst.app/docs/reference/foundations/array/#definitions-intersperse
547 https://typst.app/docs/reference/foundations/array/#definitions-join
548 https://typst.app/docs/reference/foundations/array/#definitions-last
549 https://typst.app/docs/reference/foundations/array/#definitions-len
550 https://typst.app/docs/reference/foundations/array/#definitions-map
551 https://typst.app/docs/reference/foundations/array/#definitions-pop
552 https://typst.app/docs/reference/foundations/array/#definitions-position
553 https://typst.app/docs/reference/foundations/array/#definitions-product
554 https://typst.app/docs/reference/foundations/array/#definitions-push
555 https://typst.app/docs/reference/foundations/array/#definitions-range
556 https://typst.app/docs/reference/foundations/array/#definitions-reduce
557 https://typst.app/docs/reference/foundations/array/#definitions-remove
558 https://typst.app/docs/reference/foundations/array/#definitions-rev
559 https://typst.app/docs/reference/foundations/array/#definitions-slice
560 https://typst.app/docs/reference/foundations/array/#definitions-sorted
561 https://typst.app/docs/reference/foundations/array/#definitions-split
562 https://typst.app/docs/reference/foundations/array/#definitions-sum
563 https://typst.app/docs/reference/foundations/array/#definitions-to-dict
564 https://typst.app/docs/reference/foundations/array/#definitions-windows
565 https://typst.app/docs/reference/foundations/array/#definitions-zip
566 https://typst.app/docs/reference/foundations/assert/
567 https://typst.app/docs/reference/foundations/assert/#definitions-eq
568 https://typst.app/docs/reference/foundations/assert/#definitions-ne
569 https://typst.app/docs/reference/foundations/bool/
570 https://typst.app/docs/reference/foundations/bytes/
571 https://typst.app/docs/reference/foundations/bytes/#definitions-at
572 https://typst.app/docs/reference/foundations/bytes/#definitions-len
573 https://typst.app/docs/reference/foundations/bytes/#definitions-slice
574 https://typst.app/docs/reference/foundations/calc/#functions-abs
575 https://typst.app/docs/reference/foundations/calc/#functions-acos
576 https://typst.app/docs/reference/foundations/calc/#functions-acosh
577 https://typst.app/docs/reference/foundations/calc/#functions-asin
578 https://typst.app/docs/reference/foundations/calc/#functions-asinh
579 https://typst.app/docs/reference/foundations/calc/#functions-atan
580 https://typst.app/docs/reference/foundations/calc/#functions-atan2
581 https://typst.app/docs/reference/foundations/calc/#functions-atanh
582 https://typst.app/docs/reference/foundations/calc/#functions-binom
583 https://typst.app/docs/reference/foundations/calc/#functions-ceil
584 https://typst.app/docs/reference/foundations/calc/#functions-clamp
585 https://typst.app/docs/reference/foundations/calc/#functions-cos
586 https://typst.app/docs/reference/foundations/calc/#functions-cosh
587 https://typst.app/docs/reference/foundations/calc/#functions-div-euclid
588 https://typst.app/docs/reference/foundations/calc/#functions-erf
589 https://typst.app/docs/reference/foundations/calc/#functions-even
590 https://typst.app/docs/reference/foundations/calc/#functions-exp
591 https://typst.app/docs/reference/foundations/calc/#functions-fact
592 https://typst.app/docs/reference/foundations/calc/#functions-floor
593 https://typst.app/docs/reference/foundations/calc/#functions-fract
594 https://typst.app/docs/reference/foundations/calc/#functions-gcd
595 https://typst.app/docs/reference/foundations/calc/#functions-lcm
596 https://typst.app/docs/reference/foundations/calc/#functions-ln
597 https://typst.app/docs/reference/foundations/calc/#functions-log
598 https://typst.app/docs/reference/foundations/calc/#functions-max
599 https://typst.app/docs/reference/foundations/calc/#functions-min
600 https://typst.app/docs/reference/foundations/calc/#functions-norm
601 https://typst.app/docs/reference/foundations/calc/#functions-odd
602 https://typst.app/docs/reference/foundations/calc/#functions-perm
603 https://typst.app/docs/reference/foundations/calc/#functions-pow
604 https://typst.app/docs/reference/foundations/calc/#functions-quo
605 https://typst.app/docs/reference/foundations/calc/#functions-rem
606 https://typst.app/docs/reference/foundations/calc/#functions-rem-euclid
607 https://typst.app/docs/reference/foundations/calc/#functions-root
608 https://typst.app/docs/reference/foundations/calc/#functions-round
609 https://typst.app/docs/reference/foundations/calc/#functions-sin
610 https://typst.app/docs/reference/foundations/calc/#functions-sinh
611 https://typst.app/docs/reference/foundations/calc/#functions-sqrt
612 https://typst.app/docs/reference/foundations/calc/#functions-tan
613 https://typst.app/docs/reference/foundations/calc/#functions-tanh
614 https://typst.app/docs/reference/foundations/calc/#functions-trunc
615 https://typst.app/docs/reference/foundations/content/
616 https://typst.app/docs/reference/foundations/content/#definitions-at
617 https://typst.app/docs/reference/foundations/content/#definitions-fields
618 https://typst.app/docs/reference/foundations/content/#definitions-func
619 https://typst.app/docs/reference/foundations/content/#definitions-has
620 https://typst.app/docs/reference/foundations/content/#definitions-location
621 https://typst.app/docs/reference/foundations/datetime/
622 https://typst.app/docs/reference/foundations/datetime/#definitions-day
623 https://typst.app/docs/reference/foundations/datetime/#definitions-display
624 https://typst.app/docs/reference/foundations/datetime/#definitions-hour
625 https://typst.app/docs/reference/foundations/datetime/#definitions-minute
626 https://typst.app/docs/reference/foundations/datetime/#definitions-month
627 https://typst.app/docs/reference/foundations/datetime/#definitions-ordinal
628 https://typst.app/docs/reference/foundations/datetime/#definitions-second
629 https://typst.app/docs/reference/foundations/datetime/#definitions-today
630 https://typst.app/docs/reference/foundations/datetime/#definitions-weekday
631 https://typst.app/docs/reference/foundations/datetime/#definitions-year
632 https://typst.app/docs/reference/foundations/decimal/
633 https://typst.app/docs/reference/foundations/dictionary/
634 https://typst.app/docs/reference/foundations/dictionary/#definitions-at
635 https://typst.app/docs/reference/foundations/dictionary/#definitions-filter
636 https://typst.app/docs/reference/foundations/dictionary/#definitions-insert
637 https://typst.app/docs/reference/foundations/dictionary/#definitions-keys
638 https://typst.app/docs/reference/foundations/dictionary/#definitions-len
639 https://typst.app/docs/reference/foundations/dictionary/#definitions-map
640 https://typst.app/docs/reference/foundations/dictionary/#definitions-pairs
641 https://typst.app/docs/reference/foundations/dictionary/#definitions-remove
642 https://typst.app/docs/reference/foundations/dictionary/#definitions-values
643 https://typst.app/docs/reference/foundations/duration/
644 https://typst.app/docs/reference/foundations/duration/#definitions-days
645 https://typst.app/docs/reference/foundations/duration/#definitions-hours
646 https://typst.app/docs/reference/foundations/duration/#definitions-minutes
647 https://typst.app/docs/reference/foundations/duration/#definitions-seconds
648 https://typst.app/docs/reference/foundations/duration/#definitions-weeks
649 https://typst.app/docs/reference/foundations/eval/
650 https://typst.app/docs/reference/foundations/float/
651 https://typst.app/docs/reference/foundations/float/#definitions-from-bytes
652 https://typst.app/docs/reference/foundations/float/#definitions-is-infinite
653 https://typst.app/docs/reference/foundations/float/#definitions-is-nan
654 https://typst.app/docs/reference/foundations/float/#definitions-signum
655 https://typst.app/docs/reference/foundations/float/#definitions-to-bytes
656 https://typst.app/docs/reference/foundations/function/
657 https://typst.app/docs/reference/foundations/function/#definitions-where
658 https://typst.app/docs/reference/foundations/function/#definitions-with
659 https://typst.app/docs/reference/foundations/int/
660 https://typst.app/docs/reference/foundations/int/#definitions-bit-and
661 https://typst.app/docs/reference/foundations/int/#definitions-bit-lshift
662 https://typst.app/docs/reference/foundations/int/#definitions-bit-not
663 https://typst.app/docs/reference/foundations/int/#definitions-bit-or
664 https://typst.app/docs/reference/foundations/int/#definitions-bit-rshift
665 https://typst.app/docs/reference/foundations/int/#definitions-bit-xor
666 https://typst.app/docs/reference/foundations/int/#definitions-from-bytes
667 https://typst.app/docs/reference/foundations/int/#definitions-signum
668 https://typst.app/docs/reference/foundations/int/#definitions-to-bytes
669 https://typst.app/docs/reference/foundations/label/
670 https://typst.app/docs/reference/foundations/module/
671 https://typst.app/docs/reference/foundations/panic/
672 https://typst.app/docs/reference/foundations/path/
673 https://typst.app/docs/reference/foundations/plugin/
674 https://typst.app/docs/reference/foundations/plugin/#definitions-transition
675 https://typst.app/docs/reference/foundations/regex/
676 https://typst.app/docs/reference/foundations/repr/
677 https://typst.app/docs/reference/foundations/selector/
678 https://typst.app/docs/reference/foundations/selector/#definitions-after
679 https://typst.app/docs/reference/foundations/selector/#definitions-and
680 https://typst.app/docs/reference/foundations/selector/#definitions-before
681 https://typst.app/docs/reference/foundations/selector/#definitions-or
682 https://typst.app/docs/reference/foundations/selector/#definitions-within
683 https://typst.app/docs/reference/foundations/str/
684 https://typst.app/docs/reference/foundations/str/#definitions-at
685 https://typst.app/docs/reference/foundations/str/#definitions-clusters
686 https://typst.app/docs/reference/foundations/str/#definitions-codepoints
687 https://typst.app/docs/reference/foundations/str/#definitions-contains
688 https://typst.app/docs/reference/foundations/str/#definitions-ends-with
689 https://typst.app/docs/reference/foundations/str/#definitions-find
690 https://typst.app/docs/reference/foundations/str/#definitions-first
691 https://typst.app/docs/reference/foundations/str/#definitions-from-unicode
692 https://typst.app/docs/reference/foundations/str/#definitions-last
693 https://typst.app/docs/reference/foundations/str/#definitions-len
694 https://typst.app/docs/reference/foundations/str/#definitions-match
695 https://typst.app/docs/reference/foundations/str/#definitions-matches
696 https://typst.app/docs/reference/foundations/str/#definitions-normalize
697 https://typst.app/docs/reference/foundations/str/#definitions-position
698 https://typst.app/docs/reference/foundations/str/#definitions-replace
699 https://typst.app/docs/reference/foundations/str/#definitions-rev
700 https://typst.app/docs/reference/foundations/str/#definitions-slice
701 https://typst.app/docs/reference/foundations/str/#definitions-split
702 https://typst.app/docs/reference/foundations/str/#definitions-starts-with
703 https://typst.app/docs/reference/foundations/str/#definitions-to-unicode
704 https://typst.app/docs/reference/foundations/str/#definitions-trim
705 https://typst.app/docs/reference/foundations/symbol/
706 https://typst.app/docs/reference/foundations/target/
707 https://typst.app/docs/reference/foundations/type/
708 https://typst.app/docs/reference/foundations/version/
709 https://typst.app/docs/reference/foundations/version/#definitions-at
710 https://typst.app/docs/reference/html/typed/#functions-a
711 https://typst.app/docs/reference/html/typed/#functions-abbr
712 https://typst.app/docs/reference/html/typed/#functions-address
713 https://typst.app/docs/reference/html/typed/#functions-area
714 https://typst.app/docs/reference/html/typed/#functions-article
715 https://typst.app/docs/reference/html/typed/#functions-aside
716 https://typst.app/docs/reference/html/typed/#functions-audio
717 https://typst.app/docs/reference/html/typed/#functions-b
718 https://typst.app/docs/reference/html/typed/#functions-base
719 https://typst.app/docs/reference/html/typed/#functions-bdi
720 https://typst.app/docs/reference/html/typed/#functions-bdo
721 https://typst.app/docs/reference/html/typed/#functions-blockquote
722 https://typst.app/docs/reference/html/typed/#functions-body
723 https://typst.app/docs/reference/html/typed/#functions-br
724 https://typst.app/docs/reference/html/typed/#functions-button
725 https://typst.app/docs/reference/html/typed/#functions-canvas
726 https://typst.app/docs/reference/html/typed/#functions-caption
727 https://typst.app/docs/reference/html/typed/#functions-cite
728 https://typst.app/docs/reference/html/typed/#functions-code
729 https://typst.app/docs/reference/html/typed/#functions-col
730 https://typst.app/docs/reference/html/typed/#functions-colgroup
731 https://typst.app/docs/reference/html/typed/#functions-data
732 https://typst.app/docs/reference/html/typed/#functions-datalist
733 https://typst.app/docs/reference/html/typed/#functions-dd
734 https://typst.app/docs/reference/html/typed/#functions-del
735 https://typst.app/docs/reference/html/typed/#functions-details
736 https://typst.app/docs/reference/html/typed/#functions-dfn
737 https://typst.app/docs/reference/html/typed/#functions-dialog
738 https://typst.app/docs/reference/html/typed/#functions-div
739 https://typst.app/docs/reference/html/typed/#functions-dl
740 https://typst.app/docs/reference/html/typed/#functions-dt
741 https://typst.app/docs/reference/html/typed/#functions-elem
742 https://typst.app/docs/reference/html/typed/#functions-em
743 https://typst.app/docs/reference/html/typed/#functions-embed
744 https://typst.app/docs/reference/html/typed/#functions-fieldset
745 https://typst.app/docs/reference/html/typed/#functions-figcaption
746 https://typst.app/docs/reference/html/typed/#functions-figure
747 https://typst.app/docs/reference/html/typed/#functions-footer
748 https://typst.app/docs/reference/html/typed/#functions-form
749 https://typst.app/docs/reference/html/typed/#functions-frame
750 https://typst.app/docs/reference/html/typed/#functions-h1
751 https://typst.app/docs/reference/html/typed/#functions-h2
752 https://typst.app/docs/reference/html/typed/#functions-h3
753 https://typst.app/docs/reference/html/typed/#functions-h4
754 https://typst.app/docs/reference/html/typed/#functions-h5
755 https://typst.app/docs/reference/html/typed/#functions-h6
756 https://typst.app/docs/reference/html/typed/#functions-head
757 https://typst.app/docs/reference/html/typed/#functions-header
758 https://typst.app/docs/reference/html/typed/#functions-hgroup
759 https://typst.app/docs/reference/html/typed/#functions-hr
760 https://typst.app/docs/reference/html/typed/#functions-html
761 https://typst.app/docs/reference/html/typed/#functions-i
762 https://typst.app/docs/reference/html/typed/#functions-iframe
763 https://typst.app/docs/reference/html/typed/#functions-img
764 https://typst.app/docs/reference/html/typed/#functions-input
765 https://typst.app/docs/reference/html/typed/#functions-ins
766 https://typst.app/docs/reference/html/typed/#functions-kbd
767 https://typst.app/docs/reference/html/typed/#functions-label
768 https://typst.app/docs/reference/html/typed/#functions-legend
769 https://typst.app/docs/reference/html/typed/#functions-li
770 https://typst.app/docs/reference/html/typed/#functions-link
771 https://typst.app/docs/reference/html/typed/#functions-main
772 https://typst.app/docs/reference/html/typed/#functions-map
773 https://typst.app/docs/reference/html/typed/#functions-mark
774 https://typst.app/docs/reference/html/typed/#functions-menu
775 https://typst.app/docs/reference/html/typed/#functions-meta
776 https://typst.app/docs/reference/html/typed/#functions-meter
777 https://typst.app/docs/reference/html/typed/#functions-nav
778 https://typst.app/docs/reference/html/typed/#functions-noscript
779 https://typst.app/docs/reference/html/typed/#functions-object
780 https://typst.app/docs/reference/html/typed/#functions-ol
781 https://typst.app/docs/reference/html/typed/#functions-optgroup
782 https://typst.app/docs/reference/html/typed/#functions-option
783 https://typst.app/docs/reference/html/typed/#functions-output
784 https://typst.app/docs/reference/html/typed/#functions-p
785 https://typst.app/docs/reference/html/typed/#functions-picture
786 https://typst.app/docs/reference/html/typed/#functions-pre
787 https://typst.app/docs/reference/html/typed/#functions-progress
788 https://typst.app/docs/reference/html/typed/#functions-q
789 https://typst.app/docs/reference/html/typed/#functions-rp
790 https://typst.app/docs/reference/html/typed/#functions-rt
791 https://typst.app/docs/reference/html/typed/#functions-ruby
792 https://typst.app/docs/reference/html/typed/#functions-s
793 https://typst.app/docs/reference/html/typed/#functions-samp
794 https://typst.app/docs/reference/html/typed/#functions-script
795 https://typst.app/docs/reference/html/typed/#functions-search
796 https://typst.app/docs/reference/html/typed/#functions-section
797 https://typst.app/docs/reference/html/typed/#functions-select
798 https://typst.app/docs/reference/html/typed/#functions-slot
799 https://typst.app/docs/reference/html/typed/#functions-small
800 https://typst.app/docs/reference/html/typed/#functions-source
801 https://typst.app/docs/reference/html/typed/#functions-span
802 https://typst.app/docs/reference/html/typed/#functions-strong
803 https://typst.app/docs/reference/html/typed/#functions-style
804 https://typst.app/docs/reference/html/typed/#functions-sub
805 https://typst.app/docs/reference/html/typed/#functions-summary
806 https://typst.app/docs/reference/html/typed/#functions-sup
807 https://typst.app/docs/reference/html/typed/#functions-table
808 https://typst.app/docs/reference/html/typed/#functions-tbody
809 https://typst.app/docs/reference/html/typed/#functions-td
810 https://typst.app/docs/reference/html/typed/#functions-template
811 https://typst.app/docs/reference/html/typed/#functions-textarea
812 https://typst.app/docs/reference/html/typed/#functions-tfoot
813 https://typst.app/docs/reference/html/typed/#functions-th
814 https://typst.app/docs/reference/html/typed/#functions-thead
815 https://typst.app/docs/reference/html/typed/#functions-time
816 https://typst.app/docs/reference/html/typed/#functions-title
817 https://typst.app/docs/reference/html/typed/#functions-tr
818 https://typst.app/docs/reference/html/typed/#functions-track
819 https://typst.app/docs/reference/html/typed/#functions-u
820 https://typst.app/docs/reference/html/typed/#functions-ul
821 https://typst.app/docs/reference/html/typed/#functions-var
822 https://typst.app/docs/reference/html/typed/#functions-video
823 https://typst.app/docs/reference/html/typed/#functions-wbr
824 https://typst.app/docs/reference/introspection/counter/
825 https://typst.app/docs/reference/introspection/counter/#definitions-at
826 https://typst.app/docs/reference/introspection/counter/#definitions-display
827 https://typst.app/docs/reference/introspection/counter/#definitions-final
828 https://typst.app/docs/reference/introspection/counter/#definitions-get
829 https://typst.app/docs/reference/introspection/counter/#definitions-step
830 https://typst.app/docs/reference/introspection/counter/#definitions-update
831 https://typst.app/docs/reference/introspection/here/
832 https://typst.app/docs/reference/introspection/locate/
833 https://typst.app/docs/reference/introspection/location/
834 https://typst.app/docs/reference/introspection/location/#definitions-page
835 https://typst.app/docs/reference/introspection/location/#definitions-page-numbering
836 https://typst.app/docs/reference/introspection/location/#definitions-position
837 https://typst.app/docs/reference/introspection/metadata/
838 https://typst.app/docs/reference/introspection/query/
839 https://typst.app/docs/reference/introspection/state/
840 https://typst.app/docs/reference/introspection/state/#definitions-at
841 https://typst.app/docs/reference/introspection/state/#definitions-final
842 https://typst.app/docs/reference/introspection/state/#definitions-get
843 https://typst.app/docs/reference/introspection/state/#definitions-update
844 https://typst.app/docs/reference/layout/align/
845 https://typst.app/docs/reference/layout/alignment/
846 https://typst.app/docs/reference/layout/alignment/#definitions-axis
847 https://typst.app/docs/reference/layout/alignment/#definitions-inv
848 https://typst.app/docs/reference/layout/angle/
849 https://typst.app/docs/reference/layout/angle/#definitions-deg
850 https://typst.app/docs/reference/layout/angle/#definitions-rad
851 https://typst.app/docs/reference/layout/block/
852 https://typst.app/docs/reference/layout/box/
853 https://typst.app/docs/reference/layout/colbreak/
854 https://typst.app/docs/reference/layout/columns/
855 https://typst.app/docs/reference/layout/direction/
856 https://typst.app/docs/reference/layout/direction/#definitions-axis
857 https://typst.app/docs/reference/layout/direction/#definitions-end
858 https://typst.app/docs/reference/layout/direction/#definitions-from
859 https://typst.app/docs/reference/layout/direction/#definitions-inv
860 https://typst.app/docs/reference/layout/direction/#definitions-sign
861 https://typst.app/docs/reference/layout/direction/#definitions-start
862 https://typst.app/docs/reference/layout/direction/#definitions-to
863 https://typst.app/docs/reference/layout/fraction/
864 https://typst.app/docs/reference/layout/grid/
865 https://typst.app/docs/reference/layout/grid/#definitions-cell
866 https://typst.app/docs/reference/layout/grid/#definitions-footer
867 https://typst.app/docs/reference/layout/grid/#definitions-header
868 https://typst.app/docs/reference/layout/grid/#definitions-hline
869 https://typst.app/docs/reference/layout/grid/#definitions-vline
870 https://typst.app/docs/reference/layout/h/
871 https://typst.app/docs/reference/layout/hide/
872 https://typst.app/docs/reference/layout/layout/
873 https://typst.app/docs/reference/layout/length/
874 https://typst.app/docs/reference/layout/length/#definitions-cm
875 https://typst.app/docs/reference/layout/length/#definitions-inches
876 https://typst.app/docs/reference/layout/length/#definitions-mm
877 https://typst.app/docs/reference/layout/length/#definitions-pt
878 https://typst.app/docs/reference/layout/length/#definitions-to-absolute
879 https://typst.app/docs/reference/layout/measure/
880 https://typst.app/docs/reference/layout/move/
881 https://typst.app/docs/reference/layout/pad/
882 https://typst.app/docs/reference/layout/page/
883 https://typst.app/docs/reference/layout/pagebreak/
884 https://typst.app/docs/reference/layout/place/
885 https://typst.app/docs/reference/layout/place/#definitions-flush
886 https://typst.app/docs/reference/layout/ratio/
887 https://typst.app/docs/reference/layout/relative/
888 https://typst.app/docs/reference/layout/repeat/
889 https://typst.app/docs/reference/layout/rotate/
890 https://typst.app/docs/reference/layout/scale/
891 https://typst.app/docs/reference/layout/skew/
892 https://typst.app/docs/reference/layout/stack/
893 https://typst.app/docs/reference/layout/v/
894 https://typst.app/docs/reference/math/accent/
895 https://typst.app/docs/reference/math/attach/#functions-attach
896 https://typst.app/docs/reference/math/attach/#functions-limits
897 https://typst.app/docs/reference/math/attach/#functions-scripts
898 https://typst.app/docs/reference/math/binom/
899 https://typst.app/docs/reference/math/cancel/
900 https://typst.app/docs/reference/math/cases/
901 https://typst.app/docs/reference/math/class/
902 https://typst.app/docs/reference/math/equation/
903 https://typst.app/docs/reference/math/frac/
904 https://typst.app/docs/reference/math/lr/#functions-abs
905 https://typst.app/docs/reference/math/lr/#functions-lr
906 https://typst.app/docs/reference/math/lr/#functions-mid
907 https://typst.app/docs/reference/math/lr/#functions-norm
908 https://typst.app/docs/reference/math/lr/#functions-round
909 https://typst.app/docs/reference/math/mat/
910 https://typst.app/docs/reference/math/op/
911 https://typst.app/docs/reference/math/primes/
912 https://typst.app/docs/reference/math/roots/#functions-root
913 https://typst.app/docs/reference/math/roots/#functions-sqrt
914 https://typst.app/docs/reference/math/sizes/#functions-display
915 https://typst.app/docs/reference/math/sizes/#functions-inline
916 https://typst.app/docs/reference/math/sizes/#functions-script
917 https://typst.app/docs/reference/math/sizes/#functions-sscript
918 https://typst.app/docs/reference/math/stretch/
919 https://typst.app/docs/reference/math/styles/#functions-bold
920 https://typst.app/docs/reference/math/styles/#functions-italic
921 https://typst.app/docs/reference/math/styles/#functions-upright
922 https://typst.app/docs/reference/math/text/
923 https://typst.app/docs/reference/math/underover/#functions-overbrace
924 https://typst.app/docs/reference/math/underover/#functions-overbracket
925 https://typst.app/docs/reference/math/underover/#functions-overline
926 https://typst.app/docs/reference/math/underover/#functions-overparen
927 https://typst.app/docs/reference/math/underover/#functions-overshell
928 https://typst.app/docs/reference/math/underover/#functions-underbrace
929 https://typst.app/docs/reference/math/underover/#functions-underbracket
930 https://typst.app/docs/reference/math/underover/#functions-underline
931 https://typst.app/docs/reference/math/underover/#functions-underparen
932 https://typst.app/docs/reference/math/underover/#functions-undershell
933 https://typst.app/docs/reference/math/variants/#functions-bb
934 https://typst.app/docs/reference/math/variants/#functions-cal
935 https://typst.app/docs/reference/math/variants/#functions-frak
936 https://typst.app/docs/reference/math/variants/#functions-mono
937 https://typst.app/docs/reference/math/variants/#functions-sans
938 https://typst.app/docs/reference/math/variants/#functions-scr
939 https://typst.app/docs/reference/math/variants/#functions-serif
940 https://typst.app/docs/reference/math/vec/
941 https://typst.app/docs/reference/model/bibliography/
942 https://typst.app/docs/reference/model/cite/
943 https://typst.app/docs/reference/model/divider/
944 https://typst.app/docs/reference/model/document/
945 https://typst.app/docs/reference/model/emph/
946 https://typst.app/docs/reference/model/entry/#definitions-body
947 https://typst.app/docs/reference/model/entry/#definitions-indented
948 https://typst.app/docs/reference/model/entry/#definitions-inner
949 https://typst.app/docs/reference/model/entry/#definitions-page
950 https://typst.app/docs/reference/model/entry/#definitions-prefix
951 https://typst.app/docs/reference/model/enum/
952 https://typst.app/docs/reference/model/enum/#definitions-item
953 https://typst.app/docs/reference/model/figure/
954 https://typst.app/docs/reference/model/figure/#definitions-caption
955 https://typst.app/docs/reference/model/footnote/
956 https://typst.app/docs/reference/model/footnote/#definitions-entry
957 https://typst.app/docs/reference/model/heading/
958 https://typst.app/docs/reference/model/link/
959 https://typst.app/docs/reference/model/list/
960 https://typst.app/docs/reference/model/list/#definitions-item
961 https://typst.app/docs/reference/model/numbering/
962 https://typst.app/docs/reference/model/outline/
963 https://typst.app/docs/reference/model/outline/#definitions-entry
964 https://typst.app/docs/reference/model/par/
965 https://typst.app/docs/reference/model/par/#definitions-line
966 https://typst.app/docs/reference/model/parbreak/
967 https://typst.app/docs/reference/model/quote/
968 https://typst.app/docs/reference/model/ref/
969 https://typst.app/docs/reference/model/strong/
970 https://typst.app/docs/reference/model/table/
971 https://typst.app/docs/reference/model/table/#definitions-cell
972 https://typst.app/docs/reference/model/table/#definitions-footer
973 https://typst.app/docs/reference/model/table/#definitions-header
974 https://typst.app/docs/reference/model/table/#definitions-hline
975 https://typst.app/docs/reference/model/table/#definitions-vline
976 https://typst.app/docs/reference/model/terms/
977 https://typst.app/docs/reference/model/terms/#definitions-item
978 https://typst.app/docs/reference/model/title/
979 https://typst.app/docs/reference/pdf/artifact/
980 https://typst.app/docs/reference/pdf/attach/
981 https://typst.app/docs/reference/text/highlight/
982 https://typst.app/docs/reference/text/linebreak/
983 https://typst.app/docs/reference/text/lorem/
984 https://typst.app/docs/reference/text/lower/
985 https://typst.app/docs/reference/text/overline/
986 https://typst.app/docs/reference/text/raw/
987 https://typst.app/docs/reference/text/raw/#definitions-line
988 https://typst.app/docs/reference/text/smallcaps/
989 https://typst.app/docs/reference/text/smartquote/
990 https://typst.app/docs/reference/text/strike/
991 https://typst.app/docs/reference/text/sub/
992 https://typst.app/docs/reference/text/super/
993 https://typst.app/docs/reference/text/underline/
994 https://typst.app/docs/reference/text/upper/
995 https://typst.app/docs/reference/visualize/circle/
996 https://typst.app/docs/reference/visualize/color/
997 https://typst.app/docs/reference/visualize/color/#definitions-cmyk
998 https://typst.app/docs/reference/visualize/color/#definitions-components
999 https://typst.app/docs/reference/visualize/color/#definitions-darken
1000 https://typst.app/docs/reference/visualize/color/#definitions-desaturate
1001 https://typst.app/docs/reference/visualize/color/#definitions-hsl
1002 https://typst.app/docs/reference/visualize/color/#definitions-hsv
1003 https://typst.app/docs/reference/visualize/color/#definitions-lighten
1004 https://typst.app/docs/reference/visualize/color/#definitions-linear-rgb
1005 https://typst.app/docs/reference/visualize/color/#definitions-luma
1006 https://typst.app/docs/reference/visualize/color/#definitions-mix
1007 https://typst.app/docs/reference/visualize/color/#definitions-negate
1008 https://typst.app/docs/reference/visualize/color/#definitions-oklab
1009 https://typst.app/docs/reference/visualize/color/#definitions-oklch
1010 https://typst.app/docs/reference/visualize/color/#definitions-opacify
1011 https://typst.app/docs/reference/visualize/color/#definitions-rgb
1012 https://typst.app/docs/reference/visualize/color/#definitions-rotate
1013 https://typst.app/docs/reference/visualize/color/#definitions-saturate
1014 https://typst.app/docs/reference/visualize/color/#definitions-space
1015 https://typst.app/docs/reference/visualize/color/#definitions-spot
1016 https://typst.app/docs/reference/visualize/color/#definitions-to-hex
1017 https://typst.app/docs/reference/visualize/color/#definitions-transparentize
1018 https://typst.app/docs/reference/visualize/curve/
1019 https://typst.app/docs/reference/visualize/curve/#definitions-close
1020 https://typst.app/docs/reference/visualize/curve/#definitions-cubic
1021 https://typst.app/docs/reference/visualize/curve/#definitions-line
1022 https://typst.app/docs/reference/visualize/curve/#definitions-move
1023 https://typst.app/docs/reference/visualize/curve/#definitions-quad
1024 https://typst.app/docs/reference/visualize/ellipse/
1025 https://typst.app/docs/reference/visualize/gradient/
1026 https://typst.app/docs/reference/visualize/gradient/#definitions-angle
1027 https://typst.app/docs/reference/visualize/gradient/#definitions-center
1028 https://typst.app/docs/reference/visualize/gradient/#definitions-conic
1029 https://typst.app/docs/reference/visualize/gradient/#definitions-focal-center
1030 https://typst.app/docs/reference/visualize/gradient/#definitions-focal-radius
1031 https://typst.app/docs/reference/visualize/gradient/#definitions-kind
1032 https://typst.app/docs/reference/visualize/gradient/#definitions-linear
1033 https://typst.app/docs/reference/visualize/gradient/#definitions-radial
1034 https://typst.app/docs/reference/visualize/gradient/#definitions-radius
1035 https://typst.app/docs/reference/visualize/gradient/#definitions-relative
1036 https://typst.app/docs/reference/visualize/gradient/#definitions-repeat
1037 https://typst.app/docs/reference/visualize/gradient/#definitions-sample
1038 https://typst.app/docs/reference/visualize/gradient/#definitions-samples
1039 https://typst.app/docs/reference/visualize/gradient/#definitions-sharp
1040 https://typst.app/docs/reference/visualize/gradient/#definitions-space
1041 https://typst.app/docs/reference/visualize/gradient/#definitions-stops
1042 https://typst.app/docs/reference/visualize/image/
1043 https://typst.app/docs/reference/visualize/line/
1044 https://typst.app/docs/reference/visualize/polygon/
1045 https://typst.app/docs/reference/visualize/polygon/#definitions-regular
1046 https://typst.app/docs/reference/visualize/rect/
1047 https://typst.app/docs/reference/visualize/spot/#definitions-tint
1048 https://typst.app/docs/reference/visualize/square/
1049 https://typst.app/docs/reference/visualize/stroke/
1050 https://typst.app/docs/reference/visualize/tiling/
1051 ");
1052 }
1053}