Author Topic: frames within text frames  (Read 952 times)


  • Newbie
  • *
  • Posts: 1
  • Karma: 0
  • Scribus User
frames within text frames
« on: May 23, 2021, 09:14:13 pm »
If this is a feature that exists that I don't know about, please point the way. I'm pretty sure it is not.

There are situations where it would be very useful to be able to insert a frame into a text frame -- including another text frame -- and have the inside frame attach to the text inside the outside frame, as opposed to a location within the outside frame.

In other words, suppose I have I this text and I want to insert a frame between the sentences.

A short sentence. Another short sentence.

In current practice, I could insert a bunch of spaces between the sentences, and place the inside frame into the space.

A short sentence. | inside frame | Another short sentence.

But if I change the first sentence to "A slightly longer sentence", the inside frame doesn't move, the final word is covered by the inside frame, and the inserted blanks push the second sentence to the side.

A slightly longer | inside frame |           Another short sentence.

Additionally, if the inside frame is changed in dimensions, the extra spaces don't expand.

A short sentence. | larger inside frame | r short sentence.

The way I'd like it to work would be to make it possible to anchor the inside frame to a point in the text of the outside frame. That would remove the need to insert blanks, so that changing the text before the inside frame moves the inside frame appropriately, and changing the size of the inside frame moves the text after.

My intended application would be shortcut to equations that doesn't involve the entire TeX plug-in for just a few simple equations. For example, instead of coding this equation as three lines of text in page-layout order, they're coded in logical order.

This way works, but putting the text in as "[spaces] numerator [newline] ratio = ___________ [newline] [spaces] denominator" breaks the logical flow of the equation.

ratio = ___________

Instead, this preserves the logical flow of the equation, which is "ratio = [begin frame] numerator [newline] _________ [newline] denominator [end frame]". (Imagine this as kind of an XML pseudocode.)

ratio = <insert frame>
        <end inserted frame>

This wouldn't replace TeX for complicated stuff (and maybe not even fairly simple stuff like square root symbols), but it would probably have value for other purposes, such as inserting images for things like glyphs not present in a font.

I haven't looked at the code for Scribus, but depending on how complicated it is, I might be able to code this myself, if I get some pointers at where to start.