ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* Re: Protrusion cancellation by index term
       [not found] <00c301cf2f67$2df79150$89e6b3f0$@tosovsky@email.cz>
@ 2014-02-22 13:38 ` Jan Tosovsky
       [not found] ` <000f01cf2fd3$532e9380$f98bba80$@tosovsky@email.cz>
  1 sibling, 0 replies; 15+ messages in thread
From: Jan Tosovsky @ 2014-02-22 13:38 UTC (permalink / raw)
  To: 'mailing list for ConTeXt users'

On 2014-02-22 Jan Tosovsky wrote:
>
> when a punctuated phrase appears at the beginning of the line, it is
> not protruded correctly when preceded by an index term.
> 
> ... \index{foo}>Bar< ...
> 
> A minimal example is available at
> http://drifted.in/other/sample.tex
> 
> I cannot place the space character between these two parts (which
> helps) as I sometimes need to join this and the previous phrase with 
> the non-breaking space.
> 

It is more serious issue than expected. Consider next two variants:

(1) sentence, \index{primary}>Primary< 
(2) sentence,\index{primary} >Primary<

When the line is broken after a comma:
ad 1) starting guillemet is not protruded
ad 2) ending comma is not protruded

When \index is surrounded by spaces from both sides, the space is rendered
at the beginning of the next line (resulting in 'indenting').

:-S

I'd be grateful for ignoring any non document content preceding punctuation
to avoid its influence on protrusion.

Thanks, Jan

___________________________________________________________________________________
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
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: Protrusion cancellation by index term
       [not found] ` <000f01cf2fd3$532e9380$f98bba80$@tosovsky@email.cz>
@ 2014-02-23  9:57   ` Hans Hagen
  2016-03-21 21:59     ` Jan Tosovsky
       [not found]     ` <01ac01d183bc$f2213d50$d663b7f0$@tosovsky@email.cz>
  0 siblings, 2 replies; 15+ messages in thread
From: Hans Hagen @ 2014-02-23  9:57 UTC (permalink / raw)
  To: ntg-context

On 2/22/2014 2:38 PM, Jan Tosovsky wrote:
> On 2014-02-22 Jan Tosovsky wrote:
>>
>> when a punctuated phrase appears at the beginning of the line, it is
>> not protruded correctly when preceded by an index term.
>>
>> ... \index{foo}>Bar< ...
>>
>> A minimal example is available at
>> http://drifted.in/other/sample.tex
>>
>> I cannot place the space character between these two parts (which
>> helps) as I sometimes need to join this and the previous phrase with
>> the non-breaking space.
>>
>
> It is more serious issue than expected. Consider next two variants:
>
> (1) sentence, \index{primary}>Primary<
> (2) sentence,\index{primary} >Primary<
>
> When the line is broken after a comma:
> ad 1) starting guillemet is not protruded
> ad 2) ending comma is not protruded
>
> When \index is surrounded by spaces from both sides, the space is rendered
> at the beginning of the next line (resulting in 'indenting').
>
> :-S
>
> I'd be grateful for ignoring any non document content preceding punctuation
> to avoid its influence on protrusion.

well, think of it like this:

[something]<text>[something else]

with [something] being bound to < ... so that is then the boundary of 
the word, not < ... i might know a solution (but such -major- changes 
have to fit into my schedule)

Hans

-----------------------------------------------------------------
                                           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
-----------------------------------------------------------------
___________________________________________________________________________________
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
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: Protrusion cancellation by index term
  2014-02-23  9:57   ` Hans Hagen
@ 2016-03-21 21:59     ` Jan Tosovsky
       [not found]     ` <01ac01d183bc$f2213d50$d663b7f0$@tosovsky@email.cz>
  1 sibling, 0 replies; 15+ messages in thread
From: Jan Tosovsky @ 2016-03-21 21:59 UTC (permalink / raw)
  To: 'mailing list for ConTeXt users'

On 2014-02-23 Hans Hagen wrote:
> On 2/22/2014 2:38 PM, Jan Tosovsky wrote:
> > On 2014-02-22 Jan Tosovsky wrote:
> > >
> > > when a punctuated phrase appears at the beginning of the line, 
> > > it is not protruded correctly when preceded by an index term.
> > >
> > > ... \index{foo}>Bar< ...
> > >
> > > A minimal example is available at
> > > http://drifted.in/other/sample.tex
> > >
> > > I cannot place the space character between these two parts 
> > > (which helps) as I sometimes need to join this and the previous 
> > > phrase with the non-breaking space.
> > >
> >
> > It is more serious issue than expected. Consider next two 
> > variants:
> >
> > (1) sentence, \index{primary}>Primary<
> > (2) sentence,\index{primary} >Primary<
> >
> > When the line is broken after a comma:
> > ad 1) starting guillemet is not protruded
> > ad 2) ending comma is not protruded
> >
> > When \index is surrounded by spaces from both sides, the space is
> > rendered at the beginning of the next line (resulting in 
> > 'indenting').
> >
> > I'd be grateful for ignoring any non document content preceding
> > punctuation to avoid its influence on protrusion.
> 
> well, think of it like this:
> 
> [something]<text>[something else]
> 
> with [something] being bound to < ... so that is then the boundary of
> the word, not < ... i might know a solution (but such -major- changes
> have to fit into my schedule)

are there any improvements here with revamped token processing implemented
in recent versions?

Thanks, Jan

___________________________________________________________________________________
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
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: Protrusion cancellation by index term
       [not found]     ` <01ac01d183bc$f2213d50$d663b7f0$@tosovsky@email.cz>
@ 2016-03-22 16:48       ` Hans Hagen
  2016-03-30 19:53         ` Jan Tosovsky
       [not found]         ` <017c01d18abd$c8d37b90$5a7a72b0$@tosovsky@email.cz>
  0 siblings, 2 replies; 15+ messages in thread
From: Hans Hagen @ 2016-03-22 16:48 UTC (permalink / raw)
  To: mailing list for ConTeXt users

On 3/21/2016 10:59 PM, Jan Tosovsky wrote:
> On 2014-02-23 Hans Hagen wrote:
>> On 2/22/2014 2:38 PM, Jan Tosovsky wrote:
>>> On 2014-02-22 Jan Tosovsky wrote:
>>>>
>>>> when a punctuated phrase appears at the beginning of the line,
>>>> it is not protruded correctly when preceded by an index term.
>>>>
>>>> ... \index{foo}>Bar< ...
>>>>
>>>> A minimal example is available at
>>>> http://drifted.in/other/sample.tex
>>>>
>>>> I cannot place the space character between these two parts
>>>> (which helps) as I sometimes need to join this and the previous
>>>> phrase with the non-breaking space.
>>>>
>>>
>>> It is more serious issue than expected. Consider next two
>>> variants:
>>>
>>> (1) sentence, \index{primary}>Primary<
>>> (2) sentence,\index{primary} >Primary<
>>>
>>> When the line is broken after a comma:
>>> ad 1) starting guillemet is not protruded
>>> ad 2) ending comma is not protruded
>>>
>>> When \index is surrounded by spaces from both sides, the space is
>>> rendered at the beginning of the next line (resulting in
>>> 'indenting').
>>>
>>> I'd be grateful for ignoring any non document content preceding
>>> punctuation to avoid its influence on protrusion.
>>
>> well, think of it like this:
>>
>> [something]<text>[something else]
>>
>> with [something] being bound to < ... so that is then the boundary of
>> the word, not < ... i might know a solution (but such -major- changes
>> have to fit into my schedule)
>
> are there any improvements here with revamped token processing implemented
> in recent versions?

it's not that trivial

- for the index we can cheat a bit but then i also need to check lots of 
other cases for possible interference

- for the footnote case there is no real solution as the heuristics of 
finding a protrusion character cannot be tricked too much without 
breaking it in other cases

but ... i think i can cook up something extra in the engine to drive the 
process; i'll play with it but again. it will take a lot of testing so 
it will then probably be an option for a while

Hans

-----------------------------------------------------------------
                                           Hans Hagen | PRAGMA ADE
               Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
       tel: 038 477 53 69 | www.pragma-ade.com | www.pragma-pod.nl
-----------------------------------------------------------------
___________________________________________________________________________________
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
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: Protrusion cancellation by index term
  2016-03-22 16:48       ` Hans Hagen
@ 2016-03-30 19:53         ` Jan Tosovsky
       [not found]         ` <017c01d18abd$c8d37b90$5a7a72b0$@tosovsky@email.cz>
  1 sibling, 0 replies; 15+ messages in thread
From: Jan Tosovsky @ 2016-03-30 19:53 UTC (permalink / raw)
  To: 'mailing list for ConTeXt users'

On 2016-03-22 Hans Hagen wrote:
> On 3/21/2016 10:59 PM, Jan Tosovsky wrote:
> > On 2014-02-23 Hans Hagen wrote:
> >> On 2/22/2014 2:38 PM, Jan Tosovsky wrote:
> >>> On 2014-02-22 Jan Tosovsky wrote:
> >>>>
> >>>> when a punctuated phrase appears at the beginning of the line,
> >>>> it is not protruded correctly when preceded by an index term.
> >>>>
> >>>> ... \index{foo}>Bar< ...
> >>>>
> >>>> A minimal example is available at
> >>>> http://drifted.in/other/sample.tex
> >>>>
> >>> It is more serious issue than expected. Consider next two
> >>> variants:
> >>>
> >>> (1) sentence, \index{primary}>Primary<
> >>> (2) sentence,\index{primary} >Primary<
> >>>
> >>> When the line is broken after a comma:
> >>> ad 1) starting guillemet is not protruded
> >>> ad 2) ending comma is not protruded
> >>>
> >>> When \index is surrounded by spaces from both sides, the space 
> >>> is rendered at the beginning of the next line (resulting in
> >>> 'indenting').
> >>>
> >>> I'd be grateful for ignoring any non document content preceding
> >>> punctuation to avoid its influence on protrusion.
> >>
> >> well, think of it like this:
> >>
> >> [something]<text>[something else]
> >>
> >> with [something] being bound to < ... so that is then the 
> >> boundary of the word, not < ... i might know a solution (but such 
> >> -major- changes have to fit into my schedule)
> >
> > are there any improvements here with revamped token processing
> > implemented in recent versions?
> 
> it's not that trivial
> 
> ... for the index we can cheat a bit but then i also need to check lots
> of other cases for possible interference
> 

Can you roughly estimate when this could be further investigated?
Between 0.90-0.95, later or after 1.0? 

I hope there will be some way to fix it in ConTeXt one day. 

Jan

___________________________________________________________________________________
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
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: Protrusion cancellation by index term
       [not found]         ` <017c01d18abd$c8d37b90$5a7a72b0$@tosovsky@email.cz>
@ 2016-03-30 22:10           ` Hans Hagen
  2016-03-31 19:28             ` Jan Tosovsky
                               ` (2 more replies)
  0 siblings, 3 replies; 15+ messages in thread
From: Hans Hagen @ 2016-03-30 22:10 UTC (permalink / raw)
  To: ntg-context

On 3/30/2016 9:53 PM, Jan Tosovsky wrote:
> On 2016-03-22 Hans Hagen wrote:
>> On 3/21/2016 10:59 PM, Jan Tosovsky wrote:
>>> On 2014-02-23 Hans Hagen wrote:
>>>> On 2/22/2014 2:38 PM, Jan Tosovsky wrote:
>>>>> On 2014-02-22 Jan Tosovsky wrote:
>>>>>>
>>>>>> when a punctuated phrase appears at the beginning of the line,
>>>>>> it is not protruded correctly when preceded by an index term.
>>>>>>
>>>>>> ... \index{foo}>Bar< ...
>>>>>>
>>>>>> A minimal example is available at
>>>>>> http://drifted.in/other/sample.tex
>>>>>>
>>>>> It is more serious issue than expected. Consider next two
>>>>> variants:
>>>>>
>>>>> (1) sentence, \index{primary}>Primary<
>>>>> (2) sentence,\index{primary} >Primary<
>>>>>
>>>>> When the line is broken after a comma:
>>>>> ad 1) starting guillemet is not protruded
>>>>> ad 2) ending comma is not protruded
>>>>>
>>>>> When \index is surrounded by spaces from both sides, the space
>>>>> is rendered at the beginning of the next line (resulting in
>>>>> 'indenting').
>>>>>
>>>>> I'd be grateful for ignoring any non document content preceding
>>>>> punctuation to avoid its influence on protrusion.
>>>>
>>>> well, think of it like this:
>>>>
>>>> [something]<text>[something else]
>>>>
>>>> with [something] being bound to < ... so that is then the
>>>> boundary of the word, not < ... i might know a solution (but such
>>>> -major- changes have to fit into my schedule)
>>>
>>> are there any improvements here with revamped token processing
>>> implemented in recent versions?
>>
>> it's not that trivial
>>
>> ... for the index we can cheat a bit but then i also need to check lots
>> of other cases for possible interference
>>
>
> Can you roughly estimate when this could be further investigated?
> Between 0.90-0.95, later or after 1.0?

further handling is unrelated to the engine because at that level it is 
not know what protrusion is expected (there are probably as many cases 
where you don't want to protrude as where you might want and hard coding 
solutions / heuristics is no option

> I hope there will be some way to fix it in ConTeXt one day.

non trivial so very stepwise ... adding all kind of hacks just for 
protrusion can interfere with other mechanisms

you can try to do this:

\leftboundary\hbox{\index{foo}}....

-----------------------------------------------------------------
                                           Hans Hagen | PRAGMA ADE
               Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
       tel: 038 477 53 69 | www.pragma-ade.com | www.pragma-pod.nl
-----------------------------------------------------------------
___________________________________________________________________________________
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
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: Protrusion cancellation by index term
  2016-03-30 22:10           ` Hans Hagen
@ 2016-03-31 19:28             ` Jan Tosovsky
       [not found]             ` <56fd7a8a.e559c20a.ada5.350bSMTPIN_ADDED_BROKEN@mx.google.com>
       [not found]             ` <020f01d18b83$8635bb60$92a13220$@tosovsky@email.cz>
  2 siblings, 0 replies; 15+ messages in thread
From: Jan Tosovsky @ 2016-03-31 19:28 UTC (permalink / raw)
  To: 'mailing list for ConTeXt users'

On 2016-03-31 Hans Hagen wrote:
> On 3/30/2016 9:53 PM, Jan Tosovsky wrote:
> > On 2016-03-22 Hans Hagen wrote:
> >> On 3/21/2016 10:59 PM, Jan Tosovsky wrote:
> >>> On 2014-02-23 Hans Hagen wrote:
> >>>> On 2/22/2014 2:38 PM, Jan Tosovsky wrote:
> >>>>> On 2014-02-22 Jan Tosovsky wrote:
> >>>>>>
> >>>>>> when a punctuated phrase appears at the beginning of the 
> >>>>>> line, it is not protruded correctly when preceded by an 
> >>>>>> index term.
> >>>>>>
> >>>>>> ... \index{foo}>Bar< ...
> >>>>>>
> >>>>>> A minimal example is available at
> >>>>>> http://drifted.in/other/sample.tex
> >>>>>
> >>>>> I'd be grateful for ignoring any non document content 
> >>>>> preceding punctuation to avoid its influence on protrusion.
> >>
> >> it's not that trivial
> >>
> >> for the index we can cheat a bit but then i also need to 
> >> check lots of other cases for possible interference
> 
> you can try to do this:
> 
> \leftboundary\hbox{\index{foo}}....
 
Wow, I am quite satisfied with this solution.

Btw, I couldn't find any details for that \leftboundary command either in TeX [1] or ConTeXt [2] command references.

I've tried it just with \hbox{} and it works as well.

Couldn't this be generalized in a way - if you want protrusion even in edge cases, any inline commands have to be wrapped in \hbox{} ?

Jan

___________
[1] https://www.tug.org/utilities/plain/cseq.html
[2] http://www.pragma-ade.com/general/qrcs/setup-en.pdf

___________________________________________________________________________________
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
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: Protrusion cancellation by index term
       [not found]             ` <56fd7a8a.e559c20a.ada5.350bSMTPIN_ADDED_BROKEN@mx.google.com>
@ 2016-03-31 20:47               ` Wolfgang Schuster
  2016-04-01  7:17                 ` Hans Hagen
  0 siblings, 1 reply; 15+ messages in thread
From: Wolfgang Schuster @ 2016-03-31 20:47 UTC (permalink / raw)
  To: mailing list for ConTeXt users


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

> Jan Tosovsky <mailto:j.tosovsky@email.cz>
> 31. März 2016 um 21:28
>
> Wow, I am quite satisfied with this solution.
>
> Btw, I couldn't find any details for that \leftboundary command either 
> in TeX [1] or ConTeXt [2] command references.
The \leftboundary command uses a new LuaTeX primitive which means you 
can’t find it in a TeX [1] reference.

spac-ver.mkiv:

\unexpanded\def\leftboundary   {\boundary\plusone}
\unexpanded\def\rightboundary  {\boundary\plustwo}

Wolfgang

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

[-- Attachment #2: Type: text/plain, Size: 485 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://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: Protrusion cancellation by index term
  2016-03-31 20:47               ` Wolfgang Schuster
@ 2016-04-01  7:17                 ` Hans Hagen
  2016-04-01 19:59                   ` Jan Tosovsky
       [not found]                   ` <01b401d18c51$08930ef0$19b92cd0$@tosovsky@email.cz>
  0 siblings, 2 replies; 15+ messages in thread
From: Hans Hagen @ 2016-04-01  7:17 UTC (permalink / raw)
  To: ntg-context

On 3/31/2016 10:47 PM, Wolfgang Schuster wrote:
>> Jan Tosovsky <mailto:j.tosovsky@email.cz>
>> 31. März 2016 um 21:28
>>
>> Wow, I am quite satisfied with this solution.
>>
>> Btw, I couldn't find any details for that \leftboundary command either
>> in TeX [1] or ConTeXt [2] command references.
> The \leftboundary command uses a new LuaTeX primitive which means you
> can’t find it in a TeX [1] reference.
>
> spac-ver.mkiv:
>
> \unexpanded\def\leftboundary   {\boundary\plusone}
> \unexpanded\def\rightboundary  {\boundary\plustwo}

it will instruct the protrusion checker to skip the next or previous 
node (e.g. a char or hbox or ...) when looking for an edge

Hans

-----------------------------------------------------------------
                                           Hans Hagen | PRAGMA ADE
               Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
       tel: 038 477 53 69 | www.pragma-ade.com | www.pragma-pod.nl
-----------------------------------------------------------------
___________________________________________________________________________________
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
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: Protrusion cancellation by index term
       [not found]             ` <020f01d18b83$8635bb60$92a13220$@tosovsky@email.cz>
@ 2016-04-01  7:23               ` Hans Hagen
  0 siblings, 0 replies; 15+ messages in thread
From: Hans Hagen @ 2016-04-01  7:23 UTC (permalink / raw)
  To: ntg-context

On 3/31/2016 9:28 PM, Jan Tosovsky wrote:
> On 2016-03-31 Hans Hagen wrote:
>> On 3/30/2016 9:53 PM, Jan Tosovsky wrote:
>>> On 2016-03-22 Hans Hagen wrote:
>>>> On 3/21/2016 10:59 PM, Jan Tosovsky wrote:
>>>>> On 2014-02-23 Hans Hagen wrote:
>>>>>> On 2/22/2014 2:38 PM, Jan Tosovsky wrote:
>>>>>>> On 2014-02-22 Jan Tosovsky wrote:
>>>>>>>>
>>>>>>>> when a punctuated phrase appears at the beginning of the
>>>>>>>> line, it is not protruded correctly when preceded by an
>>>>>>>> index term.
>>>>>>>>
>>>>>>>> ... \index{foo}>Bar< ...
>>>>>>>>
>>>>>>>> A minimal example is available at
>>>>>>>> http://drifted.in/other/sample.tex
>>>>>>>
>>>>>>> I'd be grateful for ignoring any non document content
>>>>>>> preceding punctuation to avoid its influence on protrusion.
>>>>
>>>> it's not that trivial
>>>>
>>>> for the index we can cheat a bit but then i also need to
>>>> check lots of other cases for possible interference
>>
>> you can try to do this:
>>
>> \leftboundary\hbox{\index{foo}}....
>
> Wow, I am quite satisfied with this solution.
>
> Btw, I couldn't find any details for that \leftboundary command either in TeX [1] or ConTeXt [2] command references.
>
> I've tried it just with \hbox{} and it works as well.
>
> Couldn't this be generalized in a way - if you want protrusion even in edge cases, any inline commands have to be wrapped in \hbox{} ?

because for instance you wouldn't want to protrude into a constructed 
compound hyphen which is a inline construct, just as you don't want to 
protrude into a formula or something explicitely boxed

Hans

-----------------------------------------------------------------
                                           Hans Hagen | PRAGMA ADE
               Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
       tel: 038 477 53 69 | www.pragma-ade.com | www.pragma-pod.nl
-----------------------------------------------------------------
___________________________________________________________________________________
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
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: Protrusion cancellation by index term
  2016-04-01  7:17                 ` Hans Hagen
@ 2016-04-01 19:59                   ` Jan Tosovsky
       [not found]                   ` <01b401d18c51$08930ef0$19b92cd0$@tosovsky@email.cz>
  1 sibling, 0 replies; 15+ messages in thread
From: Jan Tosovsky @ 2016-04-01 19:59 UTC (permalink / raw)
  To: 'mailing list for ConTeXt users'

On 2016-04-01 Hans Hagen wrote:
> On 3/31/2016 10:47 PM, Wolfgang Schuster wrote:
> > > On 2016-03-31 Jan Tosovsky wrote:
> > >
> > > I couldn't find any details for that \leftboundary
> >
> > spac-ver.mkiv:
> >
> > \unexpanded\def\leftboundary   {\boundary\plusone}
> > \unexpanded\def\rightboundary  {\boundary\plustwo}
> 
> it will instruct the protrusion checker to skip the next or 
> previous node (e.g. a char or hbox or ...) when looking for 
> an edge

Thanks for details. So if that worked with plain \hbox should be taken rather as coincidence?

I prefer motto the fewer commands, the better :-)

Jan


___________________________________________________________________________________
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
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: Protrusion cancellation by index term
       [not found]                   ` <01b401d18c51$08930ef0$19b92cd0$@tosovsky@email.cz>
@ 2016-04-03 17:38                     ` Hans Hagen
  2016-04-10 10:53                       ` Jan Tosovsky
       [not found]                       ` <006801d19317$49110c80$db332580$@tosovsky@email.cz>
  0 siblings, 2 replies; 15+ messages in thread
From: Hans Hagen @ 2016-04-03 17:38 UTC (permalink / raw)
  To: ntg-context

On 4/1/2016 9:59 PM, Jan Tosovsky wrote:
> On 2016-04-01 Hans Hagen wrote:
>> On 3/31/2016 10:47 PM, Wolfgang Schuster wrote:
>>>> On 2016-03-31 Jan Tosovsky wrote:
>>>>
>>>> I couldn't find any details for that \leftboundary
>>>
>>> spac-ver.mkiv:
>>>
>>> \unexpanded\def\leftboundary   {\boundary\plusone}
>>> \unexpanded\def\rightboundary  {\boundary\plustwo}
>>
>> it will instruct the protrusion checker to skip the next or
>> previous node (e.g. a char or hbox or ...) when looking for
>> an edge
>
> Thanks for details. So if that worked with plain \hbox should be taken rather as coincidence?

a hbox becomes one node so that one node is ignored

> I prefer motto the fewer commands, the better :-)
>
> Jan
>
>
> ___________________________________________________________________________________
> 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
> ___________________________________________________________________________________
>


-- 

-----------------------------------------------------------------
                                           Hans Hagen | PRAGMA ADE
               Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
       tel: 038 477 53 69 | www.pragma-ade.com | www.pragma-pod.nl
-----------------------------------------------------------------
___________________________________________________________________________________
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
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: Protrusion cancellation by index term
  2016-04-03 17:38                     ` Hans Hagen
@ 2016-04-10 10:53                       ` Jan Tosovsky
       [not found]                       ` <006801d19317$49110c80$db332580$@tosovsky@email.cz>
  1 sibling, 0 replies; 15+ messages in thread
From: Jan Tosovsky @ 2016-04-10 10:53 UTC (permalink / raw)
  To: 'mailing list for ConTeXt users'

On 2016-04-03 Hans Hagen wrote:
> On 4/1/2016 9:59 PM, Jan Tosovsky wrote:
> > On 2016-04-01 Hans Hagen wrote:
> >> On 3/31/2016 10:47 PM, Wolfgang Schuster wrote:
> >>>> On 2016-03-31 Jan Tosovsky wrote:
> >>>>
> >>>> I couldn't find any details for that \leftboundary
> >>>
> >>> spac-ver.mkiv:
> >>>
> >>> \unexpanded\def\leftboundary   {\boundary\plusone}
> >>> \unexpanded\def\rightboundary  {\boundary\plustwo}
> >>
> >> it will instruct the protrusion checker to skip the next or
> >> previous node (e.g. a char or hbox or ...) when looking for
> >> an edge
> >
> > Thanks for details. So if that worked with plain \hbox should be
> taken rather as coincidence?
> 
> a hbox becomes one node so that one node is ignored
> 

I found a nasty drawback of this method. If that hbox is used, the first paragraph is not evaluated correctly and considered as the second one. When indentation is enabled, the first paragraph after the title is not usually indented, but now it is. Additionaly, even if indenting is disabled, there is a bigger distance between title and the following para.

\setupindenting[yes, 2em]

\starttext

\section{The first section}\index{the first section}

The first para.\par
The second para.

\section{The second section}\leftboundary\hbox{\index{the second section}}

The first para.\par
The second para.

\stoptext


I could eventually avoid inserting that 'index' tweak into titles, but this is another exception which an end-user should keep in mind ..and.. I hate exceptions ;-)

Any idea?

Thanks, Jan

___________________________________________________________________________________
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
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: Protrusion cancellation by index term
       [not found]                       ` <006801d19317$49110c80$db332580$@tosovsky@email.cz>
@ 2016-04-10 14:47                         ` Hans Hagen
  0 siblings, 0 replies; 15+ messages in thread
From: Hans Hagen @ 2016-04-10 14:47 UTC (permalink / raw)
  To: ntg-context

On 4/10/2016 12:53 PM, Jan Tosovsky wrote:
> On 2016-04-03 Hans Hagen wrote:
>> On 4/1/2016 9:59 PM, Jan Tosovsky wrote:
>>> On 2016-04-01 Hans Hagen wrote:
>>>> On 3/31/2016 10:47 PM, Wolfgang Schuster wrote:
>>>>>> On 2016-03-31 Jan Tosovsky wrote:
>>>>>>
>>>>>> I couldn't find any details for that \leftboundary
>>>>>
>>>>> spac-ver.mkiv:
>>>>>
>>>>> \unexpanded\def\leftboundary   {\boundary\plusone}
>>>>> \unexpanded\def\rightboundary  {\boundary\plustwo}
>>>>
>>>> it will instruct the protrusion checker to skip the next or
>>>> previous node (e.g. a char or hbox or ...) when looking for
>>>> an edge
>>>
>>> Thanks for details. So if that worked with plain \hbox should be
>> taken rather as coincidence?
>>
>> a hbox becomes one node so that one node is ignored
>>
>
> I found a nasty drawback of this method. If that hbox is used, the first paragraph is not evaluated correctly and considered as the second one. When indentation is enabled, the first paragraph after the title is not usually indented, but now it is. Additionaly, even if indenting is disabled, there is a bigger distance between title and the following para.
>
> \setupindenting[yes, 2em]
>
> \starttext
>
> \section{The first section}\index{the first section}
>
> The first para.\par
> The second para.
>
> \section{The second section}\leftboundary\hbox{\index{the second section}}
>
> The first para.\par
> The second para.
>
> \stoptext
>
>
> I could eventually avoid inserting that 'index' tweak into titles, but this is another exception which an end-user should keep in mind ..and.. I hate exceptions ;-)
>
> Any idea?

everything protrusion is an exception

\unexpanded\def\myindex#1%
   {\dontleavehmode
    \ifcase\normalprotrudechars\else\leftboundary\hbox\fi
    {\index{#1}}}

might work (untested) given that protrusion is off in the title

Hans


-----------------------------------------------------------------
                                           Hans Hagen | PRAGMA ADE
               Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
       tel: 038 477 53 69 | www.pragma-ade.com | www.pragma-pod.nl
-----------------------------------------------------------------
___________________________________________________________________________________
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
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Protrusion cancellation by index term
@ 2014-02-22  0:44 Jan Tosovsky
  0 siblings, 0 replies; 15+ messages in thread
From: Jan Tosovsky @ 2014-02-22  0:44 UTC (permalink / raw)
  To: 'mailing list for ConTeXt users'

Dear All, 

when a punctuated phrase appears at the beginning of the line, it is not
protruded correctly when preceded by an index term.

... \index{foo}>Bar< ...

A minimal example is available at 
http://drifted.in/other/sample.tex

I cannot place the space character between these two parts (which helps) as
I sometimes need to join this and the previous phrase with the non-breaking
space.

Any idea how to fix this?

Thanks, Jan




___________________________________________________________________________________
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
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 15+ messages in thread

end of thread, other threads:[~2016-04-10 14:47 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <00c301cf2f67$2df79150$89e6b3f0$@tosovsky@email.cz>
2014-02-22 13:38 ` Protrusion cancellation by index term Jan Tosovsky
     [not found] ` <000f01cf2fd3$532e9380$f98bba80$@tosovsky@email.cz>
2014-02-23  9:57   ` Hans Hagen
2016-03-21 21:59     ` Jan Tosovsky
     [not found]     ` <01ac01d183bc$f2213d50$d663b7f0$@tosovsky@email.cz>
2016-03-22 16:48       ` Hans Hagen
2016-03-30 19:53         ` Jan Tosovsky
     [not found]         ` <017c01d18abd$c8d37b90$5a7a72b0$@tosovsky@email.cz>
2016-03-30 22:10           ` Hans Hagen
2016-03-31 19:28             ` Jan Tosovsky
     [not found]             ` <56fd7a8a.e559c20a.ada5.350bSMTPIN_ADDED_BROKEN@mx.google.com>
2016-03-31 20:47               ` Wolfgang Schuster
2016-04-01  7:17                 ` Hans Hagen
2016-04-01 19:59                   ` Jan Tosovsky
     [not found]                   ` <01b401d18c51$08930ef0$19b92cd0$@tosovsky@email.cz>
2016-04-03 17:38                     ` Hans Hagen
2016-04-10 10:53                       ` Jan Tosovsky
     [not found]                       ` <006801d19317$49110c80$db332580$@tosovsky@email.cz>
2016-04-10 14:47                         ` Hans Hagen
     [not found]             ` <020f01d18b83$8635bb60$92a13220$@tosovsky@email.cz>
2016-04-01  7:23               ` Hans Hagen
2014-02-22  0:44 Jan Tosovsky

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).