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. Thanks in advance for your help and best wishes, András Simonyi, Budapest, Hungary
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 ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com | www.pragma-pod.nl -----------------------------------------------------------------
Dear Hans,
thanks a lot, your Lua code did the trick.
with best wishes,
Andras
2011/11/6 Hans Hagen
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
participants (2)
-
Hans Hagen
-
Simonyi András