We will be migrating from Ask to Discourse on the first week of August, read the details here

Ask Your Question
0

Chapter Numbers in Frames

asked 2020-10-10 21:51:34 +0200

altasilvapuer gravatar image

[Split from my previous question.]

I have a document that is predominately arranged in 2 columns throughout. The Chapter headings need to stretch across both columns, however. I also have some larger sections that begin with full-page title pages. On the latter, text is centered both vertically and horizontally.

The only way I've found to accomplish both of these situations is by using Frames, anchored generally "To Paragraph" so that they automatically shift pages as needed. Chapter Numbering doesn't seem to mind this and correctly detects other chapter beginnings, even though each is in its own, separate field.

My problem is that I'm also trying to auto-detect the Section Number & Chapter Name in the footer with a pair of Fields. Unfortunately, Writer doesn't seem to accurately detect which chapter/section a given page is in, and instead tags everything as the last section/chapter in the document.

edit retag flag offensive close merge delete

Comments

and which question is here?

kompilainenn gravatar imagekompilainenn ( 2020-10-10 22:32:11 +0200 )edit

This was the 2.5/3 problem from another question I posted shortly before this, here.

The issue is that Chapter titles placed in frames don't seem to be registered by fields placed in the footer that need to detect them.

For example, on the page where Chapter 1 should begin, I need a footer stating that page falls in Chapter 1. Since "Chapter 1: [Title]" is contained in a frame, instead of on the base document layer, the Chapter field can't seem to find it accurately.

As keme seems to indicate below, I guess this is something that LibreOffice can't really do. It's a bummer, but c'est la guerre.

altasilvapuer gravatar imagealtasilvapuer ( 2020-10-11 05:29:00 +0200 )edit

Having Heading n in frames may work (see the restriction in my answer below) but you can't cross-reference them reliably because you're dealing with multiple text flows.

A text flow must remain consistent and ordered. If an element relative to this order is created and maintained outside the flow, expect "glitches".

ajlittoz gravatar imageajlittoz ( 2020-10-11 10:32:01 +0200 )edit

2 Answers

Sort by » oldest newest most voted
2

answered 2020-10-11 10:22:55 +0200

ajlittoz gravatar image

updated 2020-10-11 10:33:36 +0200

As @keme points out, frames are outside the main text flow. They create secondary flows not supposed to interact with main flow, beyond being laid out at the requested anchor point and eventually flushing text around the frame contour.

As frames are independent from main text flow, Writer does not try to maintain "geographic" consistency between text and frames. This means you must not attempt to link main text and frame contents.

Having Heading n paragraphs or lists shared between frames and text are examples of the forbidden twists. When Writer collects data for the TOC, it does so following its internal chain of pointers. It appears that frames are linked in their order of creation, not in visual order. Consequently, your chapters may be numbered rather surprisingly. See the following illustration.

Bad heading order

Number of columns is an attribute of page styles.

Your case is complex because in the same "unit" (a chapter) you want to mix single- and 2-column layout within the same page. You must then configure your page style on the least constrained requirement, i.e. single column.

Sections are used to temporarily change the layout of a part of a page.

Your design will compel you to create as many sections as Heading n subordinate groups of paragraphs. From your other question, this is the number of Heading 2 headings. I hope you have no higher levels than 2 or you can compose Heading 3+ in 2-column mode to avoid too many sections and or short text broken in two columns which is hard to read.

Unfortunately there is no "section style" which could automate the process.

To show the community your question has been answered, click the ✓ next to the correct answer, and "upvote" by clicking on the ^ arrow of any helpful answers. These are the mechanisms for communicating the quality of the Q&A on this site. Thanks!

In case you need clarification, edit your question (not an answer which is reserved for solutions) or comment the relevant answer.

edit flag offensive delete link more
1

answered 2020-10-10 23:41:22 +0200

keme gravatar image

updated 2020-10-11 11:48:21 +0200

Flawed/less intuitive behavior

Fields in frames seem to pick up states from main document flow at anchor point. Pickup of content from "aside" (frames and conditional content) is not so consistent. Works sometimes.

My workarounds for reliable behavior.

Full width headings and two-column content:

Don't use column setup on "document level". Insert sections and set them to 2 columns. With columns on "section level" you can insert headings in between, or use sections for headings too, as you please. Each section maintains its own column setup.

For the title page, insert a single column, single row table, set height and width to fill the text area and remove borders. A table cell can center content vertically and horizontally.

This pulls your content out of frames and into normal flow of text, which should make all fields detect the "text flow states" properly.

edit flag offensive delete link more

Comments

Are you setting the columns with a direct/manual format edit, or is there an option in Paragraph styles that I'm missing? I've been setting it in the Page styles, because I'm building a template and trying to put as much of it into pre-set styles as possible.

It's a bummer that the fields can't detect the content a frame according to its anchor point, but that's rather what I was afraid would be the case.

altasilvapuer gravatar imagealtasilvapuer ( 2020-10-11 05:26:33 +0200 )edit

Are you setting the columns with a direct/manual format edit, or is there an option in Paragraph styles that I'm missing?

No. I use Insert - Section and set columns there.

As far as I can tell there is no straightforward way to automate section insertion after a heading, nor to apply styles to the section, so this is a manual operation. Not very helpful for your template setup, I'm afraid.

Edit: @ajlittoz' answer provides a more in-depth explanation of what is going on, and a good illustration of the lack of predictability arising from the "structural division" introduced by frames. Worth reading thoroughly!

keme gravatar imagekeme ( 2020-10-11 09:02:42 +0200 )edit
Login/Signup to Answer

Question Tools

1 follower

Stats

Asked: 2020-10-10 21:51:34 +0200

Seen: 64 times

Last updated: Oct 11 '20