Re: [NTG-context] Microtipography

2022-05-25 Thread Denis Maier via ntg-context
Just a quick addition to Henri’s answer : You can also define your own align 
definition, see https://www.mail-archive.com/ntg-context@ntg.nl/msg100832.html

That will probably make your life a bit easier.

Best,
Denis

Von: ntg-context  Im Auftrag von Tommaso Gordini 
via ntg-context
Gesendet: Mittwoch, 25. Mai 2022 17:06
An: mailing list for ConTeXt users 
Cc: Tommaso Gordini 
Betreff: Re: [NTG-context] Microtipography

Thank you, Henri!

Tommaso

Il mer 25 mag 2022, 16:59 Henri Menke via ntg-context 
mailto:ntg-context@ntg.nl>> ha scritto:
On Wed, 2022-05-25 at 15:51 +0200, Tommaso Gordini via ntg-context
wrote:
> Hello list,
>
> here and there on the Net there are slightly different ways to
> activate the
> microtypography functionality in a ConTeXt document.
>
>  My question is: what is the most correct and clean way to do it?

I do not claim that this is the cleanest way. Probably it's better to
define a separate font feature for microtypography rather than
overwriting the default set, but this definitely works:

   \definefontfeature[default][default]
 [protrusion=quality,
  expansion=quality]

   \setupbodyfont[modern] % or whatever

   \setupalign[hz,hanging]

Unfortunately the global alignment settings do not propagate into
certain structures. For example itemizations, captions, and
bibliographies just reset it and need special treatment:

   \setupitemize[each][align={hz,hanging}]
   \setupbtxlist[align={hz,hanging,tolerant}]
   \setupcaption[figure][align={justified,hz,hanging}]

I think captions are not justified by default, so that might or might
not matter to you. Bibliographies are usually full or names and
academic words that do not hyphenate well, so adding tolerant relaxes
that a little bit.

Cheers, Henri

>
> Thanks in advance
> Tommaso
> _
> __
> If your question is of interest to others as well, please add an
> entry to the Wiki!
>
> maillist : ntg-context@ntg.nl<mailto: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
> _
> __
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl<mailto: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
___
___
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
___


Re: [NTG-context] Microtipography

2022-05-25 Thread Tommaso Gordini via ntg-context
Thank you, Henri!

Tommaso

Il mer 25 mag 2022, 16:59 Henri Menke via ntg-context 
ha scritto:

> On Wed, 2022-05-25 at 15:51 +0200, Tommaso Gordini via ntg-context
> wrote:
> > Hello list,
> >
> > here and there on the Net there are slightly different ways to
> > activate the
> > microtypography functionality in a ConTeXt document.
> >
> >  My question is: what is the most correct and clean way to do it?
>
> I do not claim that this is the cleanest way. Probably it's better to
> define a separate font feature for microtypography rather than
> overwriting the default set, but this definitely works:
>
>\definefontfeature[default][default]
>  [protrusion=quality,
>   expansion=quality]
>
>\setupbodyfont[modern] % or whatever
>
>\setupalign[hz,hanging]
>
> Unfortunately the global alignment settings do not propagate into
> certain structures. For example itemizations, captions, and
> bibliographies just reset it and need special treatment:
>
>\setupitemize[each][align={hz,hanging}]
>\setupbtxlist[align={hz,hanging,tolerant}]
>\setupcaption[figure][align={justified,hz,hanging}]
>
> I think captions are not justified by default, so that might or might
> not matter to you. Bibliographies are usually full or names and
> academic words that do not hyphenate well, so adding tolerant relaxes
> that a little bit.
>
> Cheers, Henri
>
> >
> > Thanks in advance
> > Tommaso
> > _
> > __
> > 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
> > _
> > __
>
> ___
> 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
>
> ___
>
___
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
___


Re: [NTG-context] Microtipography

2022-05-25 Thread Henri Menke via ntg-context
On Wed, 2022-05-25 at 15:51 +0200, Tommaso Gordini via ntg-context
wrote:
> Hello list,
> 
> here and there on the Net there are slightly different ways to
> activate the
> microtypography functionality in a ConTeXt document.
> 
>  My question is: what is the most correct and clean way to do it?

I do not claim that this is the cleanest way. Probably it's better to
define a separate font feature for microtypography rather than
overwriting the default set, but this definitely works:

   \definefontfeature[default][default]
 [protrusion=quality,
  expansion=quality]
   
   \setupbodyfont[modern] % or whatever
   
   \setupalign[hz,hanging]

Unfortunately the global alignment settings do not propagate into
certain structures. For example itemizations, captions, and
bibliographies just reset it and need special treatment:

   \setupitemize[each][align={hz,hanging}]
   \setupbtxlist[align={hz,hanging,tolerant}]
   \setupcaption[figure][align={justified,hz,hanging}]

I think captions are not justified by default, so that might or might
not matter to you. Bibliographies are usually full or names and
academic words that do not hyphenate well, so adding tolerant relaxes
that a little bit.

Cheers, Henri

> 
> Thanks in advance
> Tommaso
> _
> __
> 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
> _
> __
___
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
___


[NTG-context] Microtipography

2022-05-25 Thread Tommaso Gordini via ntg-context
Hello list,

here and there on the Net there are slightly different ways to activate the
microtypography functionality in a ConTeXt document.

 My question is: what is the most correct and clean way to do it?

Thanks in advance
Tommaso
___
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
___