diff options
author | Hans Hagen <pragma@wxs.nl> | 2012-06-26 10:59:00 +0200 |
---|---|---|
committer | Hans Hagen <pragma@wxs.nl> | 2012-06-26 10:59:00 +0200 |
commit | 27fb5e9d85d8abbe7627085ef5141e944c10fd92 (patch) | |
tree | cf5d74140483d1ff52553eb1d1123ee541f395d7 /tex | |
parent | a52bc2cb1de043ba716e968e7b6c8a176d7ec528 (diff) | |
download | context-27fb5e9d85d8abbe7627085ef5141e944c10fd92.tar.gz |
beta 2012.06.26 10:59
Diffstat (limited to 'tex')
-rw-r--r-- | tex/context/base/cont-new.mkii | 2 | ||||
-rw-r--r-- | tex/context/base/cont-new.mkiv | 2 | ||||
-rw-r--r-- | tex/context/base/context-version.pdf | bin | 4149 -> 4147 bytes | |||
-rw-r--r-- | tex/context/base/context-version.png | bin | 106273 -> 106247 bytes | |||
-rw-r--r-- | tex/context/base/context.mkii | 2 | ||||
-rw-r--r-- | tex/context/base/context.mkiv | 2 | ||||
-rw-r--r-- | tex/context/base/grph-epd.mkiv | 4 | ||||
-rw-r--r-- | tex/context/base/grph-inc.mkiv | 11 | ||||
-rw-r--r-- | tex/context/base/meta-imp-dum.mkiv | 123 | ||||
-rw-r--r-- | tex/context/base/mult-def.mkiv | 1 | ||||
-rw-r--r-- | tex/context/base/status-files.pdf | bin | 24530 -> 24505 bytes | |||
-rw-r--r-- | tex/context/base/status-lua.pdf | bin | 182498 -> 182500 bytes | |||
-rw-r--r-- | tex/generic/context/luatex/luatex-fonts-merged.lua | 2 |
13 files changed, 82 insertions, 67 deletions
diff --git a/tex/context/base/cont-new.mkii b/tex/context/base/cont-new.mkii index dcdcc237f..3ee2a446c 100644 --- a/tex/context/base/cont-new.mkii +++ b/tex/context/base/cont-new.mkii @@ -11,7 +11,7 @@ %C therefore copyrighted by \PRAGMA. See mreadme.pdf for %C details. -\newcontextversion{2012.06.25 14:53} +\newcontextversion{2012.06.26 10:59} %D This file is loaded at runtime, thereby providing an %D excellent place for hacks, patches, extensions and new diff --git a/tex/context/base/cont-new.mkiv b/tex/context/base/cont-new.mkiv index 85683bb19..f3227b9c6 100644 --- a/tex/context/base/cont-new.mkiv +++ b/tex/context/base/cont-new.mkiv @@ -11,7 +11,7 @@ %C therefore copyrighted by \PRAGMA. See mreadme.pdf for %C details. -\newcontextversion{2012.06.25 14:53} +\newcontextversion{2012.06.26 10:59} %D This file is loaded at runtime, thereby providing an %D excellent place for hacks, patches, extensions and new diff --git a/tex/context/base/context-version.pdf b/tex/context/base/context-version.pdf Binary files differindex a38f6ef8b..6158e4aee 100644 --- a/tex/context/base/context-version.pdf +++ b/tex/context/base/context-version.pdf diff --git a/tex/context/base/context-version.png b/tex/context/base/context-version.png Binary files differindex 07406e58d..1b1cacf07 100644 --- a/tex/context/base/context-version.png +++ b/tex/context/base/context-version.png diff --git a/tex/context/base/context.mkii b/tex/context/base/context.mkii index 1d29cfcec..62880781a 100644 --- a/tex/context/base/context.mkii +++ b/tex/context/base/context.mkii @@ -20,7 +20,7 @@ %D your styles an modules. \edef\contextformat {\jobname} -\edef\contextversion{2012.06.25 14:53} +\edef\contextversion{2012.06.26 10:59} %D For those who want to use this: diff --git a/tex/context/base/context.mkiv b/tex/context/base/context.mkiv index b0d1491d4..279920315 100644 --- a/tex/context/base/context.mkiv +++ b/tex/context/base/context.mkiv @@ -23,7 +23,7 @@ %D up and the dependencies are more consistent. \edef\contextformat {\jobname} -\edef\contextversion{2012.06.25 14:53} +\edef\contextversion{2012.06.26 10:59} %D For those who want to use this: diff --git a/tex/context/base/grph-epd.mkiv b/tex/context/base/grph-epd.mkiv index d0d2e1b81..26c07e731 100644 --- a/tex/context/base/grph-epd.mkiv +++ b/tex/context/base/grph-epd.mkiv @@ -22,7 +22,7 @@ \defineoverlay[system:graphics:epdf][\directsetup{system:graphics:epdf}] \startsetups system:graphics:epdf - \ctxlua{figures.mergegoodies("\@@efinteraction")}% + \ctxlua{figures.mergegoodies("\externalfigureparameter\c!interaction")}% \reference[\figurereference]{}% todo: dest area \stopsetups @@ -39,7 +39,7 @@ \appendtoks \iflocation - \doif\figurefiletype{pdf}{\doifnot\@@efinteraction\v!none\grph_epdf_add_overlay}% + \doif\figurefiletype{pdf}{\doifnot{\externalfigureparameter\c!interaction}\v!none\grph_epdf_add_overlay}% \fi \to \externalfigurepostprocessors diff --git a/tex/context/base/grph-inc.mkiv b/tex/context/base/grph-inc.mkiv index 8c191e05e..72b2fee56 100644 --- a/tex/context/base/grph-inc.mkiv +++ b/tex/context/base/grph-inc.mkiv @@ -569,17 +569,6 @@ state: \expanded{\verbatimstring{#3}}}% \egroup} -% \def\grph_include_placeholder#1#2#3% -% {\bgroup -% \setexternalfiguresparameter\c!width{#2}% -% \setexternalfiguresparameter\c!height{#3}% -% \letexternalfiguresparameter\c!frame\v!on -% \inheritedexternalfiguresframed -% {\tt\tfxx \nohyphens -% name: \expanded{\verbatimstring{#1}}\\% -% state: \expanded{\verbatimstring{placeholder}}}% -% \egroup} - % maybe setuphandler \newconditional\c_grph_include_in_collection diff --git a/tex/context/base/meta-imp-dum.mkiv b/tex/context/base/meta-imp-dum.mkiv index a622d94f4..489d5d253 100644 --- a/tex/context/base/meta-imp-dum.mkiv +++ b/tex/context/base/meta-imp-dum.mkiv @@ -59,7 +59,7 @@ % clip currentpicture to p ; % \stopuseMPgraphic -\startuseMPgraphic{placeholder}{width,height,reduction,color} +\startuseMPgraphic{figure:placeholder}{width,height,reduction,color} numeric w, h, d, r ; path p ; if cmykcolor \MPvar{color} : cmykcolor c, b ; b := (0,0,0,0) @@ -82,66 +82,79 @@ clip currentpicture to p ; \stopuseMPgraphic +\defineoverlay + [figure:placeholder:graphic] + [\useMPgraphic + {figure:placeholder}% + {width=\figurewidth,% + height=\figureheight,% + reduction=\externalfiguresparameter\c!reduction,% + color=placeholder:\the\c_grph_replacement_n}] + \definepalet [placeholder] [1=red,2=green,3=blue,4=cyan,5=magenta,6=yellow] -% \newcounter \figurereplacementcycle - -\let\figurereplacementcycle\relax +\newcount\c_grph_replacement_n \setupexternalfigures [\c!reduction=0, \c!text=\v!yes] -\let\normalexternalfigurereplacement\externalfigurereplacement +\let\grph_include_replacement_saved\grph_include_replacement -\unexpanded\def\externalfigurereplacement#1#2#3% - {\getpaletsize[placeholder]% - \ifx\figurereplacementcycle\relax - \getrandomnumber \figurereplacementcycle \!!plusone \paletsize - \globallet \figurereplacementcycle \figurereplacementcycle +\unexpanded\def\grph_include_replacement#1#2#3% + {\begingroup + \getpaletsize[placeholder]% + \ifnum\c_grph_replacement_n=\zerocount + \getrandomnumber \m_grph_replacement_n\plusone\paletsize + \global\c_grph_replacement_n \m_grph_replacement_n\relax \else - \doglobal\increment\figurereplacementcycle + \global\advance\c_grph_replacement_n\plusone \fi - \ifnum\figurereplacementcycle>\paletsize - \globallet\figurereplacementcycle\!!plusone + \ifnum\c_grph_replacement_n>\paletsize + \global\c_grph_replacement_n\plusone \fi - \defineoverlay - [\s!dummy] - [\useMPgraphic - {placeholder}% - {width=\figurewidth, - height=\figureheight, - reduction=\@@efreduction, - color=placeholder:\figurereplacementcycle}]% - \expanded{\localframed - [\??ef] + \setupcurrentexternalfigures [\c!width=\figurewidth, \c!height=\figureheight, \c!frame=\v!off, \c!strut=\v!no, - \c!background=\s!dummy, - \c!foregroundcolor=\s!white]}% - {\doif\@@eftext\v!yes - {\infofont \setupinterlinespace \dohyphens % \nohyphens - \edef\tempa{#1}\ifx\tempa\s!dummy\let\tempa\empty\fi - \edef\tempb{#2}\ifx\tempb\s!dummy\let\tempb\empty\fi - \edef\tempc{#3}\ifx\tempc\s!dummy\let\tempc\empty\fi - \ifx\tempa\empty\else - name: \expanded{\verbatimstring{#1}}\strut\endgraf - \fi - \ifx\tempb\empty\else - \ifx\tempa\empty\ifx\tempc\empty\else file: \fi\else file: \fi - \expanded{\verbatimstring{#2}}\strut\endgraf - \fi - \ifx\tempc\empty\else - state: \expanded{\verbatimstring{#3}}\strut\endgraf - \fi}}} + \c!background=figure:placeholder:graphic, + \c!foregroundcolor=\s!white]% + \doifelse{\externalfiguresparameter\c!text}\v!yes + {\edef\m_graphics_text_a{#1}\edef\m_graphics_text_a{\ifx\m_graphics_text_a\s!dummy\else\detokenize\expandafter{\m_graphics_text_a}\fi}% + \edef\m_graphics_text_b{#2}\edef\m_graphics_text_b{\ifx\m_graphics_text_b\s!dummy\else\detokenize\expandafter{\m_graphics_text_b}\fi}% + \edef\m_graphics_text_c{#3}\edef\m_graphics_text_c{\ifx\m_graphics_text_c\s!dummy\else\detokenize\expandafter{\m_graphics_text_c}\fi}% + \infofont\setupinterlinespace\dohyphens + \inheritedexternalfiguresframed{\directsetup{figure:placeholder:text}}}% + {\inheritedexternalfiguresframed{}}% + \endgroup} \unexpanded\def\dummyfigure {\externalfigure[placeholder]} +\startsetups figure:placeholder:text + \ifx\m_graphics_text_a\empty\else + \strut name: \m_graphics_text_a\par + \fi + \ifx\m_graphics_text_b\empty\else + \strut + \ifx\m_graphics_text_a\empty + \ifx\m_graphics_text_c\empty + \else + file:\space + \fi + \else + file:\space + \fi + \m_graphics_text_b\par + \fi + \ifx\m_graphics_text_c\empty\else + \strut state: \m_graphics_text_c\par + \fi +\stopsetups + %D \starttyping %D \externalfigure[mediashow.swf][comment={Alas, we have no nice preview},background=figure:comment] %D \externalfigure[mediashow.swf][comment={Alas, we have no nice preview},background=figure:dummy] @@ -151,7 +164,7 @@ \defineframed [figurecomment] [\c!background=\v!color, - \c!backgroundcolor=\v!gray, + \c!backgroundcolor=\s!gray, \c!frame=\v!off, \c!foregroundstyle=\ttbf, \c!align={\v!middle,\v!lohi}, @@ -160,8 +173,8 @@ \defineframed [figuredummy] - [\c!background=figure:placeholder, - \c!foregroundcolor=white, + [\c!background=figure:dummy, + \c!foregroundcolor=\s!white, \c!backgroundcolor=\v!gray, \c!frame=\v!off, \c!foregroundstyle=\ttbf, @@ -170,18 +183,30 @@ \c!width=\figurewidth] \defineoverlay - [figure:placeholder] - [\externalfigurereplacement{}{}{}] + [figure:dummy] + [\grph_include_replacement\empty\empty\empty] \defineoverlay [figure:comment] - [\figurecomment{\@@efcomment}] + [\figurecomment{\externalfiguresparameter\c!comment}] \defineoverlay [figure:dummy] - [\figuredummy{\@@efcomment}] + [\figuredummy{\externalfiguresparameter\c!comment}] \setupexternalfigures - [comment=] + [\c!comment=] + +\protect + +\continueifinputfile{meta-imp-dum.mkiv} + +\starttext + + \externalfigure[whatever-missing] + + \blank + + \externalfigure[whatever-missing][width=2cm] -\protect \endinput +\stoptext diff --git a/tex/context/base/mult-def.mkiv b/tex/context/base/mult-def.mkiv index 68931d936..fc2c334f6 100644 --- a/tex/context/base/mult-def.mkiv +++ b/tex/context/base/mult-def.mkiv @@ -46,6 +46,7 @@ \def\c!comma {comma} \def\c!period {period} \def\c!monthconversion{monthconversion} +\def\c!comment {comment} \def\v!notation {notation} \def\v!endnote {endnote} diff --git a/tex/context/base/status-files.pdf b/tex/context/base/status-files.pdf Binary files differindex 28d06a4b0..08010c8b9 100644 --- a/tex/context/base/status-files.pdf +++ b/tex/context/base/status-files.pdf diff --git a/tex/context/base/status-lua.pdf b/tex/context/base/status-lua.pdf Binary files differindex 7d911a219..8b8f0f3dc 100644 --- a/tex/context/base/status-lua.pdf +++ b/tex/context/base/status-lua.pdf diff --git a/tex/generic/context/luatex/luatex-fonts-merged.lua b/tex/generic/context/luatex/luatex-fonts-merged.lua index 6d7eecdde..8e9102cb6 100644 --- a/tex/generic/context/luatex/luatex-fonts-merged.lua +++ b/tex/generic/context/luatex/luatex-fonts-merged.lua @@ -1,6 +1,6 @@ -- merged file : luatex-fonts-merged.lua -- parent file : luatex-fonts.lua --- merge date : 06/25/12 14:53:41 +-- merge date : 06/26/12 10:59:33 do -- begin closure to overcome local limits and interference |