mirror of
https://github.com/typst/typst
synced 2025-08-11 13:47:55 +08:00
docs: replaced 2 blocks with a table
This commit is contained in:
parent
5b0b866099
commit
f81e85fb95
@ -34,29 +34,15 @@ use crate::foundations::{repr, ty, Repr};
|
||||
/// multiply ratio by ratio, [length], [relative length]($relative), [angle],
|
||||
/// [int], [float], and [fraction].
|
||||
///
|
||||
/// ```example
|
||||
/// #ratio: #(27% * 10%) \
|
||||
/// #length: #(27% * 100pt) \
|
||||
/// #relative: #(27% * (10% + 100pt)) \
|
||||
/// #angle: #(27% * 100deg) \
|
||||
/// #int: #(27% * 2) \
|
||||
/// #float: #(27% * 0.37037) \ // Some rounding is happening.
|
||||
/// #fraction: #(27% * 3fr)
|
||||
///
|
||||
/// #table(
|
||||
/// columns: 2,
|
||||
/// align: (right, left),
|
||||
/// inset: (x: 2pt),
|
||||
/// table.vline(x: 1, stroke: none),
|
||||
/// [#ratio:], [#(27% * 10%)],
|
||||
/// [#length:], [#(27% * 100pt)],
|
||||
/// [#relative:], [#(27% * (10% + 100pt))],
|
||||
/// [#angle:], [#(27% * 100deg)],
|
||||
/// [#int:], [#(27% * 2)],
|
||||
/// [#float:], [#(27% * 0.37037)], // Some rounding is happening.
|
||||
/// [#fraction:], [#(27% * 3fr)],
|
||||
/// )
|
||||
/// ```
|
||||
/// | Multiply by | Example |
|
||||
/// |-----------------|--------------------------------------------------|
|
||||
/// | `{ratio}` | `{27% * 10%}` |
|
||||
/// | `{length}` | `{27% * 100pt}` |
|
||||
/// | `{relative}` | `{27% * (10% + 100pt)}` |
|
||||
/// | `{angle}` | `{27% * 100deg}` |
|
||||
/// | `{int}` | `{27% * 2}` |
|
||||
/// | `{float}` | `{27% * 0.37037 // Some rounding is happening.}` |
|
||||
/// | `{fraction}` | `{27% * 3fr}` |
|
||||
///
|
||||
/// # Example
|
||||
/// ```example
|
||||
|
Loading…
x
Reference in New Issue
Block a user