Command/defineexternalfigure

From ConTeXt wiki
< Command
Revision as of 12:16, 11 October 2019 by Usonianhorizon (talk | contribs)
Jump to navigationJump to search

\defineexternalfigure

Syntax (autogenerated)]

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


Syntax

\defineexternalfigure[...][...]
[...] name
[...] settings, see \setupexternalfigures
\defineexternalfigure[...][...][...]
[...] name
[...] name of parent to inherit from
[...=...] settings, see \setupexternalfigures


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.

Example

\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

See also

Help from ConTeXt-Mailinglist/Forum

All issues with: