diff options
author | Taco Hoekwater <taco@elvenkind.com> | 2011-06-01 08:54:21 +0000 |
---|---|---|
committer | Taco Hoekwater <taco@elvenkind.com> | 2011-06-01 08:54:21 +0000 |
commit | d7ccb42582f85acf30568913610ccf4d602023fb (patch) | |
tree | 7292e3545a420676878e7451b68892d360c62cb6 /Master/texmf-dist/tex/context/base/grph-fig.mkiv | |
parent | 2d62a6fe9b80def59c392268022f1f9a2d6e358f (diff) |
commit context 2011.05.18
git-svn-id: svn://tug.org/texlive/trunk@22719 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/context/base/grph-fig.mkiv')
-rw-r--r-- | Master/texmf-dist/tex/context/base/grph-fig.mkiv | 41 |
1 files changed, 16 insertions, 25 deletions
diff --git a/Master/texmf-dist/tex/context/base/grph-fig.mkiv b/Master/texmf-dist/tex/context/base/grph-fig.mkiv index e10dc0a32c6..fad1c864a6f 100644 --- a/Master/texmf-dist/tex/context/base/grph-fig.mkiv +++ b/Master/texmf-dist/tex/context/base/grph-fig.mkiv @@ -11,6 +11,8 @@ %C therefore copyrighted by \PRAGMA. See mreadme.pdf for %C details. +% ex => ef with proper parent + \writestatus{loading}{ConTeXt Graphic Macros / Figure Handling} \unprotect @@ -41,23 +43,23 @@ \def\dodoplaceexternalfigure[#1][#2][#3][#4][#5]% {\bgroup - \pushmacro\textunderscore - \edef\textunderscore{\string_}% brrr, temp hack, still needed? + \dostarttagged\t!image\empty + \let\textunderscore\letterunderscore % {\string _} % space needed as _ is now letter in unprotected mode \calculateexternalfigure[][#1][#2][#3][#4][#5]% [] is dummy dwcomp - \popmacro\textunderscore - \box\foundexternalfigure + \naturalvbox attr \imageattribute 2 {\box\foundexternalfigure}% + \dostoptagged \egroup} \def\externalfigurereplacement#1#2#3% {\setupcolors [\c!state=\v!local]% - \expanded{\localframed + \normalexpanded{\localframed [\??ef] [\c!width=\figurewidth, \c!height=\figureheight, \c!background=\v!color, \c!backgroundcolor=missingfigurecolor, - \c!frame=\@@efframe]}% + \c!frame=\@@efframe]}% we need to expand this in order to prevent a loop {\tt\tfxx \nohyphens name: \expanded{\verbatimstring{#1}}\\% file: \expanded{\verbatimstring{#2}}\\% @@ -160,7 +162,7 @@ \def\dodouseexternalfigure#1#2#3#4% {\setvalue{\??ef\??ef#1}{\doplaceexternalfigure[#1][#2][#3][#4]}% - \doanalyseexternalfigurecollection[#2][#4]} + \doanalyzeexternalfigurecollection[#2][#4]} \newconditional\inexternalfigurecollection \newdimen\xexternalfigurecollectionminwidth @@ -168,7 +170,7 @@ \newdimen\xexternalfigurecollectionminheight \newdimen\xexternalfigurecollectionmaxheight -\def\doanalyseexternalfigurecollection[#1][#2]% +\def\doanalyzeexternalfigurecollection[#1][#2]% {\ifconditional\inexternalfigurecollection \setfalse\inexternalfigurecollection \getfiguredimensions[#1][#2]% @@ -259,7 +261,7 @@ \let\currentresourcecomment\empty \def\showexternalfigures % maybe run time command is better, but no core-run, unless figs-run ... - {%\writestatus\m!systems{for \string\showexternalfigures\space see \truefilename{x-res-20}.tex} + {%\writestatus\m!system{for \string\showexternalfigures\space see \truefilename{x-res-20}.tex} \usemodule[res-20]\showexternalfigures} % so for the moment we do it this way \def\overlayfigure#1% @@ -513,21 +515,11 @@ \dodotypesetbuffer[\jobname][] \fi\fi} -% \def\dodotypesetbuffer[#1][#2]% -% {\bgroup -% \global\advance\noftypesetbuffers\plusone -% \edef\bufferfilename{\jobname-buffer-\the\noftypesetbuffers}% -% \doifmode{*\v!first} -% {\ctxlua{buffers.save("\bufferfilename.tmp","#1",true)}% -% \executesystemcommand{context \bufferfilename.tmp}}% -% \externalfigure[\bufferfilename.pdf][#2]% -% \egroup} - \def\dodotypesetbuffer[#1][#2]% {\bgroup \global\advance\noftypesetbuffers\plusone \edef\bufferfilename{\jobname-buffer-\the\noftypesetbuffers}% - \ctxlua{buffers.run("\bufferfilename.tmp","#1",true)}% + \ctxcommand{runbuffer("\bufferfilename.tmp","#1",true)}% \externalfigure[\bufferfilename.pdf][#2]% \egroup} @@ -551,10 +543,7 @@ \definesystemvariable{tz} \unexpanded\def\definetypesetting{\dotripleempty\dodefinetypesetting} -\def\typesetfile {\dotripleempty\dotypesetfile} - -\unexpanded\def\definetypesetting{\dotripleempty\dodefinetypesetting} -\def\typesetfile {\dotripleempty\dotypesetfile} +\unexpanded\def\typesetfile {\dotripleempty\dotypesetfile} \def\dodefinetypesetting[#1][#2][#3]% <name> options settings-a {\doifsomething{#1}{\setvalue{\??tz#1}{\dodotypesetfile{#2}{#3}}}} @@ -569,13 +558,14 @@ \fi\fi\fi} \def\dodotypesetfile#1#2#3#4% options settings-a filename settings-b - {\edef\typesetfilename{\ctxlua{tex.write(jobfiles.run("#3","#1"))}}% + {\edef\typesetfilename{\ctxlua{tex.write(job.files.context("#3","#1"))}}% \expanded{\externalfigure[\typesetfilename]}[#2,#4]} \setupexternalfigures [\c!option=, \c!object=\v!yes, % we only check for no \c!reset=\v!no, + \c!interaction=\v!none, \c!maxwidth=\@@efwidth, \c!maxheight=\@@efheight, \c!bodyfont=\bodyfontsize, @@ -587,6 +577,7 @@ \c!background=, % new \c!splitcolor=\s!white, \c!conversion=, + \c!resolution=, \c!prefix=, \c!cache=, % \c!grid=, |