mbutterick/quad

variable-width columns?

Closed this issue · 8 comments

currently there only seems to be a way of specifying how many columns I want per section (the column-count attribute), but not how wide they should be. is this worthwhile to implement?

The columns expand to whatever width is permitted by the current page-margin fields and the column-gap. That is, if you want narrower columns, you would increase the left & right margins, and/or the column gap.

I see! I currently have something like this, after having tried to change the margin size of the page mid-page, after the first column:

#lang quadwriter

'(q ((page-margin-left "50")
     (column-count "2")
     (column-gap "20")
     (footer-display "false"))
    (q ((page-margin-right "220"))
       "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do
    eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad
    minim veniam, quis nostrud exercitation ullamco laboris nisi ut
    aliquip ex ea commodo consequat. Duis aute irure dolor in
    reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla
    pariatur. Excepteur sint occaecat cupidatat non proident, sunt in
    culpa qui officia deserunt mollit anim id est laborum.")
    (q ((break "column")))
    (q ((page-margin-right "50"))
       "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do
    eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad
    minim veniam, quis nostrud exercitation ullamco laboris nisi ut
    aliquip ex ea commodo consequat. Duis aute irure dolor in
    reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla
    pariatur. Excepteur sint occaecat cupidatat non proident, sunt in
    culpa qui officia deserunt mollit anim id est laborum."))

which renders to:

test-letter-1

what I want is to implement something akin to a sidenote, I guess—the second column should extend to the right end of the page, being wider than the first.

Page margins are a section-level attribute, so you can’t change them between columns. It should be possible, however, to use inset-right to make the paragraph in the right-hand column wider. But in a quick test, it didn’t work, so let me look into that.

Page margins are a section-level attribute, so you can’t change them between columns.

yes, that makes sense!

It should be possible, however, to use inset-right to make the paragraph in the right-hand column wider.

I'm not sure I follow, but I'll try figuring it out

But in a quick test, it didn’t work, so let me look into that.

ok, thanks!

Every paragraph has an inset-left and inset-right that controls how the text fits with its usual margins. If you make a negative inset-right, then the text should (!) flow past the right edge of the paragraph.

#lang quadwriter

'(q ((page-margin-left "50")
     (column-count "2")
     (column-gap "20")
     (footer-display "false"))
    (q ((page-margin-right "220"))
       "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do
    eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad
    minim veniam, quis nostrud exercitation ullamco laboris nisi ut
    aliquip ex ea commodo consequat. Duis aute irure dolor in
    reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla
    pariatur. Excepteur sint occaecat cupidatat non proident, sunt in
    culpa qui officia deserunt mollit anim id est laborum.")
    (q ((break "column")))
 (q ((break "para")))
    (q ((font-size-adjust "80%")(inset-right "-150"))
       "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do
    eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad
    minim veniam, quis nostrud exercitation ullamco laboris nisi ut
    aliquip ex ea commodo consequat. Duis aute irure dolor in
    reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla
    pariatur. Excepteur sint occaecat cupidatat non proident, sunt in
    culpa qui officia deserunt mollit anim id est laborum."))

Screen Shot 2020-01-28 at 11 34 03 AM

What I did is insert (q ((break "para"))) to start a new paragraph (with independent inset formatting) and then used the attribute (inset-right "-150") to increase the width of the lines.

this works perfectly! now I've managed to build something similar to your letterhead sample in Practical Typography (just to see if I could!)