Development build 586e1bd4
Typst文档简体中文版v0.15.1 + dev 586e1bd4

accent元素
Question mark
自始可用Go to source

Attaches an accent to a base.

In math mode, common accents are also available as named symbols that can be directly called (like functions) to attach them to some content.

Example

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

参数
Question mark

base
content
必需参数
Question mark
位置参数
Question mark

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

Expand展开示例
$arrow(A B C)$

accent
str or content
必需参数
Question mark
位置参数
Question mark

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\u{20db}
Quadruple dotdot.quad\u{20dc}
Circlecircle
Double acuteacute.double˝
Caroncaronˇ
Right arrowarrow, ->
Left arrowarrow.l, <-
Left/Right arrowarrow.l.r
Right harpoonharpoon
Left harpoonharpoon.lt

size
relative
可用set规则
Question mark
默认值:100% + 0pt

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

Expand展开示例:Basic usage
$dash(A, size: #150%)$

Note that the resulting accent may not have the exact desired size. For example, an arrow may be either a pre-defined short glyph, or a long glyph assembled from building blocks (arrowhead + line) provided by the font. The sizes of the two possibilities may not cover the entire span. Consequently, arrows of certain intermediate sizes cannot be constructed.

Expand展开示例:Size of arrow growing discontinuously
#for i in range(6) { $ arrow(#box( width: 0.4em + 0.3em * i, fill: aqua, height: 0.4em, )) $ }

dotless
bool
可用set规则
Question mark
默认值:true

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

This enables the dtls OpenType feature.

Expand展开示例
$hat(dotless: #false, i)$