Command/useexternalfigure

From ConTeXt wiki
Jump to: navigation, search

\useexternalfigure

Syntax

\useexternalfigure[...][...][...,...=...,...]
[...] name
[...] file
scale number
yscale number
yscale number
factor max fit broad
wfactor number max broad fit
hfactor number max broad fit
width dimension
height dimension
orientation -90 90 180 270
frame on off
preset yes no
display file
preview yes no
repeat yes no
object yes no
type eps mps pdf tif png jpg mov tex
method eps mps pdf tif png jpg mov tex


Description

If both width and height are set the factor is important:

none: image is deformed accordingly
max: aspect ratio is kept, the image is scaled to the bigger (oversized) variant
fit: aspect ratio is kept, the image is scaled to the smaller (fitted) variant
broad: ?? shows the same behaviour as fit

Comment

By design, \useexternalfigure works only in local scope. In order to globally declare a figure, one has to wrap it into a \[start|stop]global environment, thereby rendering it accessible outside the current group. [1]

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

\starttext
\bgroup
  \startglobal
    \useexternalfigure[kuh][cow.pdf]
  \stopglobal
  \placefigure[here]{first}{\externalfigure[kuh]}
\egroup
\placefigure[here]{second}{\externalfigure[kuh]}
\stoptext

Example

See also

Help from ConTeXt-Mailinglist/Forum

All issues with:

C O N T E X T G A R D E N

Personal tools
Namespaces
Variants
Actions
Help
External Help
Installation
Navigation
Toolbox