Skip to content

Typesetting ragged-right? #1719

Answered by alerque
jslabovitz asked this question in Q&A
Feb 23, 2023 · 4 comments · 3 replies
Discussion options

You must be logged in to vote

If you have a book subclass the instantiator for that is probably the best place to set this up. Rather than wrapping your entire document in a \raggedright environment I would just copy the relevant settings from that command and put them in your document init and make them the defaults for the whole document:

class:_init()
	book._init(self)
	SILE.settings:set("document.rskip", SILE.nodefactory.hfillglue(), true)
end

I would also take that chance to set other values. You might want to set the spaceskip to not be stretchy at all:

	SILE.settings:set("document.spaceskip", SILE.length("1spc", 0, 0), true)

Then again you might actually want a little bit of stretch. I've done some projects us…

Replies: 4 comments 3 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
3 replies
@jslabovitz
Comment options

@alerque
Comment options

@alerque
Comment options

Answer selected by jslabovitz
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants