Frame style in facing-pages layout: how to get the same wrap spacing on the text side on both even and odd pages? (new version of the question)

Hello,
I’m laying out a double-sided book (A4, page style set to “Mirrored”). Each illustration sits in a frame one third of the text width, anchored to a paragraph. The image must always be on the outside of the page (right on odd pages, left on even pages), with a 4 mm gap between the image and the wrapping text.

Frame style settings
Width: 52.5 mm, autofit height
Wrap: Parallel
Position tab, horizontal: Outside, relative to Text area (page text boundaries)
“Mirror on even pages” checked (without it, only Left/Right are offered)

What works
With wrap spacing Left = 0 mm, Right = 0 mm, the image sits correctly against the outer edge on both even and odd pages.

The problem
With a left spacing of 4 mm only, the spacing stays on the left on even pages, so the gap ends up on the margin side instead of the text side.
With 4 mm on both sides, the image is shifted 4 mm inward from the outer edge of the text area, which breaks the alignment.

Questions
Is there a setting that mirrors the wrap spacing on even pages, as the “Outside” position does?
If not, what is the usual workaround to get a constant gap on the text side using a single frame style? I’d like to avoid two separate styles (one for even pages, one for odd pages) that must be reassigned by hand whenever the pagination changes, as I have about 115 illustrations.

Version: LibreOffice 26.8.1.1, macOS 26.6.2.
I attach a test ODT file.

Thanks in advance.
English is not my first langage, so I used an AI to help me write this.

Test Frame style.odt (3.5 MB)

I modified Cadre extérieur 1/3 frame to be 0.4 cm wider and then set the 0.45 cm wrap to 0.0 cm
.
I right clicked frame style Graphics and selected Edit Style. In Type tab

  • Under Position, I ticked Mirror on even pages.
  • I then chose Outside for Horizontal position. OK

That won’t change the position or appearance of the image, the easiest way to apply the changes are to delete and re-import the image. It should appear aligned to the outside edge of the outer frame.
.
The caption style, Légende illustration, will have to be centred and have indents of 0.4 cm at the start and the end of the line or it will extend into the empty portion of the frame.

TestFrameStyle138761EA.odt (606.9 KB)

[Edit]
It is a very large file because the Page style Couverture has a png embedded as background. Save the png as a jpg and then delete the page style. Create a new Couverture page style but embed the jpg instead to save 3MB of file space.


J’ai modifié le style de cadre « Cadre extérieur 1/3 » pour qu’il soit plus large de 0,4 cm, puis j’ai réglé l’Espacement (fixé à 0,45 cm) sur 0,0 cm.
.
J’ai fait un clic droit sur le style de cadre « Images » et sélectionné « Éditer le style ». Dans l’onglet « Type » :

Sous « Position », j’ai coché « En vis-a-vis sur les pages paires ».
Ensuite, j’ai choisi « Extérieur » pour la position horizontale. OK.

Cela ne modifiera pas la position ni l’apparence de l’image ; la méthode la plus simple pour appliquer les changements consiste à supprimer l’image, puis à l’importer à nouveau. Elle devrait alors apparaître alignée sur le bord extérieur du cadre.
.
Le style de légende, « Légende illustration », devra être centré et comporter des retraits de 0,4 cm au début et à la fin de la ligne ; sinon, il s’étendra dans la partie vide du cadre.

TestFrameStyle138761EA.odt (606,9 ko)

[Modification]
Le fichier est très volumineux car le style de page « Couverture » contient une image PNG intégrée en arrière-plan. Enregistrez ce PNG au format JPG, puis supprimez le style de page. Créez un nouveau style de page « Couverture » en y intégrant le fichier JPG ; vous gagnerez ainsi 3 Mo d’espace.

1 Like

Thank you very much.

Your layout specification requires consistency between page and frame styles.

Presently, Courante page style is valid for For right and left and this does not alternate your asymmetric left and right margins.

You should set Page layout to Mirrored and adjust your margins accordingly (I chose the wider margin as the inner one; your text area width is 15.75 cm).

When you configure Cadre extérieur 1/3 frame style, you must cope with an inconsistency in parameters: mirrored can be set in Type tab but Spacing in Wrap tab remains left/right, not inner/outer. Consequently, I set both Spacing Left and Right to the same 0.45 cm width.

In Type, I reset Anchor To paragraph because your specification involves only paragraph characteristics. Anchor To character is a bit more difficult to tune and is liable to cause problems in vicinity of page break (at bottom).

Since you want to align on paragraph limit, I use Horizontal Paragraph text area which automatically takes into account page margin and paragraph indent, thus ensuring you align with text limit. Then I select From inside to position the frame at 10.45 cm (page text width - frame width; this should be adjusted if you have some paragraph indent). Spacing is inserted around this position: text-side this will push away your text; margin-side spacing is added inside the margin.

Vertically, I’d recommend to use Paragraph text area instead od Entire paragraph area so that your frame aligns with top of text when you have spacing above.

Talking about spacing, using empty paragraphs to space apart paragraphs is an error. These empty paragraphs will play nasty tricks on your back when you edit your text. They will cause erratic positioning of significant paragraphs at top or bottom of pages. Set both spacing above and below in paragraph styles.

How to use the new frame style?

Your existing frames are plagued with direct formatting (DF). DF is already a nightmare on text, but it is hellishly catastrophic on frames. To get rid of it, apply Frame on your existing frames, then Cadre extérieur 1/3.

Here is your fixed sample: Test Frame style-ajl.odt (3.5 MB)


Courtesy translation

Votre mise en page exige une cohérence entre les styles de page et cadre.

Actuellement, Courante est valide à la fois pour les pages gauches et droites, ce qui ne permet pas l’alternance de vos marges dissymétriques.

Vous devriez demander une disposition en miroir et ajuster les marges (j’ai choisi la plus large comme marge intérieure; cela laisse 15,75 cm).

Quand vous configurez Cadre extérieur 1/3, vous devez tenir compte d’une incohérence dans le paramétrage: en miroir peut être demandé dans Type mais l’espacement dans Wrap reste exprimé en gauche/droite et non intérieur/extérieur. Par conséquent, je donne une largeur égale de 0,45 cm à gauche et droite pour éviter les difficultés.

Dans Type, je rétablis l’ancrage à Paragraphe car votre specification ne concerne que des propriétés de paragraphe. L’ancrage Caractère est un peu plus difficile à régler et peut donner lieu à des soucis au voisinage des changement de page (en bas de page).

Comme vous voulez aligner le cadre sur la limite textuelle du paragraphe, j’utilise en horizontal Paragraph text area qui tient compte automatiqument de la marge de page et de l’indentation du paragraphe, garantissant ainsi l’alignement avec la limite du text. Je sélection From inside pour positionner le cadre à 10,45 cm (largeur du texte dans la page - largeur du cadre; ajustez si vous avez une indentation/marge additionnelle de paragraphe). L’espace de dégagement est ajouté autour de cette position: coté text, cela le repousse; côté marge, l’espacement apparaît dans la marge.

Verticalement, je recommande Paragraph text area au lieu de Entire paragraph area de façon que votre cadre s’aligne avec le sommet du text quand vous avez un espacement au-dessus.

À propos d’espacement vertical, le faire avec des paragraphes vides est une erreur. Ces paragraphes vides vont jouer de vilains tours quand vous révisez votre texte. Ils vont causer des changements de position impromptus de paragraphes significatifs au hauts ou bas de page. Définissez l’espacement au-dessus et en-dessous dans les styles de paragraphe.

Comment utiliser le nouveau style de cadre?

Vos cadres sont infectés de formatage direct (FD). FD est déjà un cauchemar sur le texte mais se transforme en catastrophe infernale sur les cadres. Pour se débarasser du FD, vous devez appliquer un autre style d’abord, par ex. Frame, puis votre style cible Cadre extérieur 1/3.

Voir le document d’exemple corrigé.

1 Like