-
Notifications
You must be signed in to change notification settings - Fork 13
/docs/reference/layout/gridの翻訳
#242
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
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 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -19,51 +19,38 @@ use crate::layout::{ | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| use crate::model::{TableCell, TableFooter, TableHLine, TableHeader, TableVLine}; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| use crate::visualize::{Paint, Stroke}; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| /// Arranges content in a grid. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| /// グリッド状にコンテンツを配置。 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| /// | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| /// The grid element allows you to arrange content in a grid. You can define the | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| /// number of rows and columns, as well as the size of the gutters between them. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| /// There are multiple sizing modes for columns and rows that can be used to | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| /// create complex layouts. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| /// グリッド要素を用いるとコンテンツをグリッド状に配置することができます。 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| /// 行と列の数に加えて、それらの間隔を定義することができます。 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| /// 複雑なレイアウトが作成できるような、列と行の大きさに関するモードが複数あります。 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| /// | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| /// While the grid and table elements work very similarly, they are intended for | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| /// different use cases and carry different semantics. The grid element is | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| /// intended for presentational and layout purposes, while the | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| /// [`{table}`]($table) element is intended for, in broad terms, presenting | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| /// multiple related data points. In the future, Typst will annotate its output | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| /// such that screenreaders will announce content in `table` as tabular while a | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| /// grid's content will be announced no different than multiple content blocks | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| /// in the document flow. Set and show rules on one of these elements do not | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| /// affect the other. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| /// グリッド要素とテーブル要素はとてもよく似た挙動をする一方で、これらは異なるユースケースが想定されており、異なる意味論が提供されています。 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| /// グリッド要素はプレゼンテーションおよびレイアウトに使われることが想定されている一方で、[`{table}`]($table)要素は複数の関係データ点を表す広い用途が想定されています。 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| /// 将来的にTypst will annotate 出力 such that スクリーンリーダー will announce コンテンツ in `table` as tabular while a グリッドのコンテンツ will be announced no different than multiple コンテンツブロック in the 文書の流れ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| /// これらの要素に対するsetルールとshowルールは、互いに影響しません。 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| /// | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| /// A grid's sizing is determined by the track sizes specified in the arguments. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| /// Because each of the sizing parameters accepts the same values, we will | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| /// explain them just once, here. Each sizing argument accepts an array of | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| /// individual track sizes. A track size is either: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| /// グリッドの大きさは引数に指定されたトラックサイズによって決定されます。 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| /// 大きさを設定する各パラメーターは同じ値を受け入れるため、ここでまとめて説明します。 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| /// 各sizing引数は個々のトラックサイズの配列を受け入れます。 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| /// トラックサイズは以下のいずれかです。 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| /// | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| /// - `{auto}`: The track will be sized to fit its contents. It will be at most | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| /// as large as the remaining space. If there is more than one `{auto}` track | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| /// width, and together they claim more than the available space, the `{auto}` | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| /// tracks will fairly distribute the available space among themselves. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| /// - `{auto}`: トラックはコンテンツに合わせた大きさになります。 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| /// It will be at most as large as the remaining space. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| /// If there is more than one `{auto}` track width, and together they claim more than the available space, the `{auto}` tracks will fairly distribute the available space among themselves. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| /// | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| /// - A fixed or relative length (e.g. `{10pt}` or `{20% - 1cm}`): The track | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| /// will be exactly of this size. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| /// - A fixed or relative length (e.g. `{10pt}` or `{20% - 1cm}`): The track will be exactly of this size. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| /// | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| /// - A fractional length (e.g. `{1fr}`): Once all other tracks have been sized, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| /// the remaining space will be divided among the fractional tracks according | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| /// to their fractions. For example, if there are two fractional tracks, each | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| /// with a fraction of `{1fr}`, they will each take up half of the remaining | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| /// space. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| /// - A fractional length (e.g. `{1fr}`): Once all other tracks have been sized, the remaining space will be divided among the fractional tracks according to their fractions. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| /// For example, if there are two fractional tracks, each with a fraction of `{1fr}`, they will each take up half of the remaining space. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| /// It will be at most as large as the remaining space. | |
| /// If there is more than one `{auto}` track width, and together they claim more than the available space, the `{auto}` tracks will fairly distribute the available space among themselves. | |
| /// | |
| /// - A fixed or relative length (e.g. `{10pt}` or `{20% - 1cm}`): The track | |
| /// will be exactly of this size. | |
| /// - A fixed or relative length (e.g. `{10pt}` or `{20% - 1cm}`): The track will be exactly of this size. | |
| /// | |
| /// - A fractional length (e.g. `{1fr}`): Once all other tracks have been sized, | |
| /// the remaining space will be divided among the fractional tracks according | |
| /// to their fractions. For example, if there are two fractional tracks, each | |
| /// with a fraction of `{1fr}`, they will each take up half of the remaining | |
| /// space. | |
| /// - A fractional length (e.g. `{1fr}`): Once all other tracks have been sized, the remaining space will be divided among the fractional tracks according to their fractions. | |
| /// For example, if there are two fractional tracks, each with a fraction of `{1fr}`, they will each take up half of the remaining space. | |
| /// 残りのスペースの範囲内で最大の大きさになります。 | |
| /// 複数の`{auto}`トラック幅があり、それらが合計で利用可能なスペースを超える場合、`{auto}`トラックは利用可能なスペースを公平に分配します。 | |
| /// | |
| /// - 固定長または相対長(例: `{10pt}` や `{20% - 1cm}`): トラックは正確にこの大きさになります。 | |
| /// | |
| /// - 分数長(例: `{1fr}`): 他のすべてのトラックのサイズが決まった後、残りのスペースが分数トラックにその比率に従って分配されます。 | |
| /// 例えば、2つの分数トラックがあり、それぞれの比率が`{1fr}`の場合、残りのスペースの半分ずつを占めます。 |
Outdated
Copilot
AI
Sep 30, 2025
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.
These bullet points describing track sizing options remain in English while the document is being translated to Japanese. They should be translated for consistency.
| /// It will be at most as large as the remaining space. | |
| /// If there is more than one `{auto}` track width, and together they claim more than the available space, the `{auto}` tracks will fairly distribute the available space among themselves. | |
| /// | |
| /// - A fixed or relative length (e.g. `{10pt}` or `{20% - 1cm}`): The track | |
| /// will be exactly of this size. | |
| /// - A fixed or relative length (e.g. `{10pt}` or `{20% - 1cm}`): The track will be exactly of this size. | |
| /// | |
| /// - A fractional length (e.g. `{1fr}`): Once all other tracks have been sized, | |
| /// the remaining space will be divided among the fractional tracks according | |
| /// to their fractions. For example, if there are two fractional tracks, each | |
| /// with a fraction of `{1fr}`, they will each take up half of the remaining | |
| /// space. | |
| /// - A fractional length (e.g. `{1fr}`): Once all other tracks have been sized, the remaining space will be divided among the fractional tracks according to their fractions. | |
| /// For example, if there are two fractional tracks, each with a fraction of `{1fr}`, they will each take up half of the remaining space. | |
| /// | |
| /// To specify a single track, the array can be omitted in favor of a single | |
| /// value. To specify multiple `{auto}` tracks, enter the number of tracks | |
| /// instead of an array. For example, `columns:` `{3}` is equivalent to | |
| /// `columns:` `{(auto, auto, auto)}`. | |
| /// 単一のトラックを指定する場合は、配列を省略して単一の値を指定できます。 | |
| /// 複数の`{auto}`のトラックを指定する場合は、配列の代わりにトラックの数を入力して下さい。 | |
| /// 例えば、`columns:` `{3}`は`columns:` `{(auto, auto, auto)}`と同じ意味になります。 | |
| /// | |
| /// # Examples | |
| /// The example below demonstrates the different track sizing options. It also | |
| /// shows how you can use [`grid.cell`]($grid.cell) to make an individual cell | |
| /// span two grid tracks. | |
| /// # 例 | |
| /// The example below demonstrates the different track sizing options.以下の例は異なるトラックサイズオプションの実演です。 | |
| /// 残りのスペースがある場合でも、トラックはその範囲内で最大限に広がります。 | |
| /// 複数の`{auto}`トラック幅があり、それらが合計で利用可能なスペースを超える場合、`{auto}`トラックは利用可能なスペースを公平に分配します。 | |
| /// | |
| /// - 固定長または相対長(例: `{10pt}` や `{20% - 1cm}`): トラックは正確にこのサイズになります。 | |
| /// | |
| /// - 割合長(例: `{1fr}`): 他のすべてのトラックのサイズが決まった後、残りのスペースが割合に応じて分配されます。 | |
| /// 例えば、2つの割合トラックがあり、それぞれの割合が`{1fr}`の場合、残りのスペースはそれぞれ半分ずつ割り当てられます。 | |
| /// | |
| /// 単一のトラックを指定する場合は、配列を省略して単一の値を指定できます。 | |
| /// 複数の`{auto}`のトラックを指定する場合は、配列の代わりにトラックの数を入力して下さい。 | |
| /// 例えば、`columns:` `{3}`は`columns:` `{(auto, auto, auto)}`と同じ意味になります。 | |
| /// | |
| /// # 例 | |
| /// 以下の例は異なるトラックサイズオプションの実演です。 |
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.
This line contains a mix of Japanese and English that makes it difficult to understand. The sentence should be either fully translated to Japanese or kept in English.