Skip to content

[Feature Request] Content threading through multiple reflows. #1

@KDr2

Description

@KDr2

Image

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 reflows with different obstacles, but doing that will break the text threading. Content is not shared between reflows. 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

No one assigned

    Labels

    best practicesQuestions about the "right" way to achieve a desired layout.feature requestImprove support for a type of layout.inconvenientThe layout is possible to achieve, but it requires too many hacks.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions