Info
This site is generated using the static site generator developed by the Typst Community. Please adjust the text content of this banner according to your usage requirements. At Typst GmbH's request, when publishing documentation, you must clearly indicate that it is non-official and display the version of Typst being documented. For details, refer to Issue #874 on typst/typst.
TypstDocumentEnglish
v0.dev.2025-09-12

accent
Element
Element
Element functions can be customized with set and show rules.

Attaches an accent to a base.

Example

$grave(a) = accent(a, `)$ \
$arrow(a) = accent(a, arrow)$ \
$tilde(a) = accent(a, \u{0303})$
Preview

Parameter
Parameter
Parameters are input values for functions. Specify them in parentheses after the function name.

base
Required
Required
Required parameters must be specified when calling the function.
Positional
Positional
Positional parameters can be set by specifying them in order, omitting the parameter name.

The base to which the accent is applied. May consist of multiple letters.

Show example
$arrow(A B C)$
Preview

accent
Required
Required
Required parameters must be specified when calling the function.
Positional
Positional
Positional parameters can be set by specifying them in order, omitting the parameter name.

The accent to apply to the base.

Supported accents include:

AccentNameCodepoint
Gravegrave`
Acuteacute´
Circumflexhat^
Tildetilde~
Macronmacron¯
Dashdash
Brevebreve˘
Dotdot.
Double dot, Diaeresisdot.double, diaer¨
Triple dotdot.triple
Quadruple dotdot.quad
Circlecircle
Double acuteacute.double˝
Caroncaronˇ
Right arrowarrow, ->
Left arrowarrow.l, <-
Left/Right arrowarrow.l.r
Right harpoonharpoon
Left harpoonharpoon.lt

size
Settable
Settable
Settable parameters can be set using the set rule, changing the default value used thereafter.

The size of the accent, relative to the width of the base.

Default value:

100% + 0pt

Show example
$dash(A, size: #150%)$
Preview

dotless
Settable
Settable
Settable parameters can be set using the set rule, changing the default value used thereafter.

Whether to remove the dot on top of lowercase i and j when adding a top accent.

This enables the dtls OpenType feature.

Default value:

true

Show example
$hat(dotless: #false, i)$
Preview
Open official docs

Search