ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* Bad interaction between \setupinteraction and \defineenumeration
@ 2020-07-05 23:15 Jairo A. del Rio
  2020-07-06  9:31 ` Otared Kavian
  0 siblings, 1 reply; 9+ messages in thread
From: Jairo A. del Rio @ 2020-07-05 23:15 UTC (permalink / raw)
  To: mailing list for ConTeXt users


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

The following:

\setupinteraction[state=start,focus=standard,color=black,contrastcolor=black]
\defineenumeration[proposition][alternative=top,text=Proposición,headalign=middle,numberconversion=R,headstyle=\WORDS,style=\emph,referenceprefix=prop]
\starttext
\startproposition[1]
\dorecurse{10}{\input ward}
\stopproposition
\in[prop:1]
\stoptext

works almost perfectly. However, the cross-reference does not work, even if
the number of the enumeration is displayed correctly. The example fails
both in LuaTeX and LuaMetaTeX. As I remember, the problem appeared as early
as 2019, so not a matter of a bad installation. Any ideas?

Cordially,

Jairo :)

[-- Attachment #1.2: Type: text/html, Size: 784 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
___________________________________________________________________________________

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

* Re: Bad interaction between \setupinteraction and \defineenumeration
  2020-07-05 23:15 Bad interaction between \setupinteraction and \defineenumeration Jairo A. del Rio
@ 2020-07-06  9:31 ` Otared Kavian
  2020-07-06 13:58   ` Jairo A. del Rio
  0 siblings, 1 reply; 9+ messages in thread
From: Otared Kavian @ 2020-07-06  9:31 UTC (permalink / raw)
  To: mailing list for ConTeXt users

Hi Jairo,

If you remove
	focus=standard
the interaction works fine.

Best regards: Otared K.

> On 6 Jul 2020, at 01:15, Jairo A. del Rio <jairoadelrio6@gmail.com> wrote:
> 
> The following:
> 
> \setupinteraction[state=start,focus=standard,color=black,contrastcolor=black]
> \defineenumeration[proposition][alternative=top,text=Proposición,headalign=middle,numberconversion=R,headstyle=\WORDS,style=\emph,referenceprefix=prop]
> \starttext
> \startproposition[1]
> \dorecurse{10}{\input ward}
> \stopproposition
> \in[prop:1] 
> \stoptext 
> 
> works almost perfectly. However, the cross-reference does not work, even if the number of the enumeration is displayed correctly. The example fails both in LuaTeX and LuaMetaTeX. As I remember, the problem appeared as early as 2019, so not a matter of a bad installation. Any ideas?
> 
> Cordially,
> 
> Jairo :)
> 
> ___________________________________________________________________________________
> 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
___________________________________________________________________________________

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

* Re: Bad interaction between \setupinteraction and \defineenumeration
  2020-07-06  9:31 ` Otared Kavian
@ 2020-07-06 13:58   ` Jairo A. del Rio
  2020-07-06 18:04     ` Pablo Rodriguez
  0 siblings, 1 reply; 9+ messages in thread
From: Jairo A. del Rio @ 2020-07-06 13:58 UTC (permalink / raw)
  To: mailing list for ConTeXt users


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

So, cannot I use focus=standard and cross-references together? Hmm. I think
it should be fixed... But maybe it's an intended feature. Thanks, Otared.

Jairo :)

El lun., 6 de jul. de 2020 4:31 a. m., Otared Kavian <otared@gmail.com>
escribió:

> Hi Jairo,
>
> If you remove
>         focus=standard
> the interaction works fine.
>
> Best regards: Otared K.
>
> > On 6 Jul 2020, at 01:15, Jairo A. del Rio <jairoadelrio6@gmail.com>
> wrote:
> >
> > The following:
> >
> >
> \setupinteraction[state=start,focus=standard,color=black,contrastcolor=black]
> >
> \defineenumeration[proposition][alternative=top,text=Proposición,headalign=middle,numberconversion=R,headstyle=\WORDS,style=\emph,referenceprefix=prop]
> > \starttext
> > \startproposition[1]
> > \dorecurse{10}{\input ward}
> > \stopproposition
> > \in[prop:1]
> > \stoptext
> >
> > works almost perfectly. However, the cross-reference does not work, even
> if the number of the enumeration is displayed correctly. The example fails
> both in LuaTeX and LuaMetaTeX. As I remember, the problem appeared as early
> as 2019, so not a matter of a bad installation. Any ideas?
> >
> > Cordially,
> >
> > Jairo :)
> >
> >
> ___________________________________________________________________________________
> > 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
>
> ___________________________________________________________________________________
>

[-- Attachment #1.2: Type: text/html, Size: 3879 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
___________________________________________________________________________________

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

* Re: Bad interaction between \setupinteraction and \defineenumeration
  2020-07-06 13:58   ` Jairo A. del Rio
@ 2020-07-06 18:04     ` Pablo Rodriguez
  2020-07-06 18:48       ` Wolfgang Schuster
  0 siblings, 1 reply; 9+ messages in thread
From: Pablo Rodriguez @ 2020-07-06 18:04 UTC (permalink / raw)
  To: ntg-context

On 7/6/20 3:58 PM, Jairo A. del Rio wrote:
> So, cannot I use focus=standard and cross-references together? Hmm. I
> think it should be fixed... But maybe it's an intended feature. Thanks,
> Otared.

Hi Jairo,

"focus=standard" works fine with footnotes.

    \setupinteraction[state=start,focus=standard,color=,contrastcolor=]
    \defineenumeration[proposition][referenceprefix=prop]
    \starttext
    \startproposition[1]
    \input ward\footnote{Only a footnote}
    \stopproposition
    \in[prop:1]
    \stoptext

Your sample doesn’t work, because of the reference prefix. Right now,
the /Names reads in the PDF code:

    /Names [ (1) 5 0 R ]

It seems that "referenceprefix" is forgotten there, which should read
with the sample code from above:

    /Names [ (prop:1) 5 0 R ]

Hans, could you check this? (I’m afraid it doesn’t work with current
latest [2020.07.06 19:30])?

Many thanks for your help,

Pablo
--
http://www.ousia.tk
___________________________________________________________________________________
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
___________________________________________________________________________________

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

* Re: Bad interaction between \setupinteraction and \defineenumeration
  2020-07-06 18:04     ` Pablo Rodriguez
@ 2020-07-06 18:48       ` Wolfgang Schuster
  2020-07-06 18:57         ` Hans Hagen
                           ` (3 more replies)
  0 siblings, 4 replies; 9+ messages in thread
From: Wolfgang Schuster @ 2020-07-06 18:48 UTC (permalink / raw)
  To: mailing list for ConTeXt users, Pablo Rodriguez

Pablo Rodriguez schrieb am 06.07.2020 um 20:04:
> On 7/6/20 3:58 PM, Jairo A. del Rio wrote:
>> So, cannot I use focus=standard and cross-references together? Hmm. I
>> think it should be fixed... But maybe it's an intended feature. Thanks,
>> Otared.
> 
> Hi Jairo,
> 
> "focus=standard" works fine with footnotes.
> 
>      \setupinteraction[state=start,focus=standard,color=,contrastcolor=]
>      \defineenumeration[proposition][referenceprefix=prop]
>      \starttext
>      \startproposition[1]
>      \input ward\footnote{Only a footnote}
>      \stopproposition
>      \in[prop:1]
>      \stoptext
> 
> Your sample doesn’t work, because of the reference prefix. Right now,
> the /Names reads in the PDF code:
> 
>      /Names [ (1) 5 0 R ]
> 
> It seems that "referenceprefix" is forgotten there, which should read
> with the sample code from above:
> 
>      /Names [ (prop:1) 5 0 R ]
> 
> Hans, could you check this? (I’m afraid it doesn’t work with current
> latest [2020.07.06 19:30])?


I'm not Hans but this fixed the problem for me (strc-con.mkiv):

\def\strc_constructions_register_yes[#1][#2]% #1=optional user data 
#2=interfaced-settings
   {\begingroup                              % similar to structure so 
we might generalize this
      ...
      \clf_setinternalreference
-      prefix    {\referenceprefix}%
+      prefix    {\currentconstructionreferenceprefix}%
        reference {\currentconstructionreference}%
        internal  \locationcount
        view      {\interactionparameter\c!focus}%
      \relax
      ...
    \fi}

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

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

* Re: Bad interaction between \setupinteraction and \defineenumeration
  2020-07-06 18:48       ` Wolfgang Schuster
@ 2020-07-06 18:57         ` Hans Hagen
  2020-07-06 19:03         ` Pablo Rodriguez
                           ` (2 subsequent siblings)
  3 siblings, 0 replies; 9+ messages in thread
From: Hans Hagen @ 2020-07-06 18:57 UTC (permalink / raw)
  To: mailing list for ConTeXt users, Wolfgang Schuster, Pablo Rodriguez

On 7/6/2020 8:48 PM, Wolfgang Schuster wrote:
> Pablo Rodriguez schrieb am 06.07.2020 um 20:04:
>> On 7/6/20 3:58 PM, Jairo A. del Rio wrote:
>>> So, cannot I use focus=standard and cross-references together? Hmm. I
>>> think it should be fixed... But maybe it's an intended feature. Thanks,
>>> Otared.
>>
>> Hi Jairo,
>>
>> "focus=standard" works fine with footnotes.
>>
>>      \setupinteraction[state=start,focus=standard,color=,contrastcolor=]
>>      \defineenumeration[proposition][referenceprefix=prop]
>>      \starttext
>>      \startproposition[1]
>>      \input ward\footnote{Only a footnote}
>>      \stopproposition
>>      \in[prop:1]
>>      \stoptext
>>
>> Your sample doesn’t work, because of the reference prefix. Right now,
>> the /Names reads in the PDF code:
>>
>>      /Names [ (1) 5 0 R ]
>>
>> It seems that "referenceprefix" is forgotten there, which should read
>> with the sample code from above:
>>
>>      /Names [ (prop:1) 5 0 R ]
>>
>> Hans, could you check this? (I’m afraid it doesn’t work with current
>> latest [2020.07.06 19:30])?
> 
> 
> I'm not Hans but this fixed the problem for me (strc-con.mkiv):
> 
> \def\strc_constructions_register_yes[#1][#2]% #1=optional user data 
> #2=interfaced-settings
>    {\begingroup                              % similar to structure so 
> we might generalize this
>       ...
>       \clf_setinternalreference
> -      prefix    {\referenceprefix}%
> +      prefix    {\currentconstructionreferenceprefix}%
>         reference {\currentconstructionreference}%
>         internal  \locationcount
>         view      {\interactionparameter\c!focus}%
>       \relax
>       ...
>     \fi}
> 
> Wolfgang
But because you're Wolfgang I can apply that patch without checking ...

(no upload today, already done one0

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

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

* Re: Bad interaction between \setupinteraction and \defineenumeration
  2020-07-06 18:48       ` Wolfgang Schuster
  2020-07-06 18:57         ` Hans Hagen
@ 2020-07-06 19:03         ` Pablo Rodriguez
  2020-07-07  2:10         ` Jairo A. del Rio
  2020-07-07 20:52         ` Otared Kavian
  3 siblings, 0 replies; 9+ messages in thread
From: Pablo Rodriguez @ 2020-07-06 19:03 UTC (permalink / raw)
  To: ntg-context

On 7/6/20 8:48 PM, Wolfgang Schuster wrote:
> Pablo Rodriguez schrieb am 06.07.2020 um 20:04:
>> [...]
>> Hans, could you check this? (I’m afraid it doesn’t work with current
>> latest [2020.07.06 19:30])?
>
> I'm not Hans but this fixed the problem for me (strc-con.mkiv):
>
> \def\strc_constructions_register_yes[#1][#2]% #1=optional user data
> #2=interfaced-settings
>    {\begingroup                              % similar to structure so
> we might generalize this
>       ...
>       \clf_setinternalreference
> -      prefix    {\referenceprefix}%
> +      prefix    {\currentconstructionreferenceprefix}%
>         reference {\currentconstructionreference}%
>         internal  \locationcount
>         view      {\interactionparameter\c!focus}%
>       \relax
>       ...
>     \fi}

Many thanks for your the fix, Wolfgang.

It works perfectly fine here too.

Pablo
--
http://www.ousia.tk
___________________________________________________________________________________
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
___________________________________________________________________________________

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

* Re: Bad interaction between \setupinteraction and \defineenumeration
  2020-07-06 18:48       ` Wolfgang Schuster
  2020-07-06 18:57         ` Hans Hagen
  2020-07-06 19:03         ` Pablo Rodriguez
@ 2020-07-07  2:10         ` Jairo A. del Rio
  2020-07-07 20:52         ` Otared Kavian
  3 siblings, 0 replies; 9+ messages in thread
From: Jairo A. del Rio @ 2020-07-07  2:10 UTC (permalink / raw)
  To: mailing list for ConTeXt users


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

Now it works! Thank you so much, Wolfgang!

Jairo :)

El lun., 6 de jul. de 2020 a la(s) 13:48, Wolfgang Schuster (
wolfgang.schuster.lists@gmail.com) escribió:

> Pablo Rodriguez schrieb am 06.07.2020 um 20:04:
> > On 7/6/20 3:58 PM, Jairo A. del Rio wrote:
> >> So, cannot I use focus=standard and cross-references together? Hmm. I
> >> think it should be fixed... But maybe it's an intended feature. Thanks,
> >> Otared.
> >
> > Hi Jairo,
> >
> > "focus=standard" works fine with footnotes.
> >
> >      \setupinteraction[state=start,focus=standard,color=,contrastcolor=]
> >      \defineenumeration[proposition][referenceprefix=prop]
> >      \starttext
> >      \startproposition[1]
> >      \input ward\footnote{Only a footnote}
> >      \stopproposition
> >      \in[prop:1]
> >      \stoptext
> >
> > Your sample doesn’t work, because of the reference prefix. Right now,
> > the /Names reads in the PDF code:
> >
> >      /Names [ (1) 5 0 R ]
> >
> > It seems that "referenceprefix" is forgotten there, which should read
> > with the sample code from above:
> >
> >      /Names [ (prop:1) 5 0 R ]
> >
> > Hans, could you check this? (I’m afraid it doesn’t work with current
> > latest [2020.07.06 19:30])?
>
>
> I'm not Hans but this fixed the problem for me (strc-con.mkiv):
>
> \def\strc_constructions_register_yes[#1][#2]% #1=optional user data
> #2=interfaced-settings
>    {\begingroup                              % similar to structure so
> we might generalize this
>       ...
>       \clf_setinternalreference
> -      prefix    {\referenceprefix}%
> +      prefix    {\currentconstructionreferenceprefix}%
>         reference {\currentconstructionreference}%
>         internal  \locationcount
>         view      {\interactionparameter\c!focus}%
>       \relax
>       ...
>     \fi}
>
> Wolfgang
>
> ___________________________________________________________________________________
> 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
>
> ___________________________________________________________________________________
>

[-- Attachment #1.2: Type: text/html, Size: 3513 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
___________________________________________________________________________________

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

* Re: Bad interaction between \setupinteraction and \defineenumeration
  2020-07-06 18:48       ` Wolfgang Schuster
                           ` (2 preceding siblings ...)
  2020-07-07  2:10         ` Jairo A. del Rio
@ 2020-07-07 20:52         ` Otared Kavian
  3 siblings, 0 replies; 9+ messages in thread
From: Otared Kavian @ 2020-07-07 20:52 UTC (permalink / raw)
  To: mailing list for ConTeXt users

Thanks Wolfgang! 
Your patch seems to fix also another issue with the cross references in ConTeXt at least on MacOS and TeXShop. In principle a document typeset with TeXShop, in the resulting PDF when the pointer hovers above a link to a reference, TeXShop shows a small pop-up window where the reference is shown (for instance with the example sent by Jairo the text of Proposición is shown). This works fine with LaTeX documents typeset with TeXShop, but it didn't work at all with ConTeXt documents. After applying your patch and making the format, the feature works with some ConTeXt documents, such as the example sent by Jairo (but unfortunately the feature does not work in a large document where I tested it).

Best regards: Otared K.

> On 6 Jul 2020, at 20:48, Wolfgang Schuster <wolfgang.schuster.lists@gmail.com> wrote:
> […]
> 
> I'm not Hans but this fixed the problem for me (strc-con.mkiv):
> 
> \def\strc_constructions_register_yes[#1][#2]% #1=optional user data #2=interfaced-settings
>  {\begingroup                              % similar to structure so we might generalize this
>     ...
>     \clf_setinternalreference
> -      prefix    {\referenceprefix}%
> +      prefix    {\currentconstructionreferenceprefix}%
>       reference {\currentconstructionreference}%
>       internal  \locationcount
>       view      {\interactionparameter\c!focus}%
>     \relax
>     ...
>   \fi}
> 
> Wolfgang

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

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

end of thread, other threads:[~2020-07-07 20:52 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-07-05 23:15 Bad interaction between \setupinteraction and \defineenumeration Jairo A. del Rio
2020-07-06  9:31 ` Otared Kavian
2020-07-06 13:58   ` Jairo A. del Rio
2020-07-06 18:04     ` Pablo Rodriguez
2020-07-06 18:48       ` Wolfgang Schuster
2020-07-06 18:57         ` Hans Hagen
2020-07-06 19:03         ` Pablo Rodriguez
2020-07-07  2:10         ` Jairo A. del Rio
2020-07-07 20:52         ` Otared Kavian

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