未翻訳
このページはまだ翻訳されていません。原文の内容が表示されています。
smartquote
要素関数要素関数要素関数はset
ルールやshow
ルールでカスタマイズできます。
要素関数
要素関数は
set
ルールやshow
ルールでカスタマイズできます。A language-aware quote that reacts to its context.
Automatically turns into an appropriate opening or closing quote based on the active text language.
Example
"This is in quotes."
#set text(lang: "de")
"Das ist in Anführungszeichen."
#set text(lang: "fr")
"C'est entre guillemets."

Syntax
This function also has dedicated syntax: The normal quote characters
('
and "
). Typst automatically makes your quotes smart.
引数引数引数は関数への入力値です。関数名の後に括弧で囲んで指定します。
引数
引数は関数への入力値です。関数名の後に括弧で囲んで指定します。
double
設定可能引数設定可能引数設定可能引数は、set
ルールを用いて設定でき、それ以降で使用するデフォルト値を変更できます。
設定可能引数
設定可能引数
設定可能引数は、
set
ルールを用いて設定でき、それ以降で使用するデフォルト値を変更できます。Whether this should be a double quote.
デフォルト値: true
enabled
設定可能引数設定可能引数設定可能引数は、set
ルールを用いて設定でき、それ以降で使用するデフォルト値を変更できます。
設定可能引数
設定可能引数
設定可能引数は、
set
ルールを用いて設定でき、それ以降で使用するデフォルト値を変更できます。Whether smart quotes are enabled.
To disable smartness for a single quote, you can also escape it with a backslash.
デフォルト値: true
例を表示
#set smartquote(enabled: false)
These are "dumb" quotes.

alternative
設定可能引数設定可能引数設定可能引数は、set
ルールを用いて設定でき、それ以降で使用するデフォルト値を変更できます。
設定可能引数
設定可能引数
設定可能引数は、
set
ルールを用いて設定でき、それ以降で使用するデフォルト値を変更できます。Whether to use alternative quotes.
Does nothing for languages that don't have alternative quotes, or if explicit quotes were set.
デフォルト値: false
例を表示
#set text(lang: "de")
#set smartquote(alternative: true)
"Das ist in anderen Anführungszeichen."

quotes
設定可能引数設定可能引数設定可能引数は、set
ルールを用いて設定でき、それ以降で使用するデフォルト値を変更できます。
設定可能引数
設定可能引数
設定可能引数は、
set
ルールを用いて設定でき、それ以降で使用するデフォルト値を変更できます。The quotes to use.
- When set to
auto
, the appropriate single quotes for the text language will be used. This is the default. - Custom quotes can be passed as a string, array, or dictionary of either
- string: a string consisting of two characters containing the opening and closing double quotes (characters here refer to Unicode grapheme clusters)
- array: an array containing the opening and closing double quotes
- dictionary: an array containing the double and single quotes, each
specified as either
auto
, string, or array
デフォルト値: auto
例を表示
#set text(lang: "de")
'Das sind normale Anführungszeichen.'
#set smartquote(quotes: "()")
"Das sind eigene Anführungszeichen."
#set smartquote(quotes: (single: ("[[", "]]"), double: auto))
'Das sind eigene Anführungszeichen.'
