[Scribus] SoC idea: structured layout through sequences and spacers

Michael Koren kung42o
Mon Mar 26 03:14:26 CEST 2007

Hi all, I read the posts about SoC on the list very late, but I still have an
idea I thought I'd run by everyone. See if you like it and if you think
there's still time to finish an application. :)

Also, my school, unlike the rest of the world, gets out for the summer at
the end of June :) , but they're willing to be flexible if I were to
participate. But we were wondering if there's any chance I could start two
weeks late or so in mid-June to wrap up the school year; I could start
playing with code a little before then to make up for it. But I can ask
again if I would need to have the full time available.

I've never really introduced myself, even though I've been on the
list/bugtracker for a while. I'm currently a PhD student at Maharishi
University of Management in the middle of nowhere, Iowa, USA, :) and I'll be
doing my dissertation research on a range of computer science topics
centered around abstract data representation, processing, and interfaces (so
I'm interested by the first proposal regarding content management and
workflow as well). I started using Scribus to replace WordPerfect shortly
after I switched to linux a few years ago, and immediately became intrigued
by its potential for exploring some of my ideas in the areas of both visual
(layout) and content organization.

My main feature wish in using Scribus has been to somehow integrate its
precise, WYSIWYG layout capabilities with the flexibility to rapidly modify,
replace, or replicate an entire layout according to saved rules or
contraints--in other words, to have dynamic layout styles. I would like to
implement a general framework to support such structured layout and styles
which could have many long-term uses, and then implement a few specific
applications of it in Scribus.

Use cases/benefits

* structured relative positioning and sizing of frames--persistent align and
distribute; easily modifying complex charts of many individual frames where
many symmetry relationships should be maintained (see my real example at
http://bugs.scribus.net/file_download.php?file_id=1919&type=bug). The idea
is the whole layout could be determined by a few good layout styles, and
then the whole thing could be reformatted to a new look by changing the
styles and leaving the content alone. This would be useful for a content
management/external content library system as well.

* object clones with shared attributes, as well as possible variations (a
sequence of colors, sizes, etc.), as on the ideas page. I think that this
proposal would be a superset of that functionality.

* (long-term) integration with the text layout engine, which is a specific
case of a structured layout engine. Would allow finer control over details
of columns, sections, and intelligent spacing around headings and inline
objects. I'm thinking section styles here, where content logically
identified as a section with a heading and a body can have a style applied
to it to determine spacing between headings and sections and apply specific
text styles to each

* (long-term) _native_ rendering of equations or latex content by applying
layout styles to structured input content (see
http://bugs.scribus.net/file_download.php?file_id=1924&type=bug at the top
for an example idea). This would allow easily reformatting an equation with
a new style, etc. This would also require an import parser to turn
structured input (XML, latex, or even just "(3x+2y)^n" into scribus groups
and apply the appropriate styles. It would coexist peacefully with an
external rendering approach such as the also proposed project, as either
approach has advantages. :)

* (long-term) a formalized way to represent the Scribus layout algorithm.
While the core text rendering engine will be optimized for efficient
rendering and supporting the most common needs, an abstract layout framework
would allow formally defining its behavior so that Scribus layouts could be
supported by other programs or implementations and it could be easily
extended for special-case needs. Both the built-in text layouter and user
layout styles for frames could be described in the same language to an
external program, facilitating interoperability and the long-term
reliability of layouts. Also very relevant to content-sharing systems, which
could use multiple client interfaces to the same data depending on the


* a general class library for manipulating structured layout elements,
ideally independent of Scribus and Qt so it could be used by any Scribus
version as well as other applications. It would include:

     1. "spacers" - this is my name for objects that define relationships
between the properties of other objects, most commonly distance offsets, but
also size, rotation, text and color properties, even content. They would be
represented as arrows or such on the canvas.
          a) between sibling objects
          b) to a parent object, e.g. anchoring one corner of an object to a
place on the page
     2. "selectors" - choose the anchor point on an object for a spacer to
connect to, e.g., top left corner, center, or (long-term) named points on
the object
     3. sequences - these are ordered groups of objects which allow for
simply defining sequential relationships between their members. A sequence
would consist of objects plus a spacer style which would be applied between
successive member objects. E.g., persistent align and distribute: a sequence
of frames which remain equally spaced by the gap between them and centered
on the page when one of the objects is resized. Sequences could be nested to
form arrays or generalized tables, etc., as in my chart example
     4. sequence styles - the big picture. Take any given logically
structured content--a simple sequence, a structured equation, a section with
a heading, subheading, and body--and define sequence styles for it that can
be swapped in and out and reused.
          a) styles that can handle any sequence, like align and distribute
          b) styles that depend on a certain logical structure, like a

* Scribus GUI integration for parts 3 and 4 above. I would modify or
duplicate the linker tool to allow creating sequences on the canvas, and
extend the properties dialog to support setting relative properties. The
first two use cases named above should be supported.

* file format support - figure out how sequence information will be stored
in the file

I would not plan to support free, individual spacers (not part of a
sequence) or text-layout integration yet in this project, but the framework
would support them.

Again, sorry about the late post; I was too busy last month to follow the
mailing list. I hope this gives a basic idea of my proposal. If there's
interest, I can flesh it out into an application before the deadline
tomorrow.... :)

Best regards,

View this message in context: http://www.nabble.com/SoC-idea%3A-structured-layout-through-sequences-and-spacers-tf3464574.html#a9666267
Sent from the Scribus mailing list archive at Nabble.com.

More information about the scribus mailing list