diff options
author | Hans Hagen <pragma@wxs.nl> | 2014-09-03 17:37:00 +0200 |
---|---|---|
committer | Hans Hagen <pragma@wxs.nl> | 2014-09-03 17:37:00 +0200 |
commit | 19f0402bf96ee3aa359cd7361d2683b5ce05fdeb (patch) | |
tree | d5db57a51789365bbdc69815df5015b4891f9efb /tex/context/base/strc-ref.mkvi | |
parent | 54b35840ce8f91454174a2d63042d776222a378b (diff) | |
download | context-19f0402bf96ee3aa359cd7361d2683b5ce05fdeb.tar.gz |
beta 2014.09.03 17:37
Diffstat (limited to 'tex/context/base/strc-ref.mkvi')
-rw-r--r-- | tex/context/base/strc-ref.mkvi | 25 |
1 files changed, 23 insertions, 2 deletions
diff --git a/tex/context/base/strc-ref.mkvi b/tex/context/base/strc-ref.mkvi index 3702531cf..65634b2e6 100644 --- a/tex/context/base/strc-ref.mkvi +++ b/tex/context/base/strc-ref.mkvi @@ -150,6 +150,25 @@ \def\dofinishsomereference#kind{\executeifdefined{dofinish#{kind}reference}\gobbletwoarguments} +% This is somewhat tricky: we want to keep the reference with the following word but +% that word should also hyphenate. We need to find a better way. + +% 0 = nothing +% 1 = bind to following word + +\setnewconstant\c_strc_references_bind_state\plusone + +\def\strc_references_inject_before + {} + +\def\strc_references_inject_after + {\ifcase\c_strc_references_bind_state + % nothing + \or + \prewordbreak % to be tested: \removeunwantedspaces\permithyphenation + \fi} + + \unexpanded\def\strc_references_set_named_reference {\ifreferencing \expandafter\strc_references_set_named_reference_indeed @@ -231,10 +250,11 @@ \xdef\currentdestinationattribute{\number\lastdestinationattribute}% % will become an option: \ifnum\lastdestinationattribute>\zerocount + \strc_references_inject_before % new \dontleavehmode\hbox attr \destinationattribute\lastdestinationattribute\bgroup \strc_references_flush_destination_nodes \egroup - \prewordbreak % new + \strc_references_inject_after % new \fi} \def\strc_references_set_page_only_destination_attribute#labels% could in fact be fully expandable @@ -302,10 +322,11 @@ \xdef\currentdestinationattribute{\number\lastdestinationattribute}% % will become an option: \ifnum\lastdestinationattribute>\zerocount + \strc_references_inject_before % new \dontleavehmode\hbox attr \destinationattribute\lastdestinationattribute\bgroup \strc_references_flush_destination_nodes \egroup - \prewordbreak % new + \strc_references_inject_after % new \fi} \unexpanded\def\strc_references_direct_full |