Hi everyone, I’m using Typst to typeset my master’s thesis, and differently to other documents I have written in the past with Typst, there are paragraphs, list items or titles of definitions and examples that are horizontally misaligned. An example of this is below.
I have already tried commenting out all of the templates and style commands I use, but this had no effect at all in the document. Could this be an instance of issue #529 from the GitHub repository? Irrespective of this, is there a workaround to overcome this? I am really puzzled, because I’m reusing the same setup of some of the packages I have used in the past (lemmify, for instance) but I’m getting this problem for the first time only now.
I think you didn’t notice, but the paragraphs seem to be centralized, and not ragged right.
Try set align(left), or set align(horizon) if you want it to also work with RTL languages, before the text you want to influence.
Maybe the alignment is being set by some function you’re calling and that function does not restrict the rule to a block, so it leaks to the rest of the document.
Yes, that’s right. All these elements are centered. That’s something I had already noticed before, but I wanted to keep things simple in the title and description.
That said, I think I have found a solution. Following your advice, I’m forcing left alignment on lemmify elements:
show thm-selector("default-theorems"): x => {
set align(left)
x
}
show thm-selector("my-theorems"): x => {
set align(left)
x
}
I had a quick scroll through the whole document and all elements seem to be correctly aligned now.