line
ShowableShowable functions can be customized with show
rules.
Showable functions can be customized with
show
rules.A line from one point to another.
Example
#set page(height: 100pt)
#line(end: (50%, 50%))

ParametersParameters are the inputs to a function. They are specified in parentheses after the function name.
Parameters are the inputs to a function. They are specified in parentheses after the function name.
start
The start point of the line. Must be an array of exactly two relative lengths.
end
The end point of the line. Must be an array of exactly two relative lengths.
length
The line's length. Mutually exclusive with end
.
angle
The angle at which the line points away from the origin. Mutually
exclusive with end
.
stroke
How to stroke the line. This can be:
- A length specifying the stroke's thickness. The color is inherited, defaulting to black.
- A color to use for the stroke. The thickness is inherited, defaulting
to
1pt
. - A stroke combined from color and thickness using the
+
operator as in2pt + red
.
#line(length: 100%, stroke: 2pt + red)
