Changes

Jump to navigation Jump to search
Created page with "Documentation for \useexternalfigure"
<cd:commandgroup name="useexternalfigure" xmlns:cd="http://wiki.contextgarden.net/commanddoc/20200807">
<cd:shortdesc>The command <tt>\useexternalfigure</tt> creates a preset to use with {{cmd|externalfigure}}
</cd:shortdesc>
<cd:variants>
<cd:command category="graphics" file="grph-inc.mkiv" interfacedate="2020-07-14T09:24" interfacefile="i-graphics.xml" level="style" name="useexternalfigure" variantnumber="1">
<cd:arguments>
<cd:keywords ordinal="1">
<cd:keywordsdoc></cd:keywordsdoc>
<cd:constant type="cd:name"></cd:constant>
</cd:keywords>
<cd:keywords ordinal="2">
<cd:keywordsdoc></cd:keywordsdoc>
<cd:constant type="cd:file"></cd:constant>
</cd:keywords>
<cd:keywords optional="yes" ordinal="3">
<cd:keywordsdoc></cd:keywordsdoc>
<cd:constant type="cd:name"></cd:constant>
</cd:keywords>
<cd:assignments list="yes" optional="yes" ordinal="4">
<cd:assignmentsdoc></cd:assignmentsdoc>
<cd:inherit name="setupexternalfigure"></cd:inherit>
</cd:assignments>
</cd:arguments>
</cd:command>
</cd:variants>
<cd:description><!-- the long description of the command goes here -->
</cd:description>
<cd:examples><cd:example title=""><texcode>
\useexternalfigure[kuh][cow.pdf][width=2cm]

\starttext
\externalfigure[kuh]
\stoptext
</texcode></cd:example><cd:example title="">By design, {{cmd|useexternalfigure}} works only in local scope.
In order to globally declare a figure, one has to wrap it into a
{{cmd|startglobal}} environment, thereby rendering it
accessible outside the current group.
[http://www.ntg.nl/pipermail/ntg-context/2011/056976.html]

''NB'': The drawback is that other local stuff might be leaked into
the global environment.

<texcode>
\starttext
\bgroup
\startglobal
\useexternalfigure[kuh][cow.pdf]
\stopglobal
\placefigure[here]{first}{\externalfigure[kuh]}
\egroup
\placefigure[here]{second}{\externalfigure[kuh]}
\stoptext
</texcode>
</cd:example></cd:examples>
<cd:notes></cd:notes>
<cd:seealso>
<cd:commandref name="defineexternalfigure" originator="system"></cd:commandref>
<cd:commandref name="setupexternalfigure" originator="system"></cd:commandref>
<cd:source file="grph-inc.mkiv" originator="system"></cd:source>
<cd:wikipage originator="system" page="Category:Graphics"></cd:wikipage></cd:seealso>
</cd:commandgroup>

Navigation menu