Skip to content
\n

It draws a red frame around the text using box and a black frame using cetz.draw.content.

\n

Behavior in v0.2.2:

\n

\"image\"
\n\"image\"

\n

Behavior in v0.3.1:

\n

\"image\"
\n\"image\"

\n

I was previously using the old behavior to create simple UML class diagrams, e.g in v0.2.2

\n

\"image\"

\n

It's built from a Typst grid wrapped in cetz.draw.content, which adds a rectangular frame. In v0.3.1 this instead looks like this:

\n

\"image\"

\n

Using text without descenders reduces the added padding but does not fully eliminate it, so there is also something else changed.

\n

Now, I could create the frame using box, but this does not change the anchor points, so lines are then no longer connected to the bottom of the frame but end in empty space.

\n

Is this change intended and if so, is there a way for me to restore the previous behavior?

","upvoteCount":1,"answerCount":4,"acceptedAnswer":{"@type":"Answer","text":"

The previous sizing should be restored by wrapping your content in text(bottom-edge: \"baseline\", ...).

","upvoteCount":2,"url":"https://github.com/cetz-package/cetz/discussions/751#discussioncomment-11283625"}}}
Discussion options

You must be logged in to vote

The previous sizing should be restored by wrapping your content in text(bottom-edge: "baseline", ...).

Replies: 4 comments 2 replies

Comment options

You must be logged in to vote
0 replies
Answer selected by johannes-wolf
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
1 reply
@lars-reimann
Comment options

Comment options

You must be logged in to vote
1 reply
@lars-reimann
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants
Converted from issue

This discussion was converted from issue #750 on November 17, 2024 14:33.