* weird interaction in linenotes command (again)
@ 2013-07-17 17:46 Pablo Rodríguez
2013-07-17 19:05 ` Wolfgang Schuster
0 siblings, 1 reply; 6+ messages in thread
From: Pablo Rodríguez @ 2013-07-17 17:46 UTC (permalink / raw)
To: mailing list for ConTeXt users
Dear list,
sorry for posting this again, but I don’t know how to solve this issue
and I really need your help.
I have the following sample:
\setuppapersize[A6]
\newcounter\LineNote
\setupnote[linenote][paragraph=yes]
\setupnotation[linenote][alternative=serried]
\define[2]\Variant
{\increment\LineNote
\startlinenote[LineNote:\LineNote]{#2}#1%
\stoplinenote[LineNote:\LineNote]}
\starttext
\startlinenumbering
\dorecurse{10}{\Variant{\showhyphens{legislation}not
original}{variant} \Variant{\showhyphens{legibility}origin}
{variants} }
\stoplinenumbering
\stoptext
The problem here is that \Variant gets always #1 not hyphenated,
although \showhyphens works fine in that argument.
The cause of this is the \increment command within \Variant. I don’t
know why this happens, but the increment is required by \Variant to make
sense at all.
I guess this might be a bug. Is there no possible workaround for this?
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://tex.aanhet.net
archive : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: weird interaction in linenotes command (again)
2013-07-17 17:46 weird interaction in linenotes command (again) Pablo Rodríguez
@ 2013-07-17 19:05 ` Wolfgang Schuster
2013-07-18 10:21 ` Hans Hagen
0 siblings, 1 reply; 6+ messages in thread
From: Wolfgang Schuster @ 2013-07-17 19:05 UTC (permalink / raw)
To: mailing list for ConTeXt users; +Cc: Hans Hagen
Am 17.07.2013 um 19:46 schrieb Pablo Rodríguez <oinos@web.de>:
> Dear list,
>
> sorry for posting this again, but I don’t know how to solve this issue
> and I really need your help.
>
> I have the following sample:
>
> \setuppapersize[A6]
> \newcounter\LineNote
>
> \setupnote[linenote][paragraph=yes]
> \setupnotation[linenote][alternative=serried]
>
> \define[2]\Variant
> {\increment\LineNote
> \startlinenote[LineNote:\LineNote]{#2}#1%
> \stoplinenote[LineNote:\LineNote]}
>
> \starttext
>
> \startlinenumbering
> \dorecurse{10}{\Variant{\showhyphens{legislation}not
> original}{variant} \Variant{\showhyphens{legibility}origin}
> {variants} }
> \stoplinenumbering
> \stoptext
>
> The problem here is that \Variant gets always #1 not hyphenated,
> although \showhyphens works fine in that argument.
>
> The cause of this is the \increment command within \Variant. I don’t
> know why this happens, but the increment is required by \Variant to make
> sense at all.
>
> I guess this might be a bug. Is there no possible workaround for this?
I have no solution but a better example because it’s a bug in the reference mechanism
(also used by line notes) as shown below.
\setuppapersize[A6]
\starttext
\dorecurse{10}{not original }
\dorecurse{10}{not \pagereference[test:#1]original }
\stoptext
The problem is the following code in the reference macros (str-ref.mkvi),
when the box code is commented the hyphenation works.
\unexpanded\def\strc_references_set_named_reference_indeed#kind#labels#userdata#text% labels userdata text -> todo: userdata
{...
% will become an option:
\ifnum\lastdestinationattribute>\zerocount
\dontleavehmode\hbox attr \destinationattribute\lastdestinationattribute\bgroup
\strc_references_flush_destination_nodes
\egroup
\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://tex.aanhet.net
archive : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: weird interaction in linenotes command (again)
2013-07-17 19:05 ` Wolfgang Schuster
@ 2013-07-18 10:21 ` Hans Hagen
2013-07-18 15:38 ` Pablo Rodríguez
0 siblings, 1 reply; 6+ messages in thread
From: Hans Hagen @ 2013-07-18 10:21 UTC (permalink / raw)
To: Wolfgang Schuster; +Cc: mailing list for ConTeXt users
On 7/17/2013 9:05 PM, Wolfgang Schuster wrote:
> \unexpanded\def\strc_references_set_named_reference_indeed#kind#labels#userdata#text% labels userdata text -> todo: userdata
> {...
> % will become an option:
> \ifnum\lastdestinationattribute>\zerocount
> \dontleavehmode\hbox attr \destinationattribute\lastdestinationattribute\bgroup
> \strc_references_flush_destination_nodes
> \egroup
\prewordbreak % experiment
> \fi}
>
> Wolfgang
>
--
-----------------------------------------------------------------
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] 6+ messages in thread
* Re: weird interaction in linenotes command (again)
2013-07-18 10:21 ` Hans Hagen
@ 2013-07-18 15:38 ` Pablo Rodríguez
2013-07-18 19:31 ` Wolfgang Schuster
0 siblings, 1 reply; 6+ messages in thread
From: Pablo Rodríguez @ 2013-07-18 15:38 UTC (permalink / raw)
To: mailing list for ConTeXt users
On 18/07/13 12:21, Hans Hagen wrote:
> On 7/17/2013 9:05 PM, Wolfgang Schuster wrote:
>
>> \unexpanded\def\strc_references_set_named_reference_indeed#kind#labels#userdata#text% labels userdata text -> todo: userdata
>> {...
>> % will become an option:
>> \ifnum\lastdestinationattribute>\zerocount
>> \dontleavehmode\hbox attr \destinationattribute\lastdestinationattribute\bgroup
>> \strc_references_flush_destination_nodes
>> \egroup
>
> \prewordbreak % experiment
>
>> \fi}
Many thanks for your replies, Wolfgang and Hans.
Hans, I’m afraid that your patch fixes Wolfgang’s sample, but not mine.
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://tex.aanhet.net
archive : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: weird interaction in linenotes command (again)
2013-07-18 15:38 ` Pablo Rodríguez
@ 2013-07-18 19:31 ` Wolfgang Schuster
2013-07-18 20:41 ` Pablo Rodríguez
0 siblings, 1 reply; 6+ messages in thread
From: Wolfgang Schuster @ 2013-07-18 19:31 UTC (permalink / raw)
To: mailing list for ConTeXt users
Am 18.07.2013 um 17:38 schrieb Pablo Rodríguez <oinos@web.de>:
> On 18/07/13 12:21, Hans Hagen wrote:
>> On 7/17/2013 9:05 PM, Wolfgang Schuster wrote:
>>
>>> \unexpanded\def\strc_references_set_named_reference_indeed#kind#labels#userdata#text% labels userdata text -> todo: userdata
>>> {...
>>> % will become an option:
>>> \ifnum\lastdestinationattribute>\zerocount
>>> \dontleavehmode\hbox attr \destinationattribute\lastdestinationattribute\bgroup
>>> \strc_references_flush_destination_nodes
>>> \egroup
>>
>> \prewordbreak % experiment
>>
>>> \fi}
>
> Many thanks for your replies, Wolfgang and Hans.
>
> Hans, I’m afraid that your patch fixes Wolfgang’s sample, but not mine.
>
> Many thanks for your help,
New minimal example:
\setuppapersize[A6]
\starttext
\dorecurse{10}{not original }
\blank
\dorecurse{10}{\startline[test:1:#1]not original\stopline[test:1:#1] }
\blank
\dorecurse{10}{\startline[test:2:#1]not original\prewordbreak\stopline[test:2:#1] }
\stoptext
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://tex.aanhet.net
archive : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: weird interaction in linenotes command (again)
2013-07-18 19:31 ` Wolfgang Schuster
@ 2013-07-18 20:41 ` Pablo Rodríguez
0 siblings, 0 replies; 6+ messages in thread
From: Pablo Rodríguez @ 2013-07-18 20:41 UTC (permalink / raw)
To: mailing list for ConTeXt users
On 18/07/13 21:31, Wolfgang Schuster wrote:
> [...]
> New minimal example:
> [...]
> \dorecurse{10}{\startline[test:2:#1]not original\prewordbreak\stopline[test:2:#1] }
Many thanks for your reply, Wolfgang.
Now I understand what was required here and what \prewordbreak does
(modifying strc-ref.mkvi was Greek to me).
This fixes the issue with my command.
Many thanks again 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://tex.aanhet.net
archive : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2013-07-18 20:41 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-07-17 17:46 weird interaction in linenotes command (again) Pablo Rodríguez
2013-07-17 19:05 ` Wolfgang Schuster
2013-07-18 10:21 ` Hans Hagen
2013-07-18 15:38 ` Pablo Rodríguez
2013-07-18 19:31 ` Wolfgang Schuster
2013-07-18 20:41 ` Pablo Rodríguez
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).