mirror of
https://github.com/typst/typst
synced 2025-05-14 17:15:28 +08:00
Mention that raw and equation syntax works in both markup and code mode (#4164)
This commit is contained in:
parent
00f7588755
commit
6a1a58a2d4
@ -59,6 +59,8 @@ type LineFn<'a> = &'a mut dyn FnMut(usize, Range<usize>, &mut Vec<Content>);
|
|||||||
/// # Syntax
|
/// # Syntax
|
||||||
/// This function also has dedicated syntax. You can enclose text in 1 or 3+
|
/// 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.
|
/// 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
|
/// When you use three or more backticks, you can additionally specify a
|
||||||
/// language tag for syntax highlighting directly after the opening backticks.
|
/// language tag for syntax highlighting directly after the opening backticks.
|
||||||
/// Within raw blocks, everything (except for the language tag, if applicable)
|
/// Within raw blocks, everything (except for the language tag, if applicable)
|
||||||
|
@ -57,11 +57,11 @@ more about their syntax and usage.
|
|||||||
|
|
||||||
## Math mode { #math }
|
## Math mode { #math }
|
||||||
Math mode is a special markup mode that is used to typeset mathematical
|
Math mode is a special markup mode that is used to typeset mathematical
|
||||||
formulas. It is entered by wrapping an equation in `[$]` characters. The
|
formulas. It is entered by wrapping an equation in `[$]` characters. This works
|
||||||
equation will be typeset into its own block if it starts and ends with at least
|
both in markup and code. The equation will be typeset into its own block if it
|
||||||
one space (e.g. `[$ x^2 $]`). Inline math can be produced by omitting the
|
starts and ends with at least one space (e.g. `[$ x^2 $]`). Inline math can be
|
||||||
whitespace (e.g. `[$x^2$]`). An overview over the syntax specific to math mode
|
produced by omitting the whitespace (e.g. `[$x^2$]`). An overview over the
|
||||||
follows:
|
syntax specific to math mode follows:
|
||||||
|
|
||||||
| Name | Example | See |
|
| Name | Example | See |
|
||||||
| ---------------------- | ------------------------ | ------------------------ |
|
| ---------------------- | ------------------------ | ------------------------ |
|
||||||
|
Loading…
x
Reference in New Issue
Block a user