diff options
author | Karl Berry <karl@freefriends.org> | 2019-02-28 15:11:56 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2019-02-28 15:11:56 +0000 |
commit | cc17ad601696f5cf966c8a0b9d79144cd42828a6 (patch) | |
tree | f6007b9b2f886d942f9b30b4797e8718001f65bd /Master/texmf-dist/tex/context/base/mkiv/scrn-wid.mkvi | |
parent | e298746bb92cdf7e87bc3b5b9bd973b6c429a47f (diff) |
context for tl19
git-svn-id: svn://tug.org/texlive/trunk@50165 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/context/base/mkiv/scrn-wid.mkvi')
-rw-r--r-- | Master/texmf-dist/tex/context/base/mkiv/scrn-wid.mkvi | 97 |
1 files changed, 69 insertions, 28 deletions
diff --git a/Master/texmf-dist/tex/context/base/mkiv/scrn-wid.mkvi b/Master/texmf-dist/tex/context/base/mkiv/scrn-wid.mkvi index c74125c72b6..d1571ca656d 100644 --- a/Master/texmf-dist/tex/context/base/mkiv/scrn-wid.mkvi +++ b/Master/texmf-dist/tex/context/base/mkiv/scrn-wid.mkvi @@ -212,11 +212,10 @@ name {\attachmentparameter\c!name}% buffer {\attachmentparameter\c!buffer}% \relax - \setbox\b_scrn_attachment_link\hbox{\scrn_attachment_place}% \wd\b_scrn_attachment_link\currentattachmentwidth \ht\b_scrn_attachment_link\currentattachmentheight \dp\b_scrn_attachment_link\currentattachmentdepth - \box\b_scrn_attachment_link} + \expandnamespaceparameter\??attachmentlocation\attachmentparameter\c!location\s!unknown} \setvalue{\??attachmentmethod\v!hidden}% {\clf_insertattachment @@ -231,29 +230,48 @@ buffer {\attachmentparameter\c!buffer}% \relax} -\def\scrn_attachment_place - {\executeifdefined - {\??attachmentlocation\attachmentparameter\c!location}\hbox - {\box\b_scrn_attachment_link}} - -\setvalue{\??attachmentlocation\v!inmargin }{\inmargin } -\setvalue{\??attachmentlocation\v!leftedge }{\inleftedge } -\setvalue{\??attachmentlocation\v!rightedge }{\inrightedge } -\setvalue{\??attachmentlocation\v!leftmargin }{\inleftmargin } -\setvalue{\??attachmentlocation\v!rightmargin}{\inrightmargin} -\setvalue{\??attachmentlocation\v!high }{\high} -\setvalue{\??attachmentlocation\v!none }{\scrn_attachment_collect} -%setvalue{\??attachmentlocation\v!text }{\gobblenextargument} % gobbles the box - -\def\scrn_attachment_collect#content% +\unexpanded\def\scrn_attachment_flush_traced + {\hpack\bgroup + \blackrule % can be a fast one + [ \c!color=trace:r, + \c!width=\wd\b_scrn_attachment_link, + \c!height=\ht\b_scrn_attachment_link, + \c!depth=\dp\b_scrn_attachment_link]% + \kern-\wd\b_scrn_attachment_link + \box\b_scrn_attachment_link + \egroup} + +\unexpanded\def\scrn_attachment_flush_normal + {\box\b_scrn_attachment_link} + +\installtextracker + {attachments.anchors} + {\let\scrn_attachment_flush\scrn_attachment_flush_traced} + {\let\scrn_attachment_flush\scrn_attachment_flush_normal} + +\let\scrn_attachment_flush\scrn_attachment_flush_normal + +\setvalue{\??attachmentlocation\v!inmargin }{\inmargin {\scrn_attachment_flush}} +\setvalue{\??attachmentlocation\v!leftedge }{\inleftedge {\scrn_attachment_flush}} +\setvalue{\??attachmentlocation\v!rightedge }{\inrightedge {\scrn_attachment_flush}} +\setvalue{\??attachmentlocation\v!leftmargin }{\inleftmargin {\scrn_attachment_flush}} +\setvalue{\??attachmentlocation\v!rightmargin}{\inrightmargin{\scrn_attachment_flush}} +\setvalue{\??attachmentlocation\v!high }{\high {\scrn_attachment_flush}} + +\setvalue{\??attachmentlocation\v!none}% {\global\setbox\b_scrn_attachment_collect\hbox\bgroup \ifvoid\b_scrn_attachment_collect\else \box\b_scrn_attachment_collect \hskip\attachmentparameter\c!distance\relax \fi - #content% + \scrn_attachment_flush \egroup} +\setvalue{\??attachmentlocation\s!unknown}% + {\ifvoid\b_scrn_attachment_collect\else + \box\b_scrn_attachment_collect + \fi} + \unexpanded\def\placeattachments {\ifvoid\b_scrn_attachment_collect\else \box\b_scrn_attachment_collect @@ -317,7 +335,7 @@ % % test % -% \startcomment[symbol=Balloon] +% \startcomment[symbol=Help] % Do we want this kind of rubish? % \stopcomment % @@ -360,6 +378,9 @@ % % test +%D The implementation is mostly the same as for attachments but sharing code +%D will not make it cleaner. + \installcorenamespace{comment} \installcorenamespace{commentlocation} @@ -489,17 +510,37 @@ \dp\b_scrn_comment_link\currentcommentdepth \expandnamespaceparameter\??commentlocation\commentparameter\c!location\s!unknown} -\setvalue{\??commentmethods\v!hidden}% - {} +\letvalue{\??commentmethods\v!hidden}\donothing + +\unexpanded\def\scrn_comment_flush_traced + {\hpack\bgroup + \blackrule % can be a fast one + [ \c!color=trace:y, + \c!width=\wd\b_scrn_comment_link, + \c!height=\ht\b_scrn_comment_link, + \c!depth=\dp\b_scrn_comment_link]% + \kern-\wd\b_scrn_comment_link + \box\b_scrn_comment_link + \egroup} + +\unexpanded\def\scrn_comment_flush_normal + {\box\b_scrn_comment_link} + +\installtextracker + {comments.anchors} + {\let\scrn_comment_flush\scrn_comment_flush_traced} + {\let\scrn_comment_flush\scrn_comment_flush_normal} + +\let\scrn_comment_flush\scrn_comment_flush_normal % todo: dedicated margin classes -\setvalue{\??commentlocation\v!inmargin }{\inmargin {\box\b_scrn_comment_link}} -\setvalue{\??commentlocation\v!leftedge }{\inleftedge {\box\b_scrn_comment_link}} -\setvalue{\??commentlocation\v!rightedge }{\inrightedge {\box\b_scrn_comment_link}} -\setvalue{\??commentlocation\v!leftmargin }{\inleftmargin {\box\b_scrn_comment_link}} -\setvalue{\??commentlocation\v!rightmargin}{\inrightmargin{\box\b_scrn_comment_link}} -\setvalue{\??commentlocation\v!high }{\high {\box\b_scrn_comment_link}} +\setvalue{\??commentlocation\v!inmargin }{\inmargin {\scrn_comment_flush}} +\setvalue{\??commentlocation\v!leftedge }{\inleftedge {\scrn_comment_flush}} +\setvalue{\??commentlocation\v!rightedge }{\inrightedge {\scrn_comment_flush}} +\setvalue{\??commentlocation\v!leftmargin }{\inleftmargin {\scrn_comment_flush}} +\setvalue{\??commentlocation\v!rightmargin}{\inrightmargin{\scrn_comment_flush}} +\setvalue{\??commentlocation\v!high }{\high {\scrn_comment_flush}} \setvalue{\??commentlocation\v!none}% {\global\setbox\b_scrn_comment_collect\hbox\bgroup @@ -507,7 +548,7 @@ \box\b_scrn_comment_collect \hskip\commentparameter\c!distance\relax \fi - \box\b_scrn_comment_link + \scrn_comment_flush \egroup} \setvalue{\??commentlocation\s!unknown}% |