部分的に翻訳済み
このページは部分的に翻訳されています。一部原文の内容が含まれています。
frac要素関数要素関数要素関数はsetルールやshowルールでカスタマイズできます。
要素関数
要素関数は
setルールやshowルールでカスタマイズできます。分数。
例
$ 1/2 < (x+1)/2 $
$ ((x+1)) / 2 = frac(a, b) $

構文
この関数には専用の構文もあります。 隣接する式をスラッシュで区切ると、分数になります。 また、丸括弧で複数の式要素を囲うと、単一の式として扱えます。 そのような丸括弧は出力からは削除されますが、複数重ねてネストすることで、丸括弧を表示させることも可能です。
引数引数引数は関数への入力値です。関数名の後に括弧で囲んで指定します。
引数
引数は関数への入力値です。関数名の後に括弧で囲んで指定します。
math.frac(,,)->num
num分数の分子。
denom
denom分数の分母。
style設定可能引数設定可能引数設定可能引数は、setルールを用いて設定でき、それ以降で使用するデフォルト値を変更できます。
style設定可能引数
設定可能引数
設定可能引数は、
setルールを用いて設定でき、それ以降で使用するデフォルト値を変更できます。How the fraction should be laid out.
例を表示:Styles
$ frac(x, y, style: "vertical") $
$ frac(x, y, style: "skewed") $
$ frac(x, y, style: "horizontal") $

例を表示:Setting the default
#set math.frac(style: "skewed")
$ a / b $

例を表示:Handling of grouping parentheses
// Grouping parentheses are removed.
#set math.frac(style: "vertical")
$ (a + b) / b $
// Grouping parentheses are removed.
#set math.frac(style: "skewed")
$ (a + b) / b $
// Grouping parentheses are retained.
#set math.frac(style: "horizontal")
$ (a + b) / b $

例を表示:Different styles in inline vs block equations
// This changes the style for inline equations only.
#show math.equation.where(block: false): set math.frac(style: "horizontal")
This $(x-y)/z = 3$ is inline math, and this is block math:
$ (x-y)/z = 3 $

使用可能な文字列値
verticalStacked numerator and denominator with a bar.
skewedNumerator and denominator separated by a slash.
horizontalNumerator and denominator placed inline and parentheses are not absorbed.
デフォルト値:"vertical"