Windows can be used to interpolate the entirety of an idea’s content into a different context. They are useful in home pages or other sections that aggregate content.
Fundamentally, windows are a form of augmented hyperlink. They take their name from Nelson’s notion of the transpointing window as, when paired with backlinks, they allow you to see the content either side of the link.
Say you have an idea:
#idea("first-idea", title: [My first idea])You can produce a window on this idea like so:
#import "@rheo/rookery:0.1.0": window
#window(<first-idea>)Note that we do not need the idea: prefix. Like #hyperlink,#window is a function imported from rookery that already knows which namespace to look in.
By default, this window will be unfolded, showing the full content of the idea. If we want it to instead be folded, we can configure it with arguments. We can also pass an array of ideas to window on multiple ideas, and limit
#window(
(<first-idea>, <second-idea>, <third-idea>),
// only show the idea's name and id
folded: true,
// limit the number of ideas shown
limit: 1,
// include the document date
show-date: true,
)Here is an example of a window on the two foundational ideas in rookery, ‘rookery’ and ‘idea’, folded and with date:
Adding a window to an idea will include the window’s context in the idea’s backlinks.
An idea’s footnotes travel with it into a window, numbered from 1 again and listed in the window’s own block — open this one and compare it with the same idea further up the page:
So do its citations: a window carries its own References block, resolving inside the window rather than pointing back at the idea’s own page.
Windows on ideas that are parents in the idea hierarchy can infinitely recurse. By default they do not: a window written inside an idea you are windowing on collapses to its ID, so you always see one idea rather than a tree of them.
Raise depth to unfurl those inner windows, one level per count:
#window(<first-idea>, depth: 1)You can configure window depth rookery-wide like so:
#show: rookery.with(window-depth: 1)
#window(<first-idea>)
#window(<second-idea>, depth: 0)The count is a budget, and it is what makes this safe to ask for. An idea that windows on itself, or two that window on each other, would otherwise unfurl forever; with a budget they bottom out at the ID and stop. Each level also re-renders the idea’s body, so the work multiplies rather than adds — keep the numbers small.
Here is a window on this idea’s own parent, at the default depth. Its own windows show only as ID links: