Skip to content
Open
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
17 changes: 8 additions & 9 deletions crates/typst-library/src/math/frac.rs
Original file line number Diff line number Diff line change
Expand Up @@ -27,20 +27,20 @@ pub struct FracElem {
#[required]
pub denom: Content,

/// How the fraction should be laid out.
/// 分数のレイアウト方法。
///
/// ```example:"Styles"
/// ```example:"スタイル"
/// $ frac(x, y, style: "vertical") $
/// $ frac(x, y, style: "skewed") $
/// $ frac(x, y, style: "horizontal") $
/// ```
///
/// ```example:"Setting the default"
/// ```example:"デフォルトの設定"
/// #set math.frac(style: "skewed")
/// $ a / b $
/// ```
///
/// ```example:"Handling of grouping parentheses"
/// ```example:"グループ化括弧の扱い"
/// // Grouping parentheses are removed.
/// #set math.frac(style: "vertical")
/// $ (a + b) / b $
Expand All @@ -54,7 +54,7 @@ pub struct FracElem {
/// $ (a + b) / b $
/// ```
///
/// ```example:"Different styles in inline vs block equations"
/// ```example:"インライン数式とブロック数式でのスタイル"
/// // This changes the style for inline equations only.
/// #show math.equation.where(block: false): set math.frac(style: "horizontal")
///
Expand Down Expand Up @@ -82,13 +82,12 @@ pub struct FracElem {
/// Fraction style
#[derive(Debug, Default, Copy, Clone, Eq, PartialEq, Hash, Cast)]
pub enum FracStyle {
/// Stacked numerator and denominator with a bar.
/// 分子と分母を上下に配置し、横棒で区切ります。
#[default]
Vertical,
/// Numerator and denominator separated by a slash.
/// 分子と分母をスラッシュで区切ります。
Skewed,
/// Numerator and denominator placed inline and parentheses are not
/// absorbed.
/// 分子と分母をインラインで配置し、丸括弧をそのまま保持します。
Horizontal,
}

Expand Down
2 changes: 1 addition & 1 deletion website/translation-status.json
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@
"/docs/reference/math/cases/": "translated",
"/docs/reference/math/class/": "translated",
"/docs/reference/math/equation/": "translated",
"/docs/reference/math/frac/": "partially_translated",
"/docs/reference/math/frac/": "translated",
"/docs/reference/math/lr/": "translated",
"/docs/reference/math/mat/": "translated",
"/docs/reference/math/primes/": "translated",
Expand Down
Loading