ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: "Simonyi András" <andras.simonyi@gmail.com>
To: Hans Hagen <pragma@wxs.nl>, ntg-context@ntg.nl
Subject: Re: Modifying potrusion parameters
Date: Sun, 6 Nov 2011 20:53:42 +0100	[thread overview]
Message-ID: <CAOWRwxDaQ2eAAJQc78zvZGYJWyb6PtTqZZr_WMsA4YkMCUd5_w@mail.gmail.com> (raw)
In-Reply-To: <4EB6891C.3080205@wxs.nl>

Dear Hans,
thanks a lot, your Lua code did the trick.

with best wishes,
Andras

2011/11/6 Hans Hagen <pragma@wxs.nl>:
> On 6-11-2011 13:52, Simonyi András wrote:
>>
>> Dear ConTeXt-ers,
>>
>> I am using protrusion and char. expansion for a book project (with
>> MKIV from the latest ConTeXt minimal), and it works wonderfully, with
>> the exception of a minor problem: I find the preset protrusion
>> parameters for  "guillemets" (double angle quotes)  which occur
>> frequently in my (Italian) text
>> too large, and would like to modify them.  Relying on the wiki and
>> mailing-list posts, I realised that the parameters are set in the file
>> font-ext.lua, but changing this file seems to have no effect on the
>> typesetting. How should I rebuild/recompile ConTeXt in order to
>> "apply" my changes?
>>
>> I am a novice ConTeXt  user, so please forgive me if my question is
>> trivial.
>
> There is no need to change that file, just make a new vector in your style.
>
> \startluacode
>
> local classes = fonts.protrusions.classes
> local vectors = fonts.protrusions.vectors
>
> classes.myown = {
>    vector = 'myown',
>    factor = 1,
> }
>
> vectors.myown = table.merged (vectors.quality, {
>    [0x002C] = { 0, 2 }, -- comma
> })
>
> \stopluacode
>
> \starttext
>
> \showframe
>
> \definefontfeature[whatever][default][protrusion=quality]
>
> \definedfont[Serif*whatever] \setupalign[hanging] \input tufte
>
> \definefontfeature[whatever][default][protrusion=myown]
>
> \definedfont[Serif*whatever] \setupalign[hanging] \input tufte
>
> \stoptext
___________________________________________________________________________________
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://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


      reply	other threads:[~2011-11-06 19:53 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-11-06 12:52 Simonyi András
2011-11-06 13:18 ` Hans Hagen
2011-11-06 19:53   ` Simonyi András [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=CAOWRwxDaQ2eAAJQc78zvZGYJWyb6PtTqZZr_WMsA4YkMCUd5_w@mail.gmail.com \
    --to=andras.simonyi@gmail.com \
    --cc=ntg-context@ntg.nl \
    --cc=pragma@wxs.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).