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!
fontspecandmicrotype.« No, see Differences between LuaTeX, ConTeXt and XeTeX – Henri Menke Oct 29 '17 at 20:02\strutdoes that fix the problem? Note that\strut(as with most TeX commands) gobbles the space that immediately follows. If this works, it is not practical for a large number of manually-edited paragraphs, but it might help us to debug your problem. – Oct 29 '17 at 22:20And also, see the update in the post. Thank you for your suggestion, it is actually what I did, in the big document (I am still before my first coffee, and somehow couldn't reproduce it with replicating the section in another document).
– D. Kovács Oct 30 '17 at 06:43\hsizefor 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 07:44