ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: Richard Mahoney | Indica et Buddhica <rmahoney@indica-et-buddhica.org>
To: Hans Hagen <j.hagen@xs4all.nl>,
	mailing list for ConTeXt users <ntg-context@ntg.nl>
Subject: Re: Space after Round bracket before Punctuation
Date: Fri, 10 Jul 2020 12:09:22 +1200	[thread overview]
Message-ID: <1de9021812dc39009d8dc24b6d707acd12f8c515.camel@indica-et-buddhica.org> (raw)
In-Reply-To: <60f35dfb-e127-d04d-c678-a8c3bfe80d81@xs4all.nl>


[-- Attachment #1.1: Type: text/plain, Size: 3243 bytes --]

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 <j.hagen@xs4all.nl>
To: mailing list for ConTeXt users <ntg-context@ntg.nl>, Richard
Mahoney | Indica et Buddhica <rmahoney@indica-et-buddhica.org>
Subject: Re: [NTG-context] Space after Round bracket before
Punctuation
Date: Thu, 9 Jul 2020 12:21:02 +0200
Mailer: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:68.0)
Gecko/20100101
 Thunderbird/68.10.0
X-Spam-Score: 0.0

On 7/9/2020 11:59 AM, Richard Mahoney | Indica et Buddhica wrote:
> 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/

[-- Attachment #1.2: Type: text/html, Size: 7437 bytes --]

[-- Attachment #2: Type: text/plain, Size: 493 bytes --]

___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : http://contextgarden.net
___________________________________________________________________________________

      reply	other threads:[~2020-07-10  0:09 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-07-09  9:59 Richard Mahoney | Indica et Buddhica
2020-07-09 10:21 ` Hans Hagen
2020-07-10  0:09   ` Richard Mahoney | Indica et Buddhica [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1de9021812dc39009d8dc24b6d707acd12f8c515.camel@indica-et-buddhica.org \
    --to=rmahoney@indica-et-buddhica.org \
    --cc=j.hagen@xs4all.nl \
    --cc=ntg-context@ntg.nl \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).