Skip to content

Commit

Permalink
Fix hack for non texexpr nodes
Browse files Browse the repository at this point in the history
  • Loading branch information
Kolaru committed Jul 24, 2024
1 parent e18a7a6 commit 7d106b9
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/engine/layout.jl
Original file line number Diff line number Diff line change
Expand Up @@ -323,8 +323,7 @@ function generate_tex_elements(str, font_family=FontFamily())
expr = texparse(str)

for node in PreOrderDFS(expr)
isnothing(node) && break
if node.head == :fontfamily
if node isa TeXExpr && node.head == :fontfamily
# Reconstruct the argument as a single string
name = join([texchar.args[1] for texchar in node.args[1].args])
font_family = FontFamily(name)
Expand Down

0 comments on commit 7d106b9

Please sign in to comment.