My setup is LuaLaTex with fontspec and microtype.

I would like to overwrite the default protrusion settings of microtype for the font I am using.

As there are no font-specific defaults defined, I started off with copying the whole \SetProtrusion definition from microtype.cfg (designated with name = default) into my document's preamble.

Outdated and incorrect description of the problem. See update below.

However, I noticed that after copying, the first character of an indented paragraph gets out-kerned too; which is not the case if I rely on the default settings coming from microtype itself. This means, that for example every quote/dialogue gets out-kerned ("protrusioned?"), because these paragraphs start with a right-quote.

How does microtype turn off the protrusion for the first character in a paragraph? Can I copy this behaviour somehow, when I am defining a protrusion table myself?

Update: reactions to the comments

OK, I am having problems with creating a minimal working example. As in: I cannot reproduce the problem with a small example. I have been doing a little more debugging, and it is actually more subtle than I ever anticipated. Using \strut does not fix the problem.

The problem is as follows: I have a big body of text which is already typeset. I wanted to adjust some of the protrusion settings (I know, it should be done the other way around, first the settings, then the typesetting). For this, I copied the whole \SetProtrusion table from mictrotype.cfg into my preamble, without changing anything.

In around 2 per mille of the paragraph I get an underfull hbox, which is expected.

However, in 0.375 per mille (roughly 3 out of 8000) of the paragraphs, I get an overfull hbox! Some of the lines are re-flowed, after copying the protrusion table from the standard microtype environment into my document. I looked more closely and I cannot see any changes in protrusion in the document, so I cannot explain this change in spacing (yes, the now overfull lines are more densily spaced than beforehand).

I know, that without a working example this is hard to judge, if anybody has ideas, they are welcome, otherwise thank you for your attention!

Update: I think I found it, but it's kinda crazy

I played around with the protusion settings a little bit (based on the log file, I assumed that the default protrusion settings are used, probably I am mistaken!). One of the newly overfull lines is ending with a comma, and for commas there is an entry in the protrusion table: {,}= { ,650}. If I am not mistaken, this means, that the comma is margin-kerned with 65% of its own width. If I have this in the protrusion settings, then this line is re-flowed. If I remove this, then the line is not re-flowed, however, the comma is not out-kerned.

This means, that in the "real" settings which are used during typesetting, the protrusion for the comma is less than 650, as with 650 the first word of the next line ("he") is put into this line, otherwise an underfull would occur, because of spacing.

I would close this as a PEBKAC: the assumption that the standard protrusion setting is in effect was false.

Thank you all for being my rubber duck!

closed as unclear what you're asking by Stefan Kottwitz Oct 30 '17 at 17:39

Please clarify your specific problem or add additional details to highlight exactly what you need. As it's currently written, it’s hard to tell exactly what you're asking. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.

  • »Context is LuaLaTex with fontspec and microtype.« No, see Differences between LuaTeX, ConTeXt and XeTeX – Henri Menke Oct 29 '17 at 20:02
  • @HenriMenke: sorry, I mean that my setup is. I will rephrase. – D. Kovács Oct 29 '17 at 20:53
  • your question would be a lot easier to understand if you showed a small complete document, and the output that you with to get from that document. (in particular can you reproduce this with any standard font that people can test with) – David Carlisle Oct 29 '17 at 21:36
  • 1
    it is hard to see why you can not make a reproducible example. Line breaking is specific to a paragraph so if you take a copy of your original document, delete everything except one bad paragraph, and ensure that \hsize for that paragraph in the new document is the same as in the original document context, then the linebreaking will show the same behaviour. – David Carlisle Oct 30 '17 at 7:44
  • 1
    Closed as requested. I just cannot edit the closing reason stated below the question, I hope it causes no confusion. – Stefan Kottwitz Oct 30 '17 at 17:40