@@ -7,18 +7,17 @@ use crate::layout::{Abs, Corners, Length, Rel, Sides};
77use  crate :: text:: { BottomEdge ,  BottomEdgeMetric ,  TextElem ,  TopEdge ,  TopEdgeMetric } ; 
88use  crate :: visualize:: { Color ,  FixedStroke ,  Paint ,  Stroke } ; 
99
10- /// Underlines text.  
10+ /// テキスト下部に線を追加。  
1111/// 
12- /// # Example  
12+ /// # 例  
1313/// ```example 
1414/// This is #underline[important]. 
1515/// ``` 
1616#[ elem( Show ) ]  
1717pub  struct  UnderlineElem  { 
18-     /// How to  [stroke] the line.  
18+     /// 線の [stroke]をどうするか。  
1919     /// 
20-      /// If set to `{auto}`, takes on the text's color and a thickness defined in 
21-      /// the current font. 
20+      /// `{auto}`に設定された場合、現在のテキストフォントで使用されているテキストの太さと色が使用されます。 
2221     /// 
2322     /// ```example 
2423     /// Take #underline( 
@@ -31,8 +30,8 @@ pub struct UnderlineElem {
3130    #[ fold]  
3231    pub  stroke :  Smart < Stroke > , 
3332
34-     /// The position of the line relative to the baseline, read from the font  
35-      /// tables if  `{auto}`.  
33+     /// ベースラインを基準とする線の位置。  
34+      /// `{auto}`の場合、フォントテーブルから読まれます。  
3635     /// 
3736     /// ```example 
3837     /// #underline(offset: 5pt)[ 
@@ -42,8 +41,7 @@ pub struct UnderlineElem {
4241     #[ resolve]  
4342    pub  offset :  Smart < Length > , 
4443
45-     /// The amount by which to extend the line beyond (or within if negative) 
46-      /// the content. 
44+     /// コンテンツの外側に(負の値のときは内側に)線を左右に拡張する量。 
4745     /// 
4846     /// ```example 
4947     /// #align(center, 
@@ -53,8 +51,7 @@ pub struct UnderlineElem {
5351     #[ resolve]  
5452    pub  extent :  Length , 
5553
56-     /// Whether the line skips sections in which it would collide with the 
57-      /// glyphs. 
54+     /// 字形と衝突する線の部分を省略するかどうか。 
5855     /// 
5956     /// ```example 
6057     /// This #underline(evade: true)[is great]. 
@@ -63,7 +60,7 @@ pub struct UnderlineElem {
6360     #[ default( true ) ]  
6461    pub  evade :  bool , 
6562
66-     /// Whether the line is placed behind the content it underlines.  
63+     /// 線をコンテンツの背後に置くかどうか。  
6764     /// 
6865     /// ```example 
6966     /// #set underline(stroke: (thickness: 1em, paint: maroon, cap: "round")) 
@@ -73,7 +70,7 @@ pub struct UnderlineElem {
7370     #[ default( false ) ]  
7471    pub  background :  bool , 
7572
76-     /// The content to underline.  
73+     /// 下部に線を置くコンテンツ。  
7774     #[ required]  
7875    pub  body :  Content , 
7976} 
@@ -93,18 +90,17 @@ impl Show for Packed<UnderlineElem> {
9390    } 
9491} 
9592
96- /// Adds a line over text.  
93+ /// テキスト上部に線を追加。  
9794/// 
98- /// # Example  
95+ /// # 例  
9996/// ```example 
10097/// #overline[A line over text.] 
10198/// ``` 
10299#[ elem( Show ) ]  
103100pub  struct  OverlineElem  { 
104-     /// How to  [stroke] the line.  
101+     /// 線の [stroke]をどうするか。  
105102     /// 
106-      /// If set to `{auto}`, takes on the text's color and a thickness defined in 
107-      /// the current font. 
103+      /// `{auto}`に設定された場合、現在のテキストフォントで使用されているテキストの太さと色が使用されます。 
108104     /// 
109105     /// ```example 
110106     /// #set text(fill: olive) 
@@ -118,8 +114,8 @@ pub struct OverlineElem {
118114    #[ fold]  
119115    pub  stroke :  Smart < Stroke > , 
120116
121-     /// The position of the line relative to the baseline. Read from the font  
122-      /// tables if  `{auto}`.  
117+     /// ベースラインを基準とする線の位置。  
118+      /// `{auto}`の場合、フォントテーブルから読まれます。  
123119     /// 
124120     /// ```example 
125121     /// #overline(offset: -1.2em)[ 
@@ -129,8 +125,7 @@ pub struct OverlineElem {
129125     #[ resolve]  
130126    pub  offset :  Smart < Length > , 
131127
132-     /// The amount by which to extend the line beyond (or within if negative) 
133-      /// the content. 
128+     /// コンテンツの外側に(負の値のときは内側に)線を左右に拡張する量。 
134129     /// 
135130     /// ```example 
136131     /// #set overline(extent: 4pt) 
@@ -140,8 +135,7 @@ pub struct OverlineElem {
140135     #[ resolve]  
141136    pub  extent :  Length , 
142137
143-     /// Whether the line skips sections in which it would collide with the 
144-      /// glyphs. 
138+     /// 字形と衝突する線の部分を省略するかどうか。 
145139     /// 
146140     /// ```example 
147141     /// #overline( 
@@ -155,7 +149,7 @@ pub struct OverlineElem {
155149     #[ default( true ) ]  
156150    pub  evade :  bool , 
157151
158-     /// Whether the line is placed behind the content it overlines.  
152+     /// 線をコンテンツの背後に置くかどうか。  
159153     /// 
160154     /// ```example 
161155     /// #set overline(stroke: (thickness: 1em, paint: maroon, cap: "round")) 
@@ -165,7 +159,7 @@ pub struct OverlineElem {
165159     #[ default( false ) ]  
166160    pub  background :  bool , 
167161
168-     /// The content to add a line over.  
162+     /// 上部に線を置くコンテンツ。  
169163     #[ required]  
170164    pub  body :  Content , 
171165} 
@@ -185,21 +179,19 @@ impl Show for Packed<OverlineElem> {
185179    } 
186180} 
187181
188- /// Strikes through text.  
182+ /// テキストの打ち消し。  
189183/// 
190- /// # Example  
184+ /// # 例  
191185/// ```example 
192186/// This is #strike[not] relevant. 
193187/// ``` 
194188#[ elem( title = "Strikethrough" ,  Show ) ]  
195189pub  struct  StrikeElem  { 
196-     /// How to  [stroke] the line.  
190+     /// 線の [stroke]をどうするか。  
197191     /// 
198-      /// If set to `{auto}`, takes on the text's color and a thickness defined in 
199-      /// the current font. 
192+      /// `{auto}`に設定された場合、現在のテキストフォントで使用されているテキストの太さと色が使用されます。 
200193     /// 
201-      /// _Note:_ Please don't use this for real redaction as you can still copy 
202-      /// paste the text. 
194+      /// _注意:_ テキストのコピー・ペーストは依然として可能なため、実際の黒塗りには使用しないでください。 
203195     /// 
204196     /// ```example 
205197     /// This is #strike(stroke: 1.5pt + red)[very stricken through]. \ 
@@ -209,10 +201,10 @@ pub struct StrikeElem {
209201    #[ fold]  
210202    pub  stroke :  Smart < Stroke > , 
211203
212-     /// The position of the line relative to the baseline. Read from the font  
213-      /// tables if  `{auto}`.  
204+     /// ベースラインを基準とする線の位置。  
205+      /// `{auto}`の場合、フォントテーブルから読まれます。  
214206     /// 
215-      /// This is useful if you are unhappy with the offset your font provides.  
207+      /// これはフォントが提供するオフセットに不満がある場合に便利です。  
216208     /// 
217209     /// ```example 
218210     /// #set text(font: "Inria Serif") 
@@ -222,8 +214,7 @@ pub struct StrikeElem {
222214     #[ resolve]  
223215    pub  offset :  Smart < Length > , 
224216
225-     /// The amount by which to extend the line beyond (or within if negative) 
226-      /// the content. 
217+     /// コンテンツの外側に(負の値のときは内側に)線を左右に拡張する量。 
227218     /// 
228219     /// ```example 
229220     /// This #strike(extent: -2pt)[skips] parts of the word. 
@@ -232,7 +223,7 @@ pub struct StrikeElem {
232223     #[ resolve]  
233224    pub  extent :  Length , 
234225
235-     /// Whether the line is placed behind the content.  
226+     /// 線をコンテンツの背後に置くかどうか。  
236227     /// 
237228     /// ```example 
238229     /// #set strike(stroke: red) 
@@ -242,7 +233,7 @@ pub struct StrikeElem {
242233     #[ default( false ) ]  
243234    pub  background :  bool , 
244235
245-     /// The content to strike through.  
236+     /// 打ち消すコンテンツ。  
246237     #[ required]  
247238    pub  body :  Content , 
248239} 
0 commit comments