@@ -9,12 +9,11 @@ use crate::foundations::{
9
9
use crate :: layout:: Dir ;
10
10
use crate :: text:: { Lang , Region } ;
11
11
12
- /// A language-aware quote that reacts to its context.
12
+ /// 言語を認識し、コンテキストに反応する引用符。
13
13
///
14
- /// Automatically turns into an appropriate opening or closing quote based on
15
- /// the active [text language]($text.lang).
14
+ /// アクティブな[テキストの言語設定]($text.lang)に基づいて適切な開き引用符か閉じ引用符に自動的に変更します。
16
15
///
17
- /// # Example
16
+ /// # 例
18
17
/// ```example
19
18
/// "This is in quotes."
20
19
///
@@ -25,19 +24,19 @@ use crate::text::{Lang, Region};
25
24
/// "C'est entre guillemets."
26
25
/// ```
27
26
///
28
- /// # Syntax
29
- /// This function also has dedicated syntax: The normal quote characters
30
- /// (`'` and `"`). Typst automatically makes your quotes smart.
27
+ /// # 構文
28
+ /// この関数は専用の構文もあります。
29
+ /// 通常の引用記号(`'`と`"`)です。
30
+ /// Typstはそれらを自動的にスマートクォートとして扱います。
31
31
#[ elem( name = "smartquote" , PlainText ) ]
32
32
pub struct SmartQuoteElem {
33
- /// Whether this should be a double quote.
33
+ /// 二重引用符にすべきかどうか。
34
34
#[ default( true ) ]
35
35
pub double : bool ,
36
36
37
- /// Whether smart quotes are enabled.
37
+ /// スマートクォートを有効化するかどうか。
38
38
///
39
- /// To disable smartness for a single quote, you can also escape it with a
40
- /// backslash.
39
+ /// 単一引用符の場合は、バックスラッシュでエスケープしても無効化できます。
41
40
///
42
41
/// ```example
43
42
/// #set smartquote(enabled: false)
@@ -47,10 +46,9 @@ pub struct SmartQuoteElem {
47
46
#[ default( true ) ]
48
47
pub enabled : bool ,
49
48
50
- /// Whether to use alternative quotes.
49
+ /// 代替引用符を使用するかどうか。
51
50
///
52
- /// Does nothing for languages that don't have alternative quotes, or if
53
- /// explicit quotes were set.
51
+ /// 代替引用符を持たない言語に対してや、明示的に引用符が設定されている場合には、何もしません。
54
52
///
55
53
/// ```example
56
54
/// #set text(lang: "de")
@@ -61,17 +59,13 @@ pub struct SmartQuoteElem {
61
59
#[ default( false ) ]
62
60
pub alternative : bool ,
63
61
64
- /// The quotes to use.
62
+ /// 使用する引用符。
65
63
///
66
- /// - When set to `{auto}`, the appropriate single quotes for the
67
- /// [text language]($text.lang) will be used. This is the default.
68
- /// - Custom quotes can be passed as a string, array, or dictionary of either
69
- /// - [string]($str): a string consisting of two characters containing the
70
- /// opening and closing double quotes (characters here refer to Unicode
71
- /// grapheme clusters)
72
- /// - [array]: an array containing the opening and closing double quotes
73
- /// - [dictionary]: an array containing the double and single quotes, each
74
- /// specified as either `{auto}`, string, or array
64
+ /// - `{auto}`に設定された場合、[テキストの言語]($text.lang)に対して適切な単一引用符が使用されます。これがデフォルトです。
65
+ /// - カスタム引用符として文字列、配列、辞書のいずれかを渡せます。
66
+ /// - [文字列]($str): 開き二重引用符と閉じ二重引用符の2文字からなる文字列(ここの文字はUnicodeグラフェムクラスターを指します)
67
+ /// - [配列]($array): 開き二重引用符と閉じ二重引用符を持つ配列
68
+ /// - [辞書]($dictionary): doubleやsingleをキーとして引用符を指定する辞書。その値は`{auto}`、文字列、配列のいずれかで指定します。
75
69
///
76
70
/// ```example
77
71
/// #set text(lang: "de")
0 commit comments