Skip to content

Commit 18e39ac

Browse files
ultimatileCopilotkimushun1101
authored
/docs/reference/math/matの翻訳 (#236)
Co-authored-by: Copilot <[email protected]> Co-authored-by: Shunsuke KIMURA <[email protected]>
1 parent cf45798 commit 18e39ac

File tree

2 files changed

+32
-40
lines changed

2 files changed

+32
-40
lines changed

crates/typst-library/src/math/matrix.rs

Lines changed: 31 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -65,19 +65,15 @@ pub struct VecElem {
6565
pub children: Vec<Content>,
6666
}
6767

68-
/// A matrix.
68+
/// 行列。
6969
///
70-
/// The elements of a row should be separated by commas, while the rows
71-
/// themselves should be separated by semicolons. The semicolon syntax merges
72-
/// preceding arguments separated by commas into an array. You can also use this
73-
/// special syntax of math function calls to define custom functions that take
74-
/// 2D data.
70+
/// 行内の要素はカンマで区切り、行自身はセミコロンで区切らなければなりません。
71+
/// セミコロン構文は、直前にあるカンマ区切りの引数を配列にマージします。
72+
/// 数式関数呼び出しに関するこの特殊な構文は、2次元データを引数に取るカスタム関数の定義にも使用できます。
7573
///
76-
/// Content in cells can be aligned with the [`align`]($math.mat.align)
77-
/// parameter, or content in cells that are in the same row can be aligned with
78-
/// the `&` symbol.
74+
/// セル内のコンテンツは[`align`]($math.mat.align)パラメーターを用いて配置できます。 また、同じ行にあるコンテンツは`&`記号を用いて配置できます。
7975
///
80-
/// # Example
76+
/// #
8177
/// ```example
8278
/// $ mat(
8379
/// 1, 2, ..., 10;
@@ -88,11 +84,10 @@ pub struct VecElem {
8884
/// ```
8985
#[elem(title = "Matrix", Mathy)]
9086
pub struct MatElem {
91-
/// The delimiter to use.
87+
/// 用いる区切り文字。
9288
///
93-
/// Can be a single character specifying the left delimiter, in which case
94-
/// the right delimiter is inferred. Otherwise, can be an array containing a
95-
/// left and a right delimiter.
89+
/// 単一の文字で左区切り文字を指定する場合、右区切り文字は自動的に推論されます。
90+
/// それ以外の場合は、左区切り文字と右区切り文字を含む配列を指定します。
9691
///
9792
/// ```example
9893
/// #set math.mat(delim: "[")
@@ -101,7 +96,7 @@ pub struct MatElem {
10196
#[default(DelimiterPair::PAREN)]
10297
pub delim: DelimiterPair,
10398

104-
/// The horizontal alignment that each cell should have.
99+
/// 各セルの水平方向の配置。
105100
///
106101
/// ```example
107102
/// #set math.mat(align: right)
@@ -111,26 +106,23 @@ pub struct MatElem {
111106
#[default(HAlignment::Center)]
112107
pub align: HAlignment,
113108

114-
/// Draws augmentation lines in a matrix.
109+
/// 行列内に補助線を描画。
115110
///
116-
/// - `{none}`: No lines are drawn.
117-
/// - A single number: A vertical augmentation line is drawn
118-
/// after the specified column number. Negative numbers start from the end.
119-
/// - A dictionary: With a dictionary, multiple augmentation lines can be
120-
/// drawn both horizontally and vertically. Additionally, the style of the
121-
/// lines can be set. The dictionary can contain the following keys:
122-
/// - `hline`: The offsets at which horizontal lines should be drawn.
123-
/// For example, an offset of `2` would result in a horizontal line
124-
/// being drawn after the second row of the matrix. Accepts either an
125-
/// integer for a single line, or an array of integers
126-
/// for multiple lines. Like for a single number, negative numbers start from the end.
127-
/// - `vline`: The offsets at which vertical lines should be drawn.
128-
/// For example, an offset of `2` would result in a vertical line being
129-
/// drawn after the second column of the matrix. Accepts either an
130-
/// integer for a single line, or an array of integers
131-
/// for multiple lines. Like for a single number, negative numbers start from the end.
132-
/// - `stroke`: How to [stroke]($stroke) the line. If set to `{auto}`,
133-
/// takes on a thickness of 0.05em and square line caps.
111+
/// - `{none}`: 線は描画されません。
112+
/// - 単一の数値: 指定された列番号の後に垂直方向の線を描画します。
113+
/// 負数の場合は最後の列から数え始めます。
114+
/// - 辞書: 水平方向および垂直方向の両方で複数の補助線を描画できます。
115+
/// 加えて線のスタイルを設定可能です。
116+
/// 辞書には以下のキーを含めることができます。
117+
/// - `hline`: 水平方向の線を描画するオフセット。
118+
/// 例えば、オフセットを`2`とすると行列の2行目の後に水平方向の線が描かれます。
119+
/// 単一の線を描く場合は整数を、複数の線の場合は整数の配列を受け取ります。
120+
/// 単一の数値を指定する場合と同様に、負数の場合は末尾から数え始めます。
121+
/// - `vline`: 垂直方向の線を描画するオフセット。
122+
/// 例えば、オフセットを`2`とすると行列の2列目の後に垂直方向の線が描かれます。
123+
/// 単一の線を描く場合は整数を、複数の線の場合は整数の配列を受け取ります。
124+
/// - `stroke`: 線の[ストローク]($stroke)。
125+
/// `{auto}`が指定された場合、0.05emの太さで四角い線端になります。
134126
///
135127
/// ```example
136128
/// $ mat(1, 0, 1; 0, 1, 2; augment: #2) $
@@ -145,9 +137,9 @@ pub struct MatElem {
145137
#[fold]
146138
pub augment: Option<Augment>,
147139

148-
/// The gap between rows and columns.
140+
/// 行間と列間の間隔。
149141
///
150-
/// This is a shorthand to set `row-gap` and `column-gap` to the same value.
142+
/// これは`row-gap``column-gap`を同じ値で設定する省略記法です。
151143
///
152144
/// ```example
153145
/// #set math.mat(gap: 1em)
@@ -156,7 +148,7 @@ pub struct MatElem {
156148
#[external]
157149
pub gap: Rel<Length>,
158150

159-
/// The gap between rows.
151+
/// 行間の間隔。
160152
///
161153
/// ```example
162154
/// #set math.mat(row-gap: 1em)
@@ -170,7 +162,7 @@ pub struct MatElem {
170162
#[default(DEFAULT_ROW_GAP.into())]
171163
pub row_gap: Rel<Length>,
172164

173-
/// The gap between columns.
165+
/// 列間の間隔。
174166
///
175167
/// ```example
176168
/// #set math.mat(column-gap: 1em)
@@ -181,7 +173,7 @@ pub struct MatElem {
181173
#[default(DEFAULT_COL_GAP.into())]
182174
pub column_gap: Rel<Length>,
183175

184-
/// An array of arrays with the rows of the matrix.
176+
/// 行列の各行を要素とする配列の配列。
185177
///
186178
/// ```example
187179
/// #let data = ((1, 2, 3), (4, 5, 6))

website/translation-status.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@
8787
"/docs/reference/math/equation/": "translated",
8888
"/docs/reference/math/frac/": "translated",
8989
"/docs/reference/math/lr/": "untranslated",
90-
"/docs/reference/math/mat/": "untranslated",
90+
"/docs/reference/math/mat/": "translated",
9191
"/docs/reference/math/primes/": "untranslated",
9292
"/docs/reference/math/roots/": "translated",
9393
"/docs/reference/math/sizes/": "untranslated",

0 commit comments

Comments
 (0)