Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 8 additions & 8 deletions crates/typst-library/src/layout/rel.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,23 +8,23 @@ use typst_utils::Numeric;
use crate::foundations::{cast, ty, Fold, Repr, Resolve, StyleChain};
use crate::layout::{Abs, Em, Length, Ratio};

/// A length in relation to some known length.
/// 既知の長さに対する相対的な長さ。
///
/// This type is a combination of a [length] with a [ratio]. It results from
/// addition and subtraction of a length and a ratio. Wherever a relative length
/// is expected, you can also use a bare length or ratio.
/// この型は[length][ratio]の組み合わせです。
/// これは長さと百分率の加減算の結果になります。
/// 相対長さが想定されているあらゆる箇所で長さまたは百分率を単体でも指定可能です。
///
/// # Example
/// #
/// ```example
/// #rect(width: 100% - 50pt)
///
/// #(100% - 50pt).length \
/// #(100% - 50pt).ratio
/// ```
///
/// A relative length has the following fields:
/// - `length`: Its length component.
/// - `ratio`: Its ratio component.
/// 相対長さは以下のフィールドを持ちます。
/// - `length`: 長さ成分。
/// - `ratio`: 百分率成分。
#[ty(cast, name = "relative", title = "Relative Length")]
#[derive(Default, Copy, Clone, Eq, PartialEq, Hash)]
pub struct Rel<T: Numeric = Length> {
Expand Down
2 changes: 1 addition & 1 deletion website/translation-status.json
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@
"/docs/reference/layout/pagebreak/": "untranslated",
"/docs/reference/layout/place/": "translated",
"/docs/reference/layout/ratio/": "translated",
"/docs/reference/layout/relative/": "untranslated",
"/docs/reference/layout/relative/": "translated",
"/docs/reference/layout/repeat/": "translated",
"/docs/reference/layout/rotate/": "untranslated",
"/docs/reference/layout/scale/": "untranslated",
Expand Down