How to create a showybox with title moved to the left of the body?

Hope this is the correct forum for questions such as these.

The attached screenshot was generated with a single image (title background, triangle and box border) and text inserted using the place function. I’m trying to build it using showybox or grid (with the triangle image loaded on it’s own), but am not quite managing.

Yes, this is the right place for these kind of questions.
This is

my implementation
code
#import "@preview/showybox:2.0.4": showybox
#grid(columns: 2, 
  move(dx: -0.17cm, dy: 0.9cm)[#image("image.png", width: 5em)],
showybox(
  width: 11cm,
  frame: (title-color: rgb(0, 8, 97), border-color: rgb(0, 8, 97)),
  radius: 5pt,
  // shadow: (color: black, offset: 0.2em),
  title-style: (
    color: white,
    boxed-style: (
      anchor: (x: start, y: top),
      offset: (x: -4em, y: -0.4em),
    ),
  ),
  title: [*Showy title one: * Showy title two],
  [
    #lorem(25)
  ]
)
)
screenshot

The thing you might have to tweak around depending on your image is the offset of the image in line 3 (dx and dy in move).
If there is any question left feel free to ask :slight_smile:

1 Like

Thank you - I’ve managed by using move as well, but not in a grid. Your solution will handle variances in the text better, II’ll give it a try.

Hey @Johan_Pretorius, welcome to the forum! I’ve changed your post’s title to a question in order to better fit our guidelines: How to post in the Questions category

Please mark @Adrian_Weitkemper’s answer as a solution if it solved your problem, otherwise feel free to let us know if you need further help. Thanks! :slight_smile:

1 Like