Skip to content

Commit

Permalink
Layout for multiline
Browse files Browse the repository at this point in the history
  • Loading branch information
Kolaru committed Apr 22, 2024
1 parent 5532866 commit c879c8b
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/engine/layout.jl
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,15 @@ function tex_layout(expr, state)
)
elseif head == :lines
length(args) == 1 && return tex_layout(only(args), state)
lineheight = 1.3
lines = tex_layout.(args, state)
points = map(enumerate(lines)) do (k, line)
x = -inkwidth(line) / 2
y = (1 - k)*lineheight
return Point2f(x, y)
end

return Group(lines, points)
elseif head == :overline
content = tex_layout(args[1], state)

Expand Down

0 comments on commit c879c8b

Please sign in to comment.