-
Notifications
You must be signed in to change notification settings - Fork 1
Open
Labels
best practicesQuestions about the "right" way to achieve a desired layout.Questions about the "right" way to achieve a desired layout.feature requestImprove support for a type of layout.Improve support for a type of layout.inconvenientThe layout is possible to achieve, but it requires too many hacks.The layout is possible to achieve, but it requires too many hacks.
Description
In the image above:
- The red ring is an obstacle.
- The two dotted orange rectangles are containers.
- The two blue-bordered areas(1 and 2(a circle)) are where I want to place/flow my text: first fill area 1 and then area 2.
The problem is that area 3 is part of the first container, so the text goes first into area (1+3), then (2-3).
A solution is putting the areas into two reflow
s with different obstacles, but doing that will break the text threading. Content is not shared between reflow
s. Could we find a way to make this possible?
Another solution is putting all the things in one reflow
, but with a clear()
command, which will clear all the obstacles and containers before it, causing the following layout computing to ignore them:
#meander.reflow.with(debug:true)({
import meander: *
placed(...)
container(...)
container(...)
clear() # <--- new command
placed(...)
placed(...)
container(...)
container(...)
content[
#set par(justify: true)
#lorem(570)
]
})
This functionality would be incredibly useful for creating complex layouts like magazine articles or graphic-heavy reports where content needs to flow in irregular shapes.
Metadata
Metadata
Assignees
Labels
best practicesQuestions about the "right" way to achieve a desired layout.Questions about the "right" way to achieve a desired layout.feature requestImprove support for a type of layout.Improve support for a type of layout.inconvenientThe layout is possible to achieve, but it requires too many hacks.The layout is possible to achieve, but it requires too many hacks.