@@ -4,32 +4,27 @@ use crate::diag::HintedStrResult;
4
4
use crate :: foundations:: { func, Context } ;
5
5
use crate :: introspection:: Location ;
6
6
7
- /// Provides the current location in the document.
7
+ /// 文書中における現在位置を提供。
8
8
///
9
- /// You can think of `here` as a low-level building block that directly extracts
10
- /// the current location from the active [context]. Some other functions use it
11
- /// internally: For instance, `{counter.get()}` is equivalent to
12
- /// `{counter.at(here())}`.
9
+ /// `here`はアクティブな[コンテキスト]($context)から現在位置を直接取得する低レベルな構成要素と考えることができます。
10
+ /// いくつかの他の関数が内部で使用しています。
11
+ /// 例えば、`{counter.get()}`は`{counter.at(here())}`と等価です。
13
12
///
14
- /// Within show rules on [locatable]($location/#locatable) elements, `{here()}`
15
- /// will match the location of the shown element.
13
+ /// [ロケータブル]($location/#locatable)要素に対するshowルールにおいて、`{here()}`は表示する要素の位置にマッチします。
16
14
///
17
- /// If you want to display the current page number, refer to the documentation
18
- /// of the [`counter`] type. While `here` can be used to determine the physical
19
- /// page number, typically you want the logical page number that may, for
20
- /// instance, have been reset after a preface.
15
+ /// 現在のページ番号を表示したい場合は、[`counter`]型のドキュメントを参照してください。
16
+ /// `here`は物理的なページ番号を決定できますが、通常は、前書きの後にリセットされるような、論理的なページ番号が必要でしょう。
21
17
///
22
- /// # Examples
23
- /// Determining the current position in the document in combination with the
24
- /// [`position`]($location.position) method:
18
+ /// # 例
19
+ /// [`position`]($location.position)メソッドと組み合わせて文書中での現在位置を決定します。
25
20
/// ```example
26
21
/// #context [
27
22
/// I am located at
28
23
/// #here().position()
29
24
/// ]
30
25
/// ```
31
26
///
32
- /// Running a [query] for elements before the current position:
27
+ /// 現在位置より前にある要素に対して[クエリ]($query)を実行します。
33
28
/// ```example
34
29
/// = Introduction
35
30
/// = Background
@@ -42,7 +37,7 @@ use crate::introspection::Location;
42
37
///
43
38
/// = Conclusion
44
39
/// ```
45
- /// Refer to the [`selector`] type for more details on before/after selectors.
40
+ /// セレクターのbeforeおよびafterに関する詳細は [`selector`]型のドキュメントを参照してください。
46
41
#[ func( contextual) ]
47
42
pub fn here ( context : Tracked < Context > ) -> HintedStrResult < Location > {
48
43
context. location ( )
0 commit comments