diff options
author | Context Git Mirror Bot <phg42.2a@gmail.com> | 2016-07-11 15:16:51 +0200 |
---|---|---|
committer | Context Git Mirror Bot <phg42.2a@gmail.com> | 2016-07-11 15:16:51 +0200 |
commit | 74326d3975653dbc32ce3cd8b431dba40917e7dc (patch) | |
tree | ad16fccb5e232ebcb1e14f0cf3287dc5cc15bcbc /tex/context/base/mkiv/page-sel.mkvi | |
parent | 3691e25e611249750a260ec00aa139ba82a37bca (diff) | |
download | context-74326d3975653dbc32ce3cd8b431dba40917e7dc.tar.gz |
2016-07-11 13:48:00
Diffstat (limited to 'tex/context/base/mkiv/page-sel.mkvi')
-rw-r--r-- | tex/context/base/mkiv/page-sel.mkvi | 19 |
1 files changed, 14 insertions, 5 deletions
diff --git a/tex/context/base/mkiv/page-sel.mkvi b/tex/context/base/mkiv/page-sel.mkvi index eb8389032..b6bb3174d 100644 --- a/tex/context/base/mkiv/page-sel.mkvi +++ b/tex/context/base/mkiv/page-sel.mkvi @@ -45,6 +45,9 @@ %D %D This macros inserts the page, according to the settings provided. +%D Beware: width is not the width of the image, but height can be used to control +%D its dimensions. + \installcorenamespace{withpages} \installsetuponlycommandhandler \??withpages {withpages} @@ -108,13 +111,19 @@ \egroup} \def\page_selectors_filter_a_page#filename#page% - {\hbox to \textwidth + {\hpack to \textwidth {\ifdim\scratchwidth>\zeropoint \rightorleftpageaction{\scratchwidth\zeropoint}{\hfill}% \fi - \setbox\scratchbox\hbox + \setbox\scratchbox\hpack {\hskip-\scratchwidth - \externalfigure[#filename][\c!page=#page,\c!height=\textheight]\hss}% + \edef\p_category{\directwithpagesparameter\c!category}% \useexternalfigure[foo][width=\textwidth] + \ifx\p_category\empty + \externalfigure[#filename][\c!page=#page,\c!height=\textheight]% + \else + \externalfigure[#filename][\p_category][\c!page=#page]% + \fi + \hss}% \wd\scratchbox\zeropoint \box\scratchbox} \page} @@ -132,7 +141,7 @@ {\vbox to \textheight {\hsize\textwidth \centeredbox - {\doifelse{\directwithpagesparameter\c!marking}\v!on\cuthbox\hbox % only place where cuthbox is used + {\doifelse{\directwithpagesparameter\c!marking}\v!on\cuthbox\hpack % only place where cuthbox is used {\ifdim\scratchoffset>\zeropoint\relax \advance\vsize -2\scratchoffset \advance\hsize -2\scratchoffset @@ -199,7 +208,7 @@ \directwithpagesparameter\c!after \egroup} -\setvalue{\??combinepagesalternative\v!a}% +\setvalue{\??combinepagesalternative\v!a}% use hpacks {\global\combinedpagescounter\directwithpagesparameter\c!start\relax \doloop {\vbox to \textheight |