-
Notifications
You must be signed in to change notification settings - Fork 13
foundations/contentの翻訳 #290
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 3 commits
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 | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
|
@@ -24,49 +24,31 @@ use crate::layout::{AlignElem, Alignment, Axes, Length, MoveElem, PadElem, Rel, | |||||||||||
use crate::model::{Destination, EmphElem, LinkElem, StrongElem}; | ||||||||||||
use crate::text::UnderlineElem; | ||||||||||||
|
||||||||||||
/// A piece of document content. | ||||||||||||
/// ドキュメントコンテンツの要素 | ||||||||||||
/// | ||||||||||||
/// This type is at the heart of Typst. All markup you write and most | ||||||||||||
/// [functions]($function) you call produce content values. You can create a | ||||||||||||
/// content value by enclosing markup in square brackets. This is also how you | ||||||||||||
/// pass content to functions. | ||||||||||||
/// この型は、Typstの中心となるものです。Typstのすべてのマークアップやほとんどの[関数]($function)はコンテンツを生成します。コンテンツ値は角括弧でマークアップを囲むことで作成できます。これは、コンテンツを関数に渡す際にも使われる方法です。 | ||||||||||||
/// | ||||||||||||
/// # Example | ||||||||||||
/// # 例 | ||||||||||||
/// ```example | ||||||||||||
/// Type of *Hello!* is | ||||||||||||
/// #type([*Hello!*]) | ||||||||||||
/// ``` | ||||||||||||
/// | ||||||||||||
/// Content can be added with the `+` operator, | ||||||||||||
/// [joined together]($scripting/#blocks) and multiplied with integers. Wherever | ||||||||||||
/// content is expected, you can also pass a [string]($str) or `{none}`. | ||||||||||||
/// コンテンツは`+`演算子で追加したり、[結合]($scripting/#blocks)したり、整数と乗算したりすることができます。コンテンツが期待される場所であれば、[文字列]($str)や`{none}`を渡すことも可能です。 | ||||||||||||
/// | ||||||||||||
/// # 表現 | ||||||||||||
/// コンテンツはフィールドを持つ要素で構成されます。_要素関数_で要素を構築する際は、フィールドを引数として提供します。コンテンツ値がある場合は、[フィールドアクセス用シンタックス]($scripting/#field-access)でそのフィールドにアクセスできます。 | ||||||||||||
|
/// コンテンツはフィールドを持つ要素で構成されます。_要素関数_で要素を構築する際は、フィールドを引数として提供します。コンテンツ値がある場合は、[フィールドアクセス用シンタックス]($scripting/#field-access)でそのフィールドにアクセスできます。 | |
/// コンテンツはフィールドを持つ要素で構成されます。_要素関数_で要素を構築する際は、フィールドを引数として提供します。コンテンツ値がある場合は、[フィールドアクセス構文]($scripting/#field-access)でそのフィールドにアクセスできます。 |
Outdated
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.
/// オプションのフィールドは、要素関数に明示的に渡された場合にのみフィールドアクセス用シンタックスで利用でき、setルールから適用された場合は利用できません。 | |
/// オプションのフィールドは、要素関数に明示的に渡された場合にのみフィールドアクセス構文で利用でき、setルールから適用された場合は利用できません。 |
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.
修正提案しづらいので文分割させてもらいました。
/// コンテンツの要素関数です。この関数は、当該コンテンツに含まれる要素を生成するために使用できます。この関数は、その要素に対するsetルールやshowルール内で使用することもできます。特定の種類の要素を持っているかを確認するために、グローバル関数と比較することも可能です。 | |
/// コンテンツの要素関数。 | |
/// この関数を用いると、当該コンテンツに含まれる要素を生成できます。 | |
/// この関数は、その要素に対するsetルールやshowルール内でも使用できます。 | |
/// グローバル関数と比較することで、特定の種類の要素を持っているかを確認できます。 |
1行目はAPI定義の1行目のため体言止め。2・4行目は間違いではないのですが、こちらの方が自然かと思います。採用するかはお任せします。
3行目(4行目も)に関しては、「ことが(も)できます」という表現はスタイルガイドで避けるようになっていますので、これは修正をお願いします。
Outdated
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.
/// コンテンツの位置情報です。これは、[query]によって返されたコンテンツ、または[showルール]($reference/styling/#show-rules)によって提供されたコンテンツに対してのみ利用できます。それ以外のコンテンツでは、{none}になります。取得された位置情報は、[counter]($counter)、[state]、[query]($query)と一緒に使用できます。 | |
/// コンテンツの位置情報です。これは、[クエリ]($query)によって返されたコンテンツ、または[showルール]($reference/styling/#show-rules)によって提供されたコンテンツに対してのみ利用できます。それ以外のコンテンツでは、`{none}`になります。取得された位置情報は、[カウンター]($counter)、[状態]($state)、[クエリ]($query)と一緒に使用できます。 |
Uh oh!
There was an error while loading. Please reload this page.
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.