Skip to content

Commit 9c7cb23

Browse files
docs/reference/model/heading/の翻訳 (#159)
Co-authored-by: Shunsuke KIMURA <[email protected]>
1 parent 003cb3b commit 9c7cb23

File tree

2 files changed

+52
-53
lines changed

2 files changed

+52
-53
lines changed

crates/typst-library/src/model/heading.rs

Lines changed: 51 additions & 52 deletions
Original file line numberDiff line numberDiff line change
@@ -17,23 +17,22 @@ use crate::layout::{Abs, Axes, BlockBody, BlockElem, Em, HElem, Length, Region,
1717
use crate::model::{Numbering, Outlinable, Refable, Supplement};
1818
use crate::text::{FontWeight, LocalName, SpaceElem, TextElem, TextSize};
1919

20-
/// A section heading.
20+
/// セクションの見出し。
2121
///
22-
/// With headings, you can structure your document into sections. Each heading
23-
/// has a _level,_ which starts at one and is unbounded upwards. This level
24-
/// indicates the logical role of the following content (section, subsection,
25-
/// etc.) A top-level heading indicates a top-level section of the document
26-
/// (not the document's title).
22+
/// 見出しを使うことで、文書をセクションとして構造化できます。
23+
/// 各見出しには1から始まる _レベル_ があり、上限はありません。
24+
/// このレベルは、以下に続く内容の論理的な役割(セクション、サブセクションなど)を示します。
25+
/// 最上位のレベルの見出しは、文書の最上位のレベルのセクションを示します(文書のタイトルではありません)。
2726
///
28-
/// Typst can automatically number your headings for you. To enable numbering,
29-
/// specify how you want your headings to be numbered with a
30-
/// [numbering pattern or function]($numbering).
27+
/// Typstでは、見出しに自動的に番号をつけることができます。
28+
/// 番号付けを有効にするには、
29+
/// 見出しにどのような[番号付けパターンまたは関数]($numbering)を用いて番号付けを行うかを指定してください。
3130
///
32-
/// Independently of the numbering, Typst can also automatically generate an
33-
/// [outline] of all headings for you. To exclude one or more headings from this
34-
/// outline, you can set the `outlined` parameter to `{false}`.
31+
/// 番号付けとは別に、Typstはすべての見出しの[目次]($outline)を自動的に生成することもできます。
32+
/// 1つ以上の見出しをこの目次から除外するには、
33+
/// `outlined`パラメーターを`{false}`に設定してください。
3534
///
36-
/// # Example
35+
/// #
3736
/// ```example
3837
/// #set heading(numbering: "1.a)")
3938
///
@@ -44,19 +43,19 @@ use crate::text::{FontWeight, LocalName, SpaceElem, TextElem, TextSize};
4443
/// To start, ...
4544
/// ```
4645
///
47-
/// # Syntax
48-
/// Headings have dedicated syntax: They can be created by starting a line with
49-
/// one or multiple equals signs, followed by a space. The number of equals
50-
/// signs determines the heading's logical nesting depth. The `{offset}` field
51-
/// can be set to configure the starting depth.
46+
/// # 構文
47+
/// 見出しには専用の構文があります。
48+
/// 行の先頭に等号を1つ以上入力し、その後にスペースを入力することで見出しを作成できます。
49+
/// 等号の数は、見出しの論理的なネストの深さを決定します。
50+
/// `{offset}`フィールドを設定すると、見出しの最初の深さを設定できます。
5251
#[elem(Locatable, Synthesize, Count, Show, ShowSet, LocalName, Refable, Outlinable)]
5352
pub struct HeadingElem {
54-
/// The absolute nesting depth of the heading, starting from one. If set
55-
/// to `{auto}`, it is computed from `{offset + depth}`.
53+
/// 1から始まる、見出しの絶対的なネストの深さ。
54+
/// `{auto}`に設定した場合は、`{offset + depth}`から計算されます。
5655
///
57-
/// This is primarily useful for usage in [show rules]($styling/#show-rules)
58-
/// (either with [`where`]($function.where) selectors or by accessing the
59-
/// level directly on a shown heading).
56+
/// これは主に[showルール]($styling/#show-rules)で利用する際に役立ちます
57+
/// [`where`]($function.where)セレクターを使う場合や
58+
/// 表示された見出しのレベルに直接アクセスする場合など)。
6059
///
6160
/// ```example
6261
/// #show heading.where(level: 2): set text(red)
@@ -70,18 +69,18 @@ pub struct HeadingElem {
7069
/// ```
7170
pub level: Smart<NonZeroUsize>,
7271

73-
/// The relative nesting depth of the heading, starting from one. This is
74-
/// combined with `{offset}` to compute the actual `{level}`.
72+
/// 1から始まる、見出しの相対的なネストの深さ。
73+
/// この値は`{offset}`と組み合わせて、実際の`{level}`を計算するのに用いられます。
7574
///
76-
/// This is set by the heading syntax, such that `[== Heading]` creates a
77-
/// heading with logical depth of 2, but actual level `{offset + 2}`. If you
78-
/// construct a heading manually, you should typically prefer this over
79-
/// setting the absolute level.
75+
/// これは見出し構文によって設定され、例えば`[== Heading]`は論理的な深さが2の見出しを作成しますが、
76+
/// 実際のレベルは`{offset + 2}`になります。
77+
/// 見出しを手動で作成する場合、
78+
/// 通常は絶対レベルを設定するよりもこちらを使用することをお勧めします。
8079
#[default(NonZeroUsize::ONE)]
8180
pub depth: NonZeroUsize,
8281

83-
/// The starting offset of each heading's `{level}`, used to turn its
84-
/// relative `{depth}` into its absolute `{level}`.
82+
/// 各見出しの`{level}`の開始オフセットであり、
83+
/// 相対的な`{depth}`を絶対的な`{level}`に変換するために使用されます。
8584
///
8685
/// ```example
8786
/// = Level 1
@@ -96,8 +95,8 @@ pub struct HeadingElem {
9695
#[default(0)]
9796
pub offset: usize,
9897

99-
/// How to number the heading. Accepts a
100-
/// [numbering pattern or function]($numbering).
98+
/// 見出しを番号付けする方法。
99+
/// [番号付けパターンまたは関数]($numbering)を指定できます。
101100
///
102101
/// ```example
103102
/// #set heading(numbering: "1.a.")
@@ -109,12 +108,12 @@ pub struct HeadingElem {
109108
#[borrowed]
110109
pub numbering: Option<Numbering>,
111110

112-
/// A supplement for the heading.
111+
/// 見出しに用いる補足語。
113112
///
114-
/// For references to headings, this is added before the referenced number.
113+
/// 見出しを参照する際、補足語が参照番号の前に追加されます。
115114
///
116-
/// If a function is specified, it is passed the referenced heading and
117-
/// should return content.
115+
/// 関数を指定した場合、参照された見出しが引数として渡され、
116+
/// その関数は表示されるコンテンツを返す必要があります。
118117
///
119118
/// ```example
120119
/// #set heading(numbering: "1.", supplement: [Chapter])
@@ -127,11 +126,11 @@ pub struct HeadingElem {
127126
/// ```
128127
pub supplement: Smart<Option<Supplement>>,
129128

130-
/// Whether the heading should appear in the [outline].
129+
/// 見出しを[目次]($outline)に表示するかどうか。
131130
///
132-
/// Note that this property, if set to `{true}`, ensures the heading is also
133-
/// shown as a bookmark in the exported PDF's outline (when exporting to
134-
/// PDF). To change that behavior, use the `bookmarked` property.
131+
/// なお、このプロパティを`{true}`に設定すると、
132+
/// PDFへのエクスポート時に、見出しがPDFの目次にしおりとしても表示されます。
133+
/// この動作を変更するには、`bookmarked`プロパティを使用してください。
135134
///
136135
/// ```example
137136
/// #outline()
@@ -146,14 +145,14 @@ pub struct HeadingElem {
146145
#[default(true)]
147146
pub outlined: bool,
148147

149-
/// Whether the heading should appear as a bookmark in the exported PDF's
150-
/// outline. Doesn't affect other export formats, such as PNG.
148+
/// エクスポートされたPDFの目次に見出しをしおりとして表示するかどうか。
149+
/// PNGなどの他のエクスポート形式には影響しません。
151150
///
152-
/// The default value of `{auto}` indicates that the heading will only
153-
/// appear in the exported PDF's outline if its `outlined` property is set
154-
/// to `{true}`, that is, if it would also be listed in Typst's [outline].
155-
/// Setting this property to either `{true}` (bookmark) or `{false}` (don't
156-
/// bookmark) bypasses that behavior.
151+
/// デフォルト値の`{auto}`は、`outlined`プロパティが`{true}`に設定されている見出し、
152+
/// すなわちTypstの[目次]($outline)にも記載される見出しのみが、
153+
/// PDFエクスポート時の目次に表示されることを示します。
154+
/// このプロパティを`{true}`(しおりあり)または`{false}`(しおりなし)に設定すると、
155+
/// この動作を無視します。
157156
///
158157
/// ```example
159158
/// #heading[Normal heading]
@@ -168,10 +167,10 @@ pub struct HeadingElem {
168167
#[default(Smart::Auto)]
169168
pub bookmarked: Smart<bool>,
170169

171-
/// The indent all but the first line of a heading should have.
170+
/// 見出しの最初の行を除くすべての行に適用されるインデント。
172171
///
173-
/// The default value of `{auto}` indicates that the subsequent heading
174-
/// lines will be indented based on the width of the numbering.
172+
/// デフォルト値の`{auto}`では、
173+
/// 見出しの先頭行に続く行が番号の幅に合わせてインデントされます。
175174
///
176175
/// ```example
177176
/// #set heading(numbering: "1.")
@@ -180,7 +179,7 @@ pub struct HeadingElem {
180179
#[default(Smart::Auto)]
181180
pub hanging_indent: Smart<Length>,
182181

183-
/// The heading's title.
182+
/// 見出しのタイトル。
184183
#[required]
185184
pub body: Content,
186185
}

website/translation-status.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@
5050
"/docs/reference/model/emph/": "translated",
5151
"/docs/reference/model/figure/": "translated",
5252
"/docs/reference/model/footnote/": "translated",
53-
"/docs/reference/model/heading/": "untranslated",
53+
"/docs/reference/model/heading/": "translated",
5454
"/docs/reference/model/link/": "translated",
5555
"/docs/reference/model/enum/": "translated",
5656
"/docs/reference/model/numbering/": "untranslated",

0 commit comments

Comments
 (0)