[quad] positioning a block a text
#31
Closed
opened 4 years ago by sorawee
·
11 comments
Loading…
Reference in New Issue
There is no content yet.
Delete Branch '%!s(<nil>)'
Deleting a branch is permanent. It CANNOT be undone. Continue?
Let me use this space for asking a quad question again.
I wonder how I can typeset a letter like this. Specifically, the letter heading has multiple lines. These lines all start at the same position (about 60% of the page width). How could I do that in quad? If this were LaTeX, I would use
minipage
orparbox
, which would be equivalent to thequad
structure in quad (as you mentioned at https://github.com/mbutterick/quad/issues/57#issuecomment-589906441). But as I understand, aquad
cannot be directly manipulated (like changing its position) in quadwriter, correct?My first idea would be to use a combination of
inset-left
and friends to manually position the header. I see there are options likeanchor-from-parent
,anchor-to
, etc; but I haven't used them, so I don't know how they work.Below is a sample of how I would go about replicating the letter you mention:
And this is how it looks:
Thanks. That is very helpful.
If you don't mind, here's my next question. I also would like to be able to do this but the above solution doesn't seem suffice.
Let's ignore the images. The core issue is that in the above solution, the block with
inset-left
must have nothing on the left. That is, it must be on a new line. However, in the above example, there's a phrase "Home is" on the same line as the block withinset-left
(which contains checkboxes). The solution above would fail: the checkbox would starts right after "Home is" without any inset. Do you have any workaround or solution for this?@ergl: btw, if I understand correctly, you should not write
'
in'(para-break)
. Racket would expand it into(quote (para-break))
which is incorrect. It just happens that quad ignores bogus tag name, so the result looks valid.You're right, I got confused, the
'
in both'(para-break)
and'(line-break)
should be removed.As for your other problem, you're right that using
inset-left
is not sufficient. I'd use thecolumn-count
attribute for that. Sadly, it's only a section-level attribute, so you can not have different parts in a page with different columns.Right now I don't if it's possible to emulate that layout with quad. Hopefully Matthew or others can chime in with ideas.
@sorawee Despite the soothing presence of Comic Sans, that’s actually a complicated layout. In general placing things side-by-side is difficult. I am currently working on a
#lang résumé
based onquadwriter
with a similar problem. What I did is use a negativespace-after
value on the first line, equal to the height of the line, to move the remaining lines upward vertically. So I make this, usinginset-left
:And then with the negative
space-after
on the first line, I make it look like this:Is there any particular limitation as to why
column-count
can only be used at the page level? I'm sure there are more complicated layouts that maybe could be solved by scoping columns to parts of a page.No reason for that limitation (other than making my life simpler, for a week). I’ve been coming around to the idea that it would be useful to allow section breaks to happen within a page.
(Or more likely, create a new break level that represents an arbitrary vertical territory in the document, and allow
column-count
to apply at that lower level. It is useful to have asection
consistently denote a set of whole pages.)Isn't table layout what we really want?
Right now I’m just trying to reach the typesetting capability of the 1960s. You’re way out in the ’90s.