Space after Round bracket before Punctuation
I'm typesetting some proceedings which include a good number of round brackets followed by punctuation. This often occurs in the body of the text, but also in the hand coded bibliographies, e.g.: ) plus . , ; : The trouble is that excessive space is often introduced between the bracket and the punctuation. I can control the excessive space that sometimes occurs between ) and . by using )\periods[1], although this ruins the protrusion if it occurs at the end of a line. Does anyone know how I might be able to somehow "tie" ) to . , ; : so that the distance remains reasonable, and so that protrusion still works? Best, Richard -- Richard Mahoney | Indica et Buddhica Littledene Bay Road Oxford NZT: +64 3 312 1699 M: +64 210 640 216IM: @rmahoney https://t.me/rmahoneyrmahoney@indica-et-buddhica.org https://indica-et-buddhica.org/
On 7/9/2020 11:59 AM, Richard Mahoney | Indica et Buddhica wrote:
I'm typesetting some proceedings which include a good number of round brackets followed by punctuation. This often occurs in the body of the text, but also in the hand coded bibliographies, e.g.:
) plus . , ; :
The trouble is that excessive space is often introduced between the bracket and the punctuation. I can control the excessive space that sometimes occurs between ) and . by using )\periods[1], although this ruins the protrusion if it occurs at the end of a line.
Does anyone know how I might be able to somehow "tie" ) to . , ; : so that the distance remains reasonable, and so that protrusion still works? you first have to make an MWE that demonstrates how protrusion works here ... then we can see how we can best deal with it
Anyway, often tricks for this can be found in the test suite of font manual(s) ... here is a variant ... \startluacode fonts.handlers.otf.addfeature { name = "mykerns", type = "kern", data = { [")"] = { [","] = -300, ["."] = -300, [":"] = -250, [";"] = -250, [")"] = -100, }, }, } \stopluacode \definefontfeature[default][default][mykerns=true] \setupbodyfont [dejavu,12pt] \startTEXpage[offset=10pt] whatever), whatever): whatever); whatever). whatever)) \stopTEXpage Hans ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl -----------------------------------------------------------------
Thank you Hans, this was very helpful. I found that the following
worked (apart from in two or three cases):
\startluacode
fonts.handlers.otf.addfeature {
name = "iebpkerns",
type = "kern",
data = {
[")"] = {
[","] = -80,
["."] = -80,
[":"] = -80,
[";"] = -80,
[")"] = -80,
["]"] = -80,
},
["]"] = {
[","] = -80,
["."] = -80,
[":"] = -80,
[";"] = -80,
[")"] = -80,
["]"] = -80,
},
},
}
\stopluacode
Best, Richard
-----Original Message-----
From: Hans Hagen
I'm typesetting some proceedings which include a good number of roundbrackets followed by punctuation. This often occurs in the body of thetext, but also in the hand coded bibliographies, e.g.: ) plus . , ; : The trouble is that excessive space is often introduced between thebracket and the punctuation. I can control the excessive space thatsometimes occurs between ) and . by using )\periods[1], although thisruins the protrusion if it occurs at the end of a line. Does anyone know how I might be able to somehow "tie" ) to . , ; : sothat the distance remains reasonable, and so that protrusion stillworks? you first have to make an MWE that demonstrates how protrusion works here ... then we can see how we can best deal with it Anyway, often tricks for this can be found in the test suite of font manual(s) ... here is a variant ... \startluacode fonts.handlers.otf.addfeature { name = "mykerns", type = "kern", data = { [")"] = { [","] = -300, ["."] = -300, [":"] = -250, [";"] = -250, [")"] = -100, }, }, }\stopluacode \definefontfeature[default][default][mykerns=true] \setupbodyfont [dejavu,12pt] \startTEXpage[offset=10pt] whatever), whatever): whatever) ; whatever). whatever))\stopTEXpage Hans
-- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl ----------------------------------------------------------------- -- Richard Mahoney | Indica et Buddhica Littledene Bay Road Oxford NZT: +64 3 312 1699 M: +64 210 640 216IM: @rmahoney https://t.me/rmahoneyrmahoney@indica-et-buddhica.org https://indica-et-buddhica.org/
participants (2)
-
Hans Hagen
-
Richard Mahoney | Indica et Buddhica