-
Notifications
You must be signed in to change notification settings - Fork 13
/docs/reference/introspection/location
の翻訳
#320
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from 1 commit
d9999d6
846224d
26c73cc
25b1bbe
dc5c701
86574bc
ce990e7
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
|
@@ -8,19 +8,17 @@ use crate::foundations::{func, scope, ty, Repr}; | |||||
use crate::layout::Position; | ||||||
use crate::model::Numbering; | ||||||
|
||||||
/// Identifies an element in the document. | ||||||
/// 文書中の要素の識別。 | ||||||
/// | ||||||
/// A location uniquely identifies an element in the document and lets you | ||||||
/// access its absolute position on the pages. You can retrieve the current | ||||||
/// location with the [`here`] function and the location of a queried or shown | ||||||
/// element with the [`location()`]($content.location) method on content. | ||||||
/// locationは文書中の要素を一意に識別し、ページ中での絶対位置へのアクセスを提供します。 | ||||||
/// [`here`]関数を用いて現在位置を取得可能です。 | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
/// また、検索した位置や表示された要素の位置はコンテンツの[`location()`]($content.location)メソッドを用いて取得可能です。 | ||||||
ultimatile marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||||||
/// | ||||||
/// # Locatable elements { #locatable } | ||||||
/// Currently, only a subset of element functions is locatable. Aside from | ||||||
/// headings and figures, this includes equations, references, quotes and all | ||||||
/// elements with an explicit label. As a result, you _can_ query for e.g. | ||||||
/// [`strong`] elements, but you will find only those that have an explicit | ||||||
/// label attached to them. This limitation will be resolved in the future. | ||||||
/// # ロケータブル要素 { #locatable } | ||||||
/// 現在、要素関数の一部のみがロケータブルです。 | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. ここは訳としては間違ってはいないのですが、説明になっていないので
Suggested change
で良いですかね? |
||||||
/// 見出しと図表の他に、数式、参照、引用、全ての明示的なラベルを持つ要素が該当します。 | ||||||
ultimatile marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||||||
/// したがって、例えば[`strong`]要素に対してクエリが実行 _可能_ ですが、見つかるのは明示的にラベルが付けられたもののみです。 | ||||||
/// この制限は将来的に解消される予定です。 | ||||||
ultimatile marked this conversation as resolved.
Show resolved
Hide resolved
|
||||||
#[ty(scope)] | ||||||
#[derive(Copy, Clone, Eq, PartialEq, Hash)] | ||||||
pub struct Location(u128); | ||||||
|
@@ -48,16 +46,13 @@ impl Location { | |||||
|
||||||
#[scope] | ||||||
impl Location { | ||||||
/// Returns the page number for this location. | ||||||
/// このlocationのページ番号を返します。 | ||||||
ultimatile marked this conversation as resolved.
Show resolved
Hide resolved
|
||||||
/// | ||||||
/// Note that this does not return the value of the [page counter]($counter) | ||||||
/// at this location, but the true page number (starting from one). | ||||||
/// このlocationの[ページカウンター]($counter)の値を返すわけではなく、(1始まりの)実際のページ番号を返すことに注意してください。 | ||||||
ultimatile marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||||||
/// | ||||||
/// If you want to know the value of the page counter, use | ||||||
/// `{counter(page).at(loc)}` instead. | ||||||
/// ページカウンターの値が知りたい場合は代わりに`{counter(page).at(loc)}`を使用してください。 | ||||||
ultimatile marked this conversation as resolved.
Show resolved
Hide resolved
|
||||||
/// | ||||||
/// Can be used with [`here`] to retrieve the physical page position | ||||||
/// of the current context: | ||||||
/// [`here`]と組み合わせることで現在のコンテキストが配置される実際のページ番号が取得できます。 | ||||||
|
/// [`here`]と組み合わせることで現在のコンテキストが配置される実際のページ番号が取得できます。 | |
/// [`here`]と組み合わせることで現在位置のページ番号を取得できます。 |
Copilot uses AI. Check for mistakes.
ultimatile marked this conversation as resolved.
Show resolved
Hide resolved
ultimatile marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
ultimatile marked this conversation as resolved.
Show resolved
Hide resolved
ultimatile marked this conversation as resolved.
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/// その位置でのページの番号付けが`{none}`に設定されていた場合、`{none}`を返します。 | |
/// そのロケーションのページの番号付けが`{none}`に設定されていた場合、`{none}`を返します。 |
Uh oh!
There was an error while loading. Please reload this page.