Writer: punctuation in margins

Does anyone know how to format columns so that punctuation (such as quotation marks, hyphens, etc.) are able to jut out into the margin? Thank you!

I am puzzled.

You are looking to let punctuation be out into the margin but in my version 24.2.7.2 it’s automatically done for some texts.

I am looking for the reverse, to not have punctuation be out into the margin, but I don’t find which option is provinding the choice.

My text is in chinese where punctuation are “full-width” but it shows LO is able to apply, at least on the right margin this “expected by you” and “unexpected by me” behavior.

So why not having an option to choose if applied or not.

Text of the sample is

面试的时候,经理对我印象不错,还通知我明天就可以上班了。真没想到,找工作这么顺利。你想知道面试需要注意什么吗?首先,要穿正式的、衣服

Chinese font is Google Sans Mono CJK, here is the graphical result

Screenshot from 2025-06-03 08-54-35

Attach the sample file corresponding to the screenshot.

Hi Ajlittoz.

Diiging deeper I found the expected option, unfortunately it’s applying only on chinese like content.

So for chinese like content three choices are efficients

  • put punctuation in margin

  • put punctuation at the next line

  • put last character and punctuation at the next line to avoid starting a line with a punctuation

Unfortunately these options are not available for non chinese like content, I tried to enforce chinese like behavior to lorem ipsum without sucess.

At least LO enhancement for latin script content is easy to describe, something like “Please offer the same option for latin script content than for chinese like content”

Sample hanging.odt (49.3 KB)

1 Like

Thanks Ajlittoz

I tried to cheat by forcing language to zh in the XML for “Lorem ipsum” but it didn’t work. It is even harmful as you easily get “General I/O error” when tweaking the XML.

If you submit an enhancement request on Bugzilla; I’ll support it.

You question is not precise enough.

  1. Since you don’t want every paragraph to “outdent” its first character in the margin, you need to create a dedicated paragraph style, ideally derived from Text Body so that any modification made to text body also forward to this style. This new style will have in Indents & Spacing tab a negative First line: indent. The exact value must be empirically set, depending on font face and size. It can’t be an absolute “truth” because the punctuation have not all the same width. Find the best trade-off.
    Apply the style to paragraphs needing it.

  2. Another track is to use drop caps. Once again, for the same reason (not all paragraphs will show drop caps), create a dedicated paragraph style derived from Text Body. In Drop Caps tab, enable drop caps with 1 characters. The Lines: parameter defines the vertical extent of the drop cap.
    Drop caps can be sent in the margins with a negative first line indent, but this negative indent is also in force on all lines making the drop cap which is not very aesthetic, with the added complication of variable punctuation width.

  3. Yet a more convoluted approach allowing more fancy but much more difficult to set up is to type the punctuation in a text frame attached to the paragraph. The frame can be positioned in the margin but getting “in line” with the first line is not immediate. Once the settings are correct, they should be saved in a frame style for other uses (without the pain to set again the parameters).

2 Likes

Don’t work for hyphens.

Can’t set Lines value to 1 (at least in LO 7.1.8.1. Something different with 7.2 or 7.3?).

Could be adapted to hyphens. My upvote for this approach.

I gave it another try after making sure that all AutoCorrect options related to bullet lists are disabled.

There is possibly a bug in handling hyphens in this case (and even all variants of hyphens/dashes/quads). It seems that these punctuations are superscripted too high and the glyph is clipped to the drop cap area leaving only the part below the dash. In addition, font size is magnified which exaggerates the resulting effect (or it may also be possible there is no superscript, only magnification).

This can be demonstrated by assigning character style Drop Caps to the drop cap and customizing said style to subscript. Note that setting font size has no effect because it depends on the number of lines and the parameter is therefore ignored.


EDIT: apologies, I didn’t read carefully the objection and I answered for drop caps. However, negative indents work with hyphens. There is nothing special here with this character or the like. The precaution is to disable all options related to bullet lists in AutoCorrect.

This is inherent to the definition of drop caps. Though there could technically be a difference (by application of character style Drop Caps), it does not make sense in traditional typography.


@LeroyG: thanks for drawing my attention on hyphens. Bug report is tdf#150200.

1 Like

I guess your request is for the typographical technique known as “hung punc(tuation)”.

Characters with little “vertical mass” (often punctuation such as period, comma, hyphen, quotation marks) at the margin will make the margin look jagged if they are perfectly aligned. Hung punctuation compensates for this.

AFAIK there is no smooth solution in LO for this, neither in settings nor by addon. This posting seems to indicate otherwise, but I can’t find any details about it.

It is considered “advanced typography”, so you may find it in DTP apps. AFAIK, LaTeX supports this function, but its implementation is not perfect (not all relevant characters supported).

4 Likes

This is what I was trying to ask about: thank you!

From Misalignement at right margin in libreoffice with linux libertine G with hanging punctuation turned on it seems that some fonts can do artificial hanging punctuation. Linux Libertine is one, in the font bar enter
Linux Libertine G:hang=1
It isn’t perfect but may help

2 Likes

Warning: A mess if do you need to make changes, or if it is a long text.
A table with three columns. Aligns right the first column; and center (text) column, justified.
imagen

1 Like