Bug 150446 - Incorrect behaviour of gutter in mirrored pages with top binding
Summary: Incorrect behaviour of gutter in mirrored pages with top binding
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
7.3.4.2 release
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: Gutter-Margins
  Show dependency treegraph
 
Reported: 2022-08-16 16:31 UTC by ajlittoz
Modified: 2023-02-28 19:33 UTC (History)
6 users (show)

See Also:
Crash report or crash signature:


Attachments
3 pages intended for duplex printing and top binding (11.01 KB, application/vnd.oasis.opendocument.text)
2022-08-16 16:31 UTC, ajlittoz
Details

Note You need to log in before you can comment on or make changes to this bug.
Description ajlittoz 2022-08-16 16:31:53 UTC
Created attachment 181812 [details]
3 pages intended for duplex printing and top binding

Gutter is some space reserved for binding. It is removed from usable area of page to make sure no element would be hidden by the binding device.

Common documents are bound on left. However there are special cases where binding is at top. Gutter is then positioned at top.

Pages may also be duplex printed. Then page style layout is selected as "Mirrored". It is expected that with the indication of top gutter, Writer will understand the intent and reverse top and bottom margins and also distribute alternatively gutter at top and bottom of pages.

Presently, right pages get their gutter at top while left pages have no gutter at all (see attachment). Note also that top and bottom margins are still considered rigidly as top and bottom instead of close to binding and far from binding.

Everything works fine in the traditional configuration of left gutter with mirrored layout (the gutter alternates between sides, always positioned at inner edge, near the binding).

A possible workaround is to separate left and right pages to set differently top and bottom margins, integrating the gutter into margin measurement. But this is rather troublesome since the gutter setting was provided to avoid using separate page styles.

Version: 7.3.4.2
Build ID: 30(Build:2)
CPU threads: 4; OS: Linux 5.18; UI render: default; VCL: kf5 (cairo+xcb)
Locale: fr-FR (fr_FR.UTF-8); UI: en-US
Calc: threaded
Comment 1 Dieter 2022-09-01 07:51:32 UTC
Ajlittoz, thank you for the bug report. Unfortunately I'm not sure, if I grasp you suggestions:
1. Page gutter "Top" doesn't work for left pages in mirrored layout (Page gutter "Left" works)
2. ???

Could you please specify and use one report for each problem? Thank you
=> NEEDINFO
Comment 2 ajlittoz 2022-09-01 09:11:54 UTC
Hi Dieter,

The bug is quite difficult to explain because of a vocabulary problem.

The page style configuration dialog implicitly assumes that binding will be at left edge of right pages and subsequently uses "left" and "right" to make a distinction between alternating pages. "Left" and "right" adequately describe the position of duplex-printed pages relative to the binding in mirrored layout.

When binding is at top, gutter must be positioned at top (selected from "Gutter position:" drop-down menu). Now when we look at a duplex-printed document put on table, we have a "top" page, the binding and a "bottom" page. In mirrored layout, words "top" and "bottom" conceptually replace "left" and "right" respectively.

Remark: I don't think it is necessary to replace "left" and "right" in the page style dialog because it could confuse users (many concepts in Writer already confuse casual users, so it would be detrimental to add a new subtlety). But UX may have a different opinion. (End of remark)

The gutter feature was introduced to "simplify" (?) page layout design, separating the "usable" area from the mechanically-constrained binding gutter. Then margins are really what user perceives as margins without complicated arithmetics. Non symmetric margins can be easily applied both in mirrored and non-mirrored cases.

This works well for "left" binding.

With top binding, in Mirrored context as well as in Right & left (both implying duplex printing), the gutter should be placed at top for "right" page because such a page is located below the binding edge; and at bottom for "left" page as it is located above the binding edge.

For a 'Left' or 'Right' page there is no alternation and gutter should be positioned at bottom and top respectively.

Note there is a flaw in my report. It is correct in duplex-printing context but wrong in single-sided printed. Even in this case we can request a gutter for binding. So the hard point in this report is: how do we characterise duplex-printing so that Writer can apply correct alternation?

I feel that Mirrored is not sufficient. Mirrored is only a simplified convenience. Sophisticated schemes use three page styles: one for the initial page of the sequence, one for left pages and one for right pages; all of them linked by their Next Style parameters.

And in the 3-style case, gutter positioning on left pages is wrong because only Left is possible and Writer doesn't detect the Next style alternation.

Solving this bug will be hard  because the underlying feature probably needs a redesign or at least a deep insight.

Presently, to get the expected result, gutter must be dropped (set to 0) and user must include the gutter width in the Inner margin. But this doesn't work with top binding because the inner and outer margins are still taken as being at left and right instead of top and bottom.

Finally, I don't know if I should change this bug report to complain against the interpretation of gutter "Top" with "Inner" and "Outer" margins which should be flipped from "vertical" to "horizontal" margins.
Comment 3 QA Administrators 2022-09-02 03:39:58 UTC Comment hidden (obsolete)
Comment 4 Dieter 2022-10-31 06:04:40 UTC
I admit, that I'm not very familiar with the gutter position. But please take into account bug 140561 and decision to change term for gutter position to "inner". Can't say how this affects your thinkings about top binding.

Regina, you've added yourself to cc: list. Any ideas?
Comment 5 ajlittoz 2022-10-31 09:06:17 UTC
(In reply to Dieter from comment #4)
> Can't say how this affects your thinkings about top binding.

It can make the whole thing clearer. An "inner" margin is not related to left, right, top or bottom orientation. "Inner" says this space is close to the binding edge.

After some thought, the best way would be to explicitly tell Writer where the binding is: None (single page printing), Left and Top (the latter two implying duplex printing). Maybe RTL text needs also Right and Bottom, but I let this point to experts.
Comment 6 Regina Henschel 2022-10-31 14:52:11 UTC
(In reply to Dieter from comment #4) 
> Regina, you've added yourself to cc: list. Any ideas?

Short version: There is a problem with the combination of gutter position "top" with "mirrored" page layout. Applying the additional gutter distance only to odd pages is surely wrong. What is considered as "correct" behavior has to be discussed in UX.

Longer version:
Only the gutter positions "left" and "right" are included in the page style. And only these positions will be specified in ODF 1.4. The gutter position "top" is the general setting "GutterAtTop" in settings.xml in file and not interpreted by other applications. It was introduced for import/export of docx. A "gutter" in file markup does not add any distances to the margins, but is only an information that application can use to inform document authors/readers of the gutter expected in binding process.

Setting a gutter does not define a binding edge. But the binging edge is defined by the writing-mode. A binding edge is either left or right. A writing-mode with "top" binding edge does not exist.

A "mirrored" page layout does always only affect the right and left margins. Microsoft Word is consequent and disables setting gutter position in case the page layout is "mirrored". From the meaning of "gutter" it makes no sense to have it at an other position than "inner" in case of "mirrored" page layout.

Word has a gutter position "top" in case of normal page layout. So we need a way to keep this information. That is the mentioned setting "GutterAtTop". The so defined distance is always on top, on even and odd pages as well.

Since no writing-mode with "top" binding edge exists, you need to configure the needed margins yourself and use your printer settings to generate a duplex print usable for top binding. The page layout "mirrored" is not suitable for that purpose, but use "only left" and "only right".

These are my personal opinions:
The feature "gutter" is immature and especially for position "top" it is half-baked.

As long as there exist no explicit "top" binding and the gutter position "top" is not part of the page style, the position "top" should be moved to "Expert Configuration" and Options > Writer > Compatibility. In case it is on there, the gutter position selection in the page style dialog should be disabled with an additional info text, that general gutter position is "top" for this document by compatibility settings and that such setting is only useful in docx format.

And in case of "mirrored" page layout we should follow Word and disable the position selection. We could display "inner" as gutter position. At least we should disable position "top" in case of "mirrored" page layout. That is no restriction for docx import/export as the combination of "top" gutter position with "mirrored" page layout is not possible in Word.
Comment 7 Buovjaga 2023-02-24 15:52:21 UTC
(In reply to Regina Henschel from comment #6)
> (In reply to Dieter from comment #4) 
> > Regina, you've added yourself to cc: list. Any ideas?
> 
> Short version: There is a problem with the combination of gutter position
> "top" with "mirrored" page layout. Applying the additional gutter distance
> only to odd pages is surely wrong. What is considered as "correct" behavior
> has to be discussed in UX.

Showing to UX team, then.
Comment 8 ajlittoz 2023-02-26 10:58:58 UTC
(In reply to Regina Henschel from comment #6)
> (In reply to Dieter from comment #4) 
> > Regina, you've added yourself to cc: list. Any ideas?
 
> Setting a gutter does not define a binding edge. But the binging edge is
> defined by the writing-mode. A binding edge is either left or right. A
> writing-mode with "top" binding edge does not exist.

I have many "cheat leaflet" like Summary of Unix Commands or other technical quick-at-a-glance mementos which are spiral-binded at top. They are very handy because they can be fully flipped to the "interesting" page and slipped into shirt waist pocket.

You can't tell such a top binding does not exist.

The samples I have can be handled with linked page styles (to alternate chapter name and page number between top and bottom) without parity to avoid blank page insertion (because left/right is pointless here). However what can't be done is printing upside down on the back of sheets so that the page number is always on the outer edge.

This means you can't print duplex. You first print the odd pages (sheet top), then the even pages (sheet back) in reverse order after orienting correctly the sheets in the printer and hoping for no jam.
Comment 9 Regina Henschel 2023-02-26 13:13:56 UTC
I do not mean, that binding sheets at the top is not possible, but in page style "mirrored" the binding is not at top. If you want to bind at top, you need to define your own page styles and a gutter position "top" would be useless, because you would need the distance alternating at top and bottom.
Comment 10 Heiko Tietze 2023-02-27 09:05:03 UTC
(In reply to Regina Henschel from comment #6)
> These are my personal opinions:
> The feature "gutter" is immature and especially for position "top" it is
> half-baked.
> 
> As long as there exist no explicit "top" binding and the gutter position
> "top" is not part of the page style, the position "top" should be moved to
> "Expert Configuration" and Options > Writer > Compatibility.
We may run into a chicken-egg situation by moving important but not fully working content into the expert configuration. An alternative could be to just disable the option in the UI and/or to show some info text (as commented below...).

> In case it is
> on there, the gutter position selection in the page style dialog should be
> disabled with an additional info text, that general gutter position is "top"
> for this document by compatibility settings and that such setting is only
> useful in docx format.

> And in case of "mirrored" page layout we should follow Word and disable the
> position selection. We could display "inner" as gutter position. At least we
> should disable position "top" in case of "mirrored" page layout. That is no
> restriction for docx import/export as the combination of "top" gutter
> position with "mirrored" page layout is not possible in Word.

Sounds like low hanging fruit.

Miklos is (among many other things) expert for the gutter. What do you think?
Comment 11 Miklos Vajna 2023-02-27 09:29:34 UTC
No objections. The UI exposes the doc model as-is, which is (reading the above comments) too row. Improvements for this indeed would be nice. Thanks.
Comment 12 Miklos Vajna 2023-02-27 09:29:52 UTC
Too raw. :-)
Comment 13 ajlittoz 2023-02-27 09:41:07 UTC
From all the comments above,it looks like the "gutter" parameter is essentially a Word compatibility issue. Then I'd keep it only for documents imported from doc(x).

Writer has its own way to handle this: asymmetrical margins which are alternated either with the "mirrored" parameter in a single page style, or with two linked page styles with switched margins.

So I'd hide the setting for native documents. But I am not sure about its usefulness in imported documents.

Regarding the top binding, it is clearly immature and must handled with "dirty" workarounds. I can live with them.
Comment 14 Eyal Rozenberg 2023-02-28 19:33:53 UTC
(In reply to ajlittoz from comment #2)
> "Left" and "right" adequately
> describe the position of duplex-printed pages relative to the binding in
> mirrored layout.

Ah, well, the thing is, they may not if you consider RTL.

Also, there's the fact that you have "Right and Left" in the page style dialog, but also the styles "Right Page" and "Left Page", which allow for achieving this effect via two distinct, though related, page styles. This is all quite confusing.

But that's not to detract from this important bug, it's just a side-comment.