cdlm / sbabook

Layout & typography for LaTeX books using the memoir document class
10 stars 3 forks source link

Is it possible to justify text instead of left alignment? #28

Open StevenCostiou opened 2 months ago

StevenCostiou commented 2 months ago

It can be done simply by adding the following to sbabook.cls

%%% Page styles & folios
\justifying

I do it in my own projects, but I was wondering if that could be a default option.

StevenCostiou commented 2 months ago

Or if it could stay left align by default but somehow have an option in the class to set it to justify?

cdlm commented 2 months ago

Certainly the SBAbook example documentation could mention the possibility. It's easy enough to add \justifying to your document preamble —in the main template for Pillar books.

I'm keeping \RaggedRight as a default because justification doesn't make sense for the style of most books that use the class —a few lines of prose alternating with code examples.

Besides, a class option would require the same modification to the document preamble (minus the \) plus 5–10 lines of code in the class for the option definition. The only benefit being that some other places could become justified as a result of the options (e.g. figure captions, where it doesn't make much sense to have enough to benefit from justification).