I want my x-axis tick labels rotated by 45 degrees and aligned so that the end of every word is at the center of the tick.
The rotation is easy, even the example docs mention it:
That wouldn’t be the correct syntax. The original rotate.with(-45deg, reflow: true) is a function that accepts content, so the replacement should be as well. When nesting functions, with is not sufficient any more. The correct way to write this would be
body => align(center, rotate(-45deg, reflow: true, body))
or alternatively
body => {
set align(center)
show: rotate.with(-45deg, reflow: true)
body
}
(idk if this solves the original problem, but if the original answer is on the right track, this should help make it work)
I don’t want to align it in this way, where you can draw an imaginary vertical line between the tick and the center of the text. I want the right side of the text to be directly under the tick, as in the uploaded reference picture.
As a meta comment, this is why you should specify in your question what you already tried—so that others can take a shortcut and not also try the same things—and add a runnable example (like @vmartel08 did), so that others can easily test whether their modifications have the expected/desired effect. See How to post in the Questions category for more details on asking best practices