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-10-13

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

Adds a line over text.

Example

#overline[A line over text.]
Preview

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

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

How to stroke the line.

If set to auto, takes on the text's color and a thickness defined in the current font.

Show example
#set text(fill: olive)
#overline(
  stroke: green.darken(20%),
  offset: -12pt,
  [The Forest Theme],
)
Preview

Default value:

auto

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

The position of the line relative to the baseline. Read from the font tables if auto.

Show example
#overline(offset: -1.2em)[
  The Tale Of A Faraway Line II
]
Preview

Default value:

auto

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

The amount by which to extend the line beyond (or within if negative) the content.

Show example
#set overline(extent: 4pt)
#set underline(extent: 4pt)
#overline(underline[Typography Today])
Preview

Default value:

0pt

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

Whether the line skips sections in which it would collide with the glyphs.

Show example
#overline(
  evade: false,
  offset: -7.5pt,
  stroke: 1pt,
  extent: 3pt,
  [Temple],
)
Preview

Default value:

true

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

Whether the line is placed behind the content it overlines.

Show example
#set overline(stroke: (thickness: 1em, paint: maroon, cap: "round"))
#overline(background: true)[This is stylized.] \
#overline(background: false)[This is partially hidden.]
Preview

Default value:

false

body
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 content to add a line over.

Open official docs

Search