情報アイコン
情報 / Info
当サイトは、Typst GmbHの許諾を得て、日本語コミュニティ「Typst Japan Community」がTypst v0.13.1の公式ドキュメントを翻訳したものです。誤訳や古い情報が含まれている可能性があるため、公式ドキュメントとの併用を推奨します。翻訳の改善やサイトの機能向上について、GitHubでのIssueやPull Requestを歓迎します。コミュニティにご興味のある方はDiscordサーバー「くみはんクラブ」にぜひご参加ください。
This site provides a Japanese translation of the Typst v0.13.1 documentation maintained by the "Typst Japan Community" with permission from Typst GmbH. We recommend using this alongside the official documentation. We welcome contributions through Issues and Pull Requests on our GitHub repository for both translation improvements and website enhancements. Feel free to join our Discord server "Kumihan Club".
言語アイコン
翻訳率
21%
言語アイコン
未翻訳

このページはまだ翻訳されていません。原文の内容が表示されています。

cancel
要素関数
要素関数
要素関数はsetルールやshowルールでカスタマイズできます。

Displays a diagonal line over a part of an equation.

This is commonly used to show the elimination of a term.

Example

Here, we can simplify:
$ (a dot b dot cancel(x)) /
    cancel(x) $
Preview

引数
引数
引数は関数への入力値です。関数名の後に括弧で囲んで指定します。

body
必須引数
必須引数
必須引数は、関数を呼び出す際に必ず指定しなければなりません。
位置引数
位置引数
位置引数は順序通りに指定することで、引数名を省略して設定できます。

The content over which the line should be placed.

length
設定可能引数
設定可能引数
設定可能引数は、setルールを用いて設定でき、それ以降で使用するデフォルト値を変更できます。

The length of the line, relative to the length of the diagonal spanning the whole element being "cancelled". A value of 100% would then have the line span precisely the element's diagonal.

デフォルト値:

100% + 3pt

右矢印アイコン
例を表示
$ a + cancel(x, length: #200%)
    - cancel(x, length: #200%) $
Preview

inverted
設定可能引数
設定可能引数
設定可能引数は、setルールを用いて設定でき、それ以降で使用するデフォルト値を変更できます。

Whether the cancel line should be inverted (flipped along the y-axis). For the default angle setting, inverted means the cancel line points to the top left instead of top right.

デフォルト値:

false

右矢印アイコン
例を表示
$ (a cancel((b + c), inverted: #true)) /
    cancel(b + c, inverted: #true) $
Preview

cross
設定可能引数
設定可能引数
設定可能引数は、setルールを用いて設定でき、それ以降で使用するデフォルト値を変更できます。

Whether two opposing cancel lines should be drawn, forming a cross over the element. Overrides inverted.

デフォルト値:

false

右矢印アイコン
例を表示
$ cancel(Pi, cross: #true) $
Preview

angle
設定可能引数
設定可能引数
設定可能引数は、setルールを用いて設定でき、それ以降で使用するデフォルト値を変更できます。

How much to rotate the cancel line.

  • If given an angle, the line is rotated by that angle clockwise with respect to the y-axis.
  • If auto, the line assumes the default angle; that is, along the rising diagonal of the content box.
  • If given a function angle => angle, the line is rotated, with respect to the y-axis, by the angle returned by that function. The function receives the default angle as its input.

デフォルト値:

auto

右矢印アイコン
例を表示
$ cancel(Pi)
  cancel(Pi, angle: #0deg)
  cancel(Pi, angle: #45deg)
  cancel(Pi, angle: #90deg)
  cancel(1/(1+x), angle: #(a => a + 45deg))
  cancel(1/(1+x), angle: #(a => a + 90deg)) $
Preview

stroke
設定可能引数
設定可能引数
設定可能引数は、setルールを用いて設定でき、それ以降で使用するデフォルト値を変更できます。

How to stroke the cancel line.

デフォルト値:

0.5pt

右矢印アイコン
例を表示
$ cancel(
  sum x,
  stroke: #(
    paint: red,
    thickness: 1.5pt,
    dash: "dashed",
  ),
) $
Preview

検索