weird interaction in linenotes command (again)
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
Am 17.07.2013 um 19:46 schrieb Pablo Rodríguez
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
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 -----------------------------------------------------------------
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
Am 18.07.2013 um 17:38 schrieb Pablo Rodríguez
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
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
participants (3)
-
Hans Hagen
-
Pablo Rodríguez
-
Wolfgang Schuster