11

In typography, there's a practice called 'protrusion' (or hanging punctuation) that allows certain symbols to hang off the end of the margin:

protrusion

I'd like to do the same thing for my text documents.

Can I change fill-paragraph (and friends?) to ignore end-of-line punctuation (.?!:;,'"-) when it fills the paragraph?

  • I'm not sure whether you can really call protrusion (subtle shifting of trailing punctuation) of justified text comparable to ignoring trailing punctuation when hard-wrapping text (which doesn't justify text by default, making the effect essentially invisible). Perhaps you'd like to add that this applies to the justified variant of fill-paragraph? – wasamasa Oct 24 '15 at 7:28
  • @wasamasa Protrusion still exists for flush left text blocks. – Sean Allred Oct 24 '15 at 13:19
  • Does it apply to the left edge of the text then? – wasamasa Oct 24 '15 at 13:26
  • @wasamasa Unless you're dealing with an RTL language and editor (which, while supported, I feel is out-of-scope), it doesn't make sense. If you have a flush right block and you 'run out of room' on the left margin (i.e., column 0), you can't exactly put the punctuation in column -1. (I suppose you could shift the right margin to (1+ fill-column), but that would change the filling and you could get caught in a loop.) – Sean Allred Oct 24 '15 at 13:47
  • Well, no, I'm trying to understand how exactly the protrusion feature is supposed to work for something that's not fully justified text. – wasamasa Oct 24 '15 at 18:02

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Browse other questions tagged or ask your own question.