Difference between revisions of "Command/externalfigure"

From Wiki
Jump to navigation Jump to search
m (Make example work)
Line 28: Line 28:
 
% with its artbox, so it's not suitable for illustrating this key.
 
% with its artbox, so it's not suitable for illustrating this key.
 
\externalfigure[cow][width=4cm,size=artbox]
 
\externalfigure[cow][width=4cm,size=artbox]
</context>
+
</texcode>
  
 
== Example ==
 
== Example ==
<!-- Please fill in an example if you can -->
+
<context>
 +
\setuppapersize[A7]
 +
 
 +
% look for figure files in texmf tree
 +
\setupexternalfigures[location=default]
 +
 
 +
\placefigure[here][fig:cow]
 +
    {I never saw a purple cow. / I never hope to see one. /
 +
    but I can tell you anyhow / I'd rather see than be one.
 +
    ---Gelett Burgess}
 +
    {\externalfigure[cow][width=\textwidth, height=1cm]}
 +
</context>
  
 
== See also ==
 
== See also ==
<!-- something like {{cmd|goto}} -->
+
* {{cmd|setupexternalfigures}} to set some default settings.
  
 
== Help from ConTeXt-Mailinglist/Forum ==
 
== Help from ConTeXt-Mailinglist/Forum ==

Revision as of 18:56, 29 June 2012

\externalfigure

Syntax

\externalfigure[...][...,...=...,...]
[...] file
[...,...=...,...] see \useexternalfigure


Description

Include an external figure. If it is a pdf file, by default \externalfigure will use the mediabox; you can tell it to use the artbox instead like so:

% Unfortunately, cow.pdf is trimmed so that its mediabox coincides 
% with its artbox, so it's not suitable for illustrating this key.
\externalfigure[cow][width=4cm,size=artbox]

Example

See also

Help from ConTeXt-Mailinglist/Forum

All issues with: