Command/defineexternalfigure

From Wiki
Jump to navigation Jump to search


\defineexternalfigure

Summary

The command \defineexternalfigure defines a collection of settings for \externalfigure

Settings

\defineexternalfigure[...][...][...=...,...]
[...]name
[...]name
...=...,...inherits from \setupexternalfigure

Description

Define a collection of settings for external images, that can be invoked/inherited by name by \externalfigure (which inserts an image), \useexternalfigure (which defines an image file plus a collection of settings that \externalfigure can invoke by name), or by another instance of \defineexternalfigure.

Examples

Example 1

\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

Notes

See also

Help from ConTeXt-Mailinglist/Forum

All issues with: