Space inserted to the end of a line in the source code

Maybe there’s a way to influence that - if someone knows maybe they can answer, I don’t.

I think using a show rule to apply centering is a good way to handle it, something like this

    #show text: set align(center)
    #(
      box[1],
      box[4],
      box[6],
      box[4],
      box[1]
    ).join()

bild

Or - I’m agnostic about how you solve the spacing issue, you can help yourself and define a “new kind of box” to make the repetition easier this way too, as an alternative

    // #let cbox = x => box(align(center, x))  /* easy version */
    #let cbox(body, ..args) = box(..args, align(center, body))  /* general version */
    #cbox[1]/*
  */#cbox[4]/*
  */#cbox[6]/*
  */#cbox[4]/*
  */#cbox[1]
1 Like