Footer not aligning in landscape page style

When in Writer (24.8.2.1) with a portrait page style I can easily use two or three column headers & footers which line up correctly with left & right margins. This doesn’t seem to work in landscape mode.

To reproduce, make a new doc, switch to landscape page style, activate footer & enter text, tabbing across for multiple columns. It seems aligned as if its still in portrait mode? This seems like something that should automatically switch when the page style or orientation is switched…

Please upload your ODF type sample file here.

The problem is not in the page style but in paragraph styles. There are various styles for footers and headers (look at the list in the style side pane). They all descend from Header and Footer which define various parameters shared by all these styles.

I don’t know the technical details but I guess that when you create a document, the default paper format (A4, Letter, …) and margins are used to initialise tab stops in Header & Footer: one at centre, one at right.

Settings in styles are static. This means that they don’t change (automatically) once they are initialised.

In any page, by default, a header is styled Header, using the configuration of the style. Obviously, since it was initialised with portrait orientation, distances are incorrect for landscape.

The solution is to create a paragraph style (or a set of) fit for landscape and to apply it on the landscape header(s). Note the possible plural form because the same style can be applied over header in several page styles when the print width is the same (paper width minus margins).

1 Like

imagen

After testing a few minutes ago, I learned that if —in a new document— first I change de paper size, and then activate the header, the tab stops gets the correct position.

1 Like

@LeroyG yes but once Header (and Footer) has initialised, it is “frozen” in this configuration. It is impossible to handle mixed layout, both portrait and landscape orientation in the same document, with only built-in Header. You must create new paragraph style for the other orientation.

OP didn’t mention if the whole document is landscape (in which case your observation solves the issue) or is mixed (needing two or two sets of paragraph styles).


Personal comment: this illustrates the shortcoming of our mechanical typewriter-era cultural legacy. Tab stops are only considered relative to origin of reading direction (because typewriter carriage could only move so).

With sophisticated layout possibilities offered by “modern” technology, we should redefine tab stops as being relative to some user-chosen origin: left indent (reverse for RTL), right indent or more generally some percentage of either page width between margins or paragraph width between indents.

For example, origin 0% if at left “edge”, 100% at right “edge”, 50% at centre. Stop distance is relative to this origin, positive in reading direction, negative otherwise (therefore allowing for a stop at left of indent when first line is hanging).

Of course, this seriously complicates sorting stops because we have a mix with different origins. The UI should show them sorted by absolute distance while allowing to tell which origin is referenced. Internally, all stops are converted to “absolute”.

Updating a style is probably not more difficult than now. But the acute problem is stops become context-dependent. Take the example of Header where we redefine the stops as (50%, 0cm) = centre and (100%, 0cm) = right, indents 0cm, 0cm. It is obvious that the absolute distance, counted as usual from left, is not the same in a portrait or landscape page of same size. How can this be simply solved? What is the impact of changes either in page style or paragraph style on reflow performance?

2 Likes

Worth of an enhancement request.
EDIT: tdf#164097

I remember having submitted one about it some years ago but I can’t find it back in Bugzilla. Anyway, it was rejected as “not defined in ODF”.