Changes

Jump to navigation Jump to search
Created page with "Documentation for \defineexternalfigure"
<cd:commandgroup name="defineexternalfigure" xmlns:cd="http://wiki.contextgarden.net/commanddoc/20200807">
<cd:shortdesc><!-- a short command summary goes here -->
The command <tt>\defineexternalfigure</tt> defines a collection of settings for {{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="defineexternalfigure" variantnumber="1">
<cd:arguments>
<cd:keywords ordinal="1">
<cd:keywordsdoc></cd:keywordsdoc>
<cd:constant type="cd:name"></cd:constant>
</cd:keywords>
<cd:keywords optional="yes" ordinal="2">
<cd:keywordsdoc></cd:keywordsdoc>
<cd:constant type="cd:name"></cd:constant>
</cd:keywords>
<cd:assignments list="yes" optional="yes" ordinal="3">
<cd:assignmentsdoc></cd:assignmentsdoc>
<cd:inherit name="setupexternalfigure"></cd:inherit>
</cd:assignments>
</cd:arguments>
</cd:command>
</cd:variants>
<cd:description>Define a collection of settings for external images, that can be invoked/inherited by name by {{cmd|externalfigure}} (which inserts an image), {{cmd|useexternalfigure}} (which defines an image file plus a collection of settings that {{cmd|externalfigure}} can invoke by name), or by another instance of {{cmd|defineexternalfigure}}.
</cd:description>
<cd:examples><cd:example title=""><texcode>
\starttext

\defineexternalfigure[test][width=2cm]

\defineexternalfigure[less][test][width=3cm,background=color,backgroundcolor=green]
\setupexternalfigure [less][height=.5cm]

\externalfigure[cow.pdf][test] \par
\externalfigure[cow.pdf][test][frame=on] \par

\useexternalfigure[test][cow.pdf][width=2cm]
\useexternalfigure[more][][test][background=color,backgroundcolor=blue]

\externalfigure[test] \par
\externalfigure[test][frame=on] \par
\externalfigure[test][width=4cm,frame=on] \par
\externalfigure[more] \par
\externalfigure[more][width=4cm,frame=on] \par

\useexternalfigure[more][][test][background=color,backgroundcolor=red]

\externalfigure[more][width=4cm,frame=on] \par
\externalfigure[cow.pdf][less][frame=on] \par

\startpagefigure[cow]\stoppagefigure

\stoptext
</texcode>
</cd:example></cd:examples>
<cd:notes></cd:notes>
<cd:seealso>
<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:commandref name="useexternalfigure"></cd:commandref>
<cd:commandref name="externalfigure"></cd:commandref></cd:seealso>
</cd:commandgroup>

Navigation menu