From 71a9ee204293e31e1d03ee9da5d3550d0e3e3872 Mon Sep 17 00:00:00 2001 From: ultimatile Date: Sun, 27 Jul 2025 13:39:09 +0900 Subject: [PATCH 1/4] =?UTF-8?q?`/docs/reference/math/cancel`=E3=81=AE?= =?UTF-8?q?=E7=BF=BB=E8=A8=B3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- crates/typst-library/src/math/cancel.rs | 37 +++++++++++-------------- website/translation-status.json | 2 +- 2 files changed, 17 insertions(+), 22 deletions(-) diff --git a/crates/typst-library/src/math/cancel.rs b/crates/typst-library/src/math/cancel.rs index 17f4dcfb9f..fda8270d12 100644 --- a/crates/typst-library/src/math/cancel.rs +++ b/crates/typst-library/src/math/cancel.rs @@ -3,11 +3,11 @@ use crate::layout::{Abs, Angle, Length, Ratio, Rel}; use crate::math::Mathy; use crate::visualize::Stroke; -/// Displays a diagonal line over a part of an equation. +/// 数式の一部分上に対角線を表示。 /// -/// This is commonly used to show the elimination of a term. +/// 項の除去を示すのによく使われます。 /// -/// # Example +/// # 例 /// ```example /// >>> #set page(width: 140pt) /// Here, we can simplify: @@ -16,13 +16,12 @@ use crate::visualize::Stroke; /// ``` #[elem(Mathy)] pub struct CancelElem { - /// The content over which the line should be placed. + /// 線が配置されるべきコンテンツ。 #[required] pub body: Content, - /// The length of the line, relative to the length of the diagonal spanning - /// the whole element being "cancelled". A value of `{100%}` would then have - /// the line span precisely the element's diagonal. + /// 「キャンセル」したい要素全体をまたぐ対角線を基準とした相対的な線の長さ。 + /// `{100%}`という値は、要素の対角線と正確に一致する長さになります。 /// /// ```example /// >>> #set page(width: 140pt) @@ -33,9 +32,8 @@ pub struct CancelElem { #[default(Rel::new(Ratio::one(), Abs::pt(3.0).into()))] pub length: Rel, - /// Whether the cancel line should be inverted (flipped along the y-axis). - /// For the default angle setting, inverted means the cancel line - /// points to the top left instead of top right. + /// 打ち消し線を(y軸に関して)反転させるべきかどうか。 + /// デフォルト角度設定では、反転は、打ち消し線が右上を指す代わりに左上を指すことを意味します。 /// /// ```example /// >>> #set page(width: 140pt) @@ -45,8 +43,8 @@ pub struct CancelElem { #[default(false)] pub inverted: bool, - /// Whether two opposing cancel lines should be drawn, forming a cross over - /// the element. Overrides `inverted`. + /// 要素上で交差する、相対する2つの打ち消し線を描画するかどうか。 + /// これは`inverted`を上書きします。 /// /// ```example /// >>> #set page(width: 140pt) @@ -55,15 +53,12 @@ pub struct CancelElem { #[default(false)] pub cross: bool, - /// How much to rotate the cancel line. + /// 打ち消し線をどれくらい回転させるか。 /// - /// - If given an angle, the line is rotated by that angle clockwise with - /// respect to the y-axis. - /// - If `{auto}`, the line assumes the default angle; that is, along the - /// rising diagonal of the content box. - /// - If given a function `angle => angle`, the line is rotated, with - /// respect to the y-axis, by the angle returned by that function. The - /// function receives the default angle as its input. + /// - 角度が与えられた場合、y軸を角度の基準にして時計回りに与えられた角度だけ線が回転します。 + /// - `{auto}`の場合、デフォルトの角度を用いた線となります。すなわち、コンテンツのボックスの右上がりの対角線に沿うものになります。 + /// - `angle => angle`の形の関数が与えられた場合、その関数が返すy軸を角度の基準にした角度で線が回転します。 + /// 関数は入力としてデフォルトの角度を受け取ります。 /// /// ```example /// >>> #set page(width: 140pt) @@ -76,7 +71,7 @@ pub struct CancelElem { /// ``` pub angle: Smart, - /// How to [stroke]($stroke) the cancel line. + /// 打ち消し線の[ストローク]($stroke)をどうするか。 /// /// ```example /// >>> #set page(width: 140pt) diff --git a/website/translation-status.json b/website/translation-status.json index 5657719522..bf0ea3d57b 100644 --- a/website/translation-status.json +++ b/website/translation-status.json @@ -81,7 +81,7 @@ "/docs/reference/math/accent/": "translated", "/docs/reference/math/attach/": "untranslated", "/docs/reference/math/binom/": "untranslated", - "/docs/reference/math/cancel/": "untranslated", + "/docs/reference/math/cancel/": "translated", "/docs/reference/math/cases/": "translated", "/docs/reference/math/class/": "untranslated", "/docs/reference/math/equation/": "translated", From c2fba7b8494f0742d00ae2a56d6353d512138e68 Mon Sep 17 00:00:00 2001 From: ultimatile Date: Thu, 7 Aug 2025 13:50:46 +0900 Subject: [PATCH 2/4] Update crates/typst-library/src/math/cancel.rs --- crates/typst-library/src/math/cancel.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crates/typst-library/src/math/cancel.rs b/crates/typst-library/src/math/cancel.rs index fda8270d12..8896de19c7 100644 --- a/crates/typst-library/src/math/cancel.rs +++ b/crates/typst-library/src/math/cancel.rs @@ -55,7 +55,7 @@ pub struct CancelElem { /// 打ち消し線をどれくらい回転させるか。 /// - /// - 角度が与えられた場合、y軸を角度の基準にして時計回りに与えられた角度だけ線が回転します。 + /// - 角度が与えられた場合、y軸方向を0度として時計回りに与えられた角度だけ線が回転します。 /// - `{auto}`の場合、デフォルトの角度を用いた線となります。すなわち、コンテンツのボックスの右上がりの対角線に沿うものになります。 /// - `angle => angle`の形の関数が与えられた場合、その関数が返すy軸を角度の基準にした角度で線が回転します。 /// 関数は入力としてデフォルトの角度を受け取ります。 From 809727a9a65289839f36b8497a2775622590d09f Mon Sep 17 00:00:00 2001 From: ultimatile Date: Thu, 7 Aug 2025 13:59:22 +0900 Subject: [PATCH 3/4] Update crates/typst-library/src/math/cancel.rs Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --- crates/typst-library/src/math/cancel.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crates/typst-library/src/math/cancel.rs b/crates/typst-library/src/math/cancel.rs index 8896de19c7..ad46399d8a 100644 --- a/crates/typst-library/src/math/cancel.rs +++ b/crates/typst-library/src/math/cancel.rs @@ -33,7 +33,7 @@ pub struct CancelElem { pub length: Rel, /// 打ち消し線を(y軸に関して)反転させるべきかどうか。 - /// デフォルト角度設定では、反転は、打ち消し線が右上を指す代わりに左上を指すことを意味します。 + /// デフォルト角度設定では、反転により打ち消し線が右上ではなく左上を指すようになります。 /// /// ```example /// >>> #set page(width: 140pt) From ca9fae74860d791675ebd4a5ac91279bd3d8bcf4 Mon Sep 17 00:00:00 2001 From: ultimatile Date: Thu, 7 Aug 2025 14:23:55 +0900 Subject: [PATCH 4/4] Update crates/typst-library/src/math/cancel.rs --- crates/typst-library/src/math/cancel.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crates/typst-library/src/math/cancel.rs b/crates/typst-library/src/math/cancel.rs index ad46399d8a..ae01c0eb15 100644 --- a/crates/typst-library/src/math/cancel.rs +++ b/crates/typst-library/src/math/cancel.rs @@ -57,7 +57,7 @@ pub struct CancelElem { /// /// - 角度が与えられた場合、y軸方向を0度として時計回りに与えられた角度だけ線が回転します。 /// - `{auto}`の場合、デフォルトの角度を用いた線となります。すなわち、コンテンツのボックスの右上がりの対角線に沿うものになります。 - /// - `angle => angle`の形の関数が与えられた場合、その関数が返すy軸を角度の基準にした角度で線が回転します。 + /// - `angle => angle`の形の関数が与えられた場合、y軸方向を0度として、その関数が返す角度で線が回転します。 /// 関数は入力としてデフォルトの角度を受け取ります。 /// /// ```example