diff options
Diffstat (limited to 'Master/texmf-dist/tex/context/base/scrn-wid.mkvi')
-rw-r--r-- | Master/texmf-dist/tex/context/base/scrn-wid.mkvi | 34 |
1 files changed, 21 insertions, 13 deletions
diff --git a/Master/texmf-dist/tex/context/base/scrn-wid.mkvi b/Master/texmf-dist/tex/context/base/scrn-wid.mkvi index ae5f7c5567b..8dcc7a86a23 100644 --- a/Master/texmf-dist/tex/context/base/scrn-wid.mkvi +++ b/Master/texmf-dist/tex/context/base/scrn-wid.mkvi @@ -16,6 +16,7 @@ \registerctxluafile{scrn-wid}{1.001} % todo: expansion in comments (default is expanded) +% todo: check renderings ... acrobat crashes too easily on missing one \unprotect @@ -400,7 +401,7 @@ {\doifassignmentelse{#title} {\setupcurrentcomment[#title]} {\setupcurrentcomment[\c!title=#title,#settings]}% - \ctxlua{buffers.assign("\v!comment",\!!bs#text\!!es)}% todo: expansion control, but expanded by default (xml) + \ctxcommand{assignbuffer("\v!comment",\!!bs#text\!!es)}% todo: expansion control, but expanded by default (xml) \scrn_comment_inject \ignorespaces} @@ -566,8 +567,8 @@ \definereference[PauseCurrentRendering] [\v!PauseRendering {\currentrendering}] \definereference[ResumeCurrentRendering][\v!ResumeRendering{\currentrendering}] -\def\useexternalrendering{\doquadrupleempty\scrn_rendering_use} -\def\setinternalrendering{\dodoubleempty \scrn_rendering_set} +\unexpanded\def\useexternalrendering{\doquadrupleempty\scrn_rendering_use} +\unexpanded\def\setinternalrendering{\dodoubleempty \scrn_rendering_set} \def\scrn_rendering_use[#tag][#mime][#file][#option]% {\ctxcommand{registerrendering{ @@ -578,7 +579,7 @@ option = "#option", }}} -\def\scrn_rendering_set[#tag][#option]% {content} +\def\scrn_rendering_set[#tag][#option]% {content} % crappy {\bgroup \dowithnextbox {\ctxcommand{registerrendering{ @@ -615,17 +616,9 @@ \unexpanded\def\placerenderingwindow {\dodoubleempty\scrn_rendering_place_window} -\def\scrn_rendering_place_window[#window][#rendering]% +\def\scrn_rendering_place_window[#window][#rendering]% do all in lua {\bgroup \edef\currentrendering{\ifsecondargument#rendering\else#window\fi}% - \doifelse{\renderingtype\currentrendering}{internal} % an object - {\getobjectdimensions{IRO}\currentrendering - \d_scrn_rendering_height\dimexpr\objectheight+\objectdepth\relax - \d_scrn_rendering_width\objectwidth\relax - \dogetobjectreferencepage{IRO}\currentrendering\m_scrn_rendering_page}% - {\d_scrn_rendering_height\vsize - \d_scrn_rendering_width\hsize - \let\m_scrn_rendering_page\realpageno}% % create fall back if needed \edef\currentrenderingwindow{\namedrenderingwindowparameter{#window}\c!width}% stupid test, we need a proper one here \ifx\currentrenderingwindow\empty @@ -634,6 +627,21 @@ \else \edef\currentrenderingwindow{#window}% \fi + \edef\currentrenderingtype{\renderingtype\currentrendering}% + \ifx\currentrenderingtype\s!internal + \getobjectdimensions{IRO}\currentrendering + \d_scrn_rendering_height\dimexpr\objectheight+\objectdepth\relax + \d_scrn_rendering_width\objectwidth\relax + \dogetobjectreferencepage{IRO}\currentrendering\m_scrn_rendering_page + \else\ifx\currentrenderingwindow\s!default + \d_scrn_rendering_height\vsize + \d_scrn_rendering_width \hsize + \let\m_scrn_rendering_page\realpageno + \else + \d_scrn_rendering_height\renderingwindowparameter\c!height + \d_scrn_rendering_width \renderingwindowparameter\c!width + \let\m_scrn_rendering_page\realpageno + \fi\fi % todo: % \handlereferenceactions{\renderingwindowparameter\c!openpageaction }\dosetuprenderingopenpageaction % \handlereferenceactions{\renderingwindowparameter\c!closepageaction}\dosetuprenderingclosepageaction |