Skip to content

Commit e679f8f

Browse files
committed
/docs/reference/math/lrの翻訳
1 parent c43a3fa commit e679f8f

File tree

3 files changed

+40
-44
lines changed

3 files changed

+40
-44
lines changed

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

Lines changed: 21 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -2,18 +2,17 @@ use crate::foundations::{elem, func, Content, NativeElement, SymbolElem};
22
use crate::layout::{Length, Rel};
33
use crate::math::Mathy;
44

5-
/// Scales delimiters.
5+
/// 区切り文字の拡大縮小。
66
///
7-
/// While matched delimiters scale by default, this can be used to scale
8-
/// unmatched delimiters and to control the delimiter scaling more precisely.
7+
/// 閉じている区切り文字はデフォルトで拡大縮小しますが、これは閉じていない区切り文字を拡大縮小させたり、区切り文字の拡大縮小をより正確に制御するのに便利です。
98
#[elem(title = "Left/Right", Mathy)]
109
pub struct LrElem {
11-
/// The size of the brackets, relative to the height of the wrapped content.
10+
/// ラップしたコンテンツの高さを基準とした括弧の大きさ。
1211
#[resolve]
1312
#[default(Rel::one())]
1413
pub size: Rel<Length>,
1514

16-
/// The delimited content, including the delimiters.
15+
/// 区切り文字を含めた、区切られるコンテンツ。
1716
#[required]
1817
#[parse(
1918
let mut arguments = args.all::<Content>()?.into_iter();
@@ -24,93 +23,93 @@ pub struct LrElem {
2423
pub body: Content,
2524
}
2625

27-
/// Scales delimiters vertically to the nearest surrounding `{lr()}` group.
26+
/// 最も近くで囲んでいる`{lr()}`グループに対して、垂直方向に区切り文字を拡大縮小します。
2827
///
2928
/// ```example
3029
/// $ { x mid(|) sum_(i=1)^n w_i|f_i (x)| < 1 } $
3130
/// ```
3231
#[elem(Mathy)]
3332
pub struct MidElem {
34-
/// The content to be scaled.
33+
/// 拡大縮小させるコンテンツ。
3534
#[required]
3635
pub body: Content,
3736
}
3837

39-
/// Floors an expression.
38+
/// 式に床関数を作用させます。
4039
///
4140
/// ```example
4241
/// $ floor(x/2) $
4342
/// ```
4443
#[func]
4544
pub fn floor(
46-
/// The size of the brackets, relative to the height of the wrapped content.
45+
/// ラップしたコンテンツの高さを基準とした括弧の大きさ。
4746
#[named]
4847
size: Option<Rel<Length>>,
49-
/// The expression to floor.
48+
/// 床関数を作用させる式。
5049
body: Content,
5150
) -> Content {
5251
delimited(body, '⌊', '⌋', size)
5352
}
5453

55-
/// Ceils an expression.
54+
/// 式に天井関数を作用させます。
5655
///
5756
/// ```example
5857
/// $ ceil(x/2) $
5958
/// ```
6059
#[func]
6160
pub fn ceil(
62-
/// The size of the brackets, relative to the height of the wrapped content.
61+
/// ラップしたコンテンツの高さを基準とした括弧の大きさ。
6362
#[named]
6463
size: Option<Rel<Length>>,
65-
/// The expression to ceil.
64+
/// 天井関数を作用させる式。
6665
body: Content,
6766
) -> Content {
6867
delimited(body, '⌈', '⌉', size)
6968
}
7069

71-
/// Rounds an expression.
70+
/// 式を丸めます。
7271
///
7372
/// ```example
7473
/// $ round(x/2) $
7574
/// ```
7675
#[func]
7776
pub fn round(
78-
/// The size of the brackets, relative to the height of the wrapped content.
77+
/// ラップしたコンテンツの高さを基準とした括弧の大きさ。
7978
#[named]
8079
size: Option<Rel<Length>>,
81-
/// The expression to round.
80+
/// 丸める式。
8281
body: Content,
8382
) -> Content {
8483
delimited(body, '⌊', '⌉', size)
8584
}
8685

87-
/// Takes the absolute value of an expression.
86+
/// 式の絶対値を取ります。
8887
///
8988
/// ```example
9089
/// $ abs(x/2) $
9190
/// ```
9291
#[func]
9392
pub fn abs(
94-
/// The size of the brackets, relative to the height of the wrapped content.
93+
/// ラップしたコンテンツの高さを基準とした括弧の大きさ。
9594
#[named]
9695
size: Option<Rel<Length>>,
97-
/// The expression to take the absolute value of.
96+
/// 絶対値を取る式。
9897
body: Content,
9998
) -> Content {
10099
delimited(body, '|', '|', size)
101100
}
102101

103-
/// Takes the norm of an expression.
102+
/// 式のノルムを取ります。
104103
///
105104
/// ```example
106105
/// $ norm(x/2) $
107106
/// ```
108107
#[func]
109108
pub fn norm(
110-
/// The size of the brackets, relative to the height of the wrapped content.
109+
/// ラップしたコンテンツの高さを基準とした括弧の大きさ。
111110
#[named]
112111
size: Option<Rel<Length>>,
113-
/// The expression to take the norm of.
112+
/// ノルムを取る式。
114113
body: Content,
115114
) -> Content {
116115
delimited(body, '‖', '‖', size)

docs/reference/groups.yml

Lines changed: 18 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -39,18 +39,19 @@
3939
title: Under/Over
4040
category: math
4141
path: ["math"]
42-
filter: [
43-
"underline",
44-
"overline",
45-
"underbrace",
46-
"overbrace",
47-
"underbracket",
48-
"overbracket",
49-
"underparen",
50-
"overparen",
51-
"undershell",
52-
"overshell",
53-
]
42+
filter:
43+
[
44+
"underline",
45+
"overline",
46+
"underbrace",
47+
"overbrace",
48+
"underbracket",
49+
"overbracket",
50+
"underparen",
51+
"overparen",
52+
"undershell",
53+
"overshell",
54+
]
5455
details: |
5556
Delimiters above or below parts of an equation.
5657
@@ -103,16 +104,12 @@
103104
path: ["math"]
104105
filter: ["lr", "mid", "abs", "norm", "floor", "ceil", "round"]
105106
details: |
106-
Delimiter matching.
107+
区切り文字の対応
107108
108-
The `lr` function allows you to match two delimiters and scale them with the
109-
content they contain. While this also happens automatically for delimiters
110-
that match syntactically, `lr` allows you to match two arbitrary delimiters
111-
and control their size exactly. Apart from the `lr` function, Typst provides
112-
a few more functions that create delimiter pairings for absolute, ceiled,
113-
and floored values as well as norms.
114-
115-
# Example
109+
`lr`関数を用いると、2つの区切り文字を対応させ、内部のコンテンツに合わせた大きさに拡大縮小できます。
110+
これは構文的に対応が取れる区切り文字においては自動的に行われますが、`lr`を用いることで2つの任意の区切り文字を対応させ、その大きさを正確に制御することができます。
111+
`lr`関数以外にも、Typstは、絶対値、切り捨て値、切り上げ値、ノルムを表す区切り文字ペアを生成する関数をさらにいくつか提供しています。
112+
# 例
116113
```example
117114
$ [a, b/2] $
118115
$ lr(]sum_(x=1)^n], size: #50%) x $

website/translation-status.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@
8686
"/docs/reference/math/class/": "untranslated",
8787
"/docs/reference/math/equation/": "translated",
8888
"/docs/reference/math/frac/": "translated",
89-
"/docs/reference/math/lr/": "untranslated",
89+
"/docs/reference/math/lr/": "translated",
9090
"/docs/reference/math/mat/": "untranslated",
9191
"/docs/reference/math/primes/": "untranslated",
9292
"/docs/reference/math/roots/": "translated",

0 commit comments

Comments
 (0)