Comments (11)
My first idea would be to use a combination of inset-left
and friends to manually position the header. I see there are options like anchor-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:
#lang quadwriter
'(q [(footer-display "false") (page-margin-left "2cm")]
(q [(inset-left "12cm")]
"Albert Einstein"
'(line-break)
"Old Grove Rd."
'(line-break)
"Nassau Point"
'(line-break)
"Peconic, Long Island"
'(para-break)
"August, 2nd, 1939")
'(para-break)
(q
"F.D. Roosevelt,"
'(line-break)
"President of the United States,"
'(line-break)
"White House"
'(line-break)
"Washington, D.C.")
'(para-break)
(q [(inset-top "1cm")] "Sir:")
'(para-break)
(q [(hyphenate "true") (line-wrap "kp")]
(q [(first-line-indent "40")]
"Some recent work by E. Fermi and L. Szilard, which has been communicated to me in manuscript, ...")))
And this is how it looks:
from pollen-users.
As for your other problem, you're right that using inset-left
is not sufficient. I'd use the column-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.
from pollen-users.
@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 on quadwriter
with a similar problem. What I did is use a negative space-after
value on the first line, equal to the height of the line, to move the remaining lines upward vertically. So I make this, using inset-left
:
First line
Second line
Third line
And then with the negative space-after
on the first line, I make it look like this:
First line Second line
Third line
from pollen-users.
Right now I’m just trying to reach the typesetting capability of the 1960s. You’re way out in the ’90s.
from pollen-users.
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 with inset-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?
from pollen-users.
@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.
from pollen-users.
You're right, I got confused, the '
in both '(para-break)
and '(line-break)
should be removed.
from pollen-users.
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.
from pollen-users.
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.
from pollen-users.
(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 a section
consistently denote a set of whole pages.)
from pollen-users.
Isn't table layout what we really want?
from pollen-users.
Related Issues (20)
- render index.ptree with subdirectories changes directory (though not project root) HOT 8
- Is parallel mode known to crash a lot? HOT 1
- decode-elements with decode-paragraphs inserts spurious <p> when nesting lists? HOT 2
- multiple text arguments? HOT 5
- serialising txexprs? HOT 2
- Beautiful Racket Racket docs HOT 1
- Classic tangle/weave support a la org/babel-mode HOT 2
- Add source tag to default block-tags HOT 3
- Importing text from other sources HOT 2
- One source file → multiple outputs of same type? HOT 6
- Having a hard time with maps HOT 4
- Metadata on pagenodes (?) / how to render link traversal HOT 5
- Filling templates multiple times, à la mail-merge -- maybe a non-use case? HOT 3
- Inserting html comment with pollen command HOT 4
- splitf-txexpr: how to use the resulting txexpr HOT 2
- Windows: Set Pollen environment variable HOT 2
- execute shell command via preprocessor?
- Mildy Dynamic Websites
- opinions sought: costs & benefits of switching to self-hosted Git server? HOT 17
- Could not find MANIFEST for package source HOT 7
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pollen-users.