diff options
| author | Laurenz <laurmaedje@gmail.com> | 2024-05-17 11:39:29 +0200 |
|---|---|---|
| committer | Laurenz <laurmaedje@gmail.com> | 2024-05-17 15:34:20 +0200 |
| commit | 2ecd0b126f16941d2afbf0ea68681b3f1b94d3ac (patch) | |
| tree | 14bc5426011d1fdaa43968e76f3321e5b210a536 | |
| parent | 24ed6d5935f8dac8926a30a3f26259820588cf94 (diff) | |
Mention that raw and equation syntax works in both markup and code mode (#4164)
| -rw-r--r-- | crates/typst/src/text/raw.rs | 2 | ||||
| -rw-r--r-- | docs/reference/syntax.md | 10 |
2 files changed, 7 insertions, 5 deletions
diff --git a/crates/typst/src/text/raw.rs b/crates/typst/src/text/raw.rs index dc288a66..58e64ce5 100644 --- a/crates/typst/src/text/raw.rs +++ b/crates/typst/src/text/raw.rs @@ -59,6 +59,8 @@ type LineFn<'a> = &'a mut dyn FnMut(usize, Range<usize>, &mut Vec<Content>); /// # Syntax /// This function also has dedicated syntax. You can enclose text in 1 or 3+ /// backticks (`` ` ``) to make it raw. Two backticks produce empty raw text. +/// This works both in markup and code. +/// /// When you use three or more backticks, you can additionally specify a /// language tag for syntax highlighting directly after the opening backticks. /// Within raw blocks, everything (except for the language tag, if applicable) diff --git a/docs/reference/syntax.md b/docs/reference/syntax.md index 454dce16..9a7dc373 100644 --- a/docs/reference/syntax.md +++ b/docs/reference/syntax.md @@ -57,11 +57,11 @@ more about their syntax and usage. ## Math mode { #math } Math mode is a special markup mode that is used to typeset mathematical -formulas. It is entered by wrapping an equation in `[$]` characters. The -equation will be typeset into its own block if it starts and ends with at least -one space (e.g. `[$ x^2 $]`). Inline math can be produced by omitting the -whitespace (e.g. `[$x^2$]`). An overview over the syntax specific to math mode -follows: +formulas. It is entered by wrapping an equation in `[$]` characters. This works +both in markup and code. The equation will be typeset into its own block if it +starts and ends with at least one space (e.g. `[$ x^2 $]`). Inline math can be +produced by omitting the whitespace (e.g. `[$x^2$]`). An overview over the +syntax specific to math mode follows: | Name | Example | See | | ---------------------- | ------------------------ | ------------------------ | |
