Changes

Jump to navigation Jump to search
2,397 bytes added ,  09:34, 21 July 2004
no edit summary
'''Direct use of <tt>mypic.pdf</tt>'''

<pre>
\externalfigure[mypic]
</pre>

Additional parameters:
<pre>
\externalfigure[file or reference name][key=value, key=value, ...]
</pre>

* scale = ''scaling value''
* factor = max, fit, broad
* wfactor, hfactor = max, fit, broad, ''value''
* width, height = ''dimension''
* frame = on, off
* preset, preview, repeat, object = yes, no
* display = ''file name''
* type, method = eps, mps, pdf, tif, png, jpg, mov, tex

If only one dimension is given, scaling is proportional.

'''Where ConTeXt finds your picture files'''

ConTeXt looks in the actual and parent directory plus those given in <tt>texmf.cnf</tt>.

You can define your own image directory with:
<pre>
\setupexternalfigures[directory={../pictures}]
</pre>
You can define the path relative or absolute, but use always forward slashes!

'''Referenced Pictures'''

Declaration of all used pictures in your environment, project or header file is better than direct use of file names in your code.

<pre>
\useexternalfigure[reference name][file name][options]
</pre>

Same options as above. You can even inherit them like this:

<pre>
\useexternalfigure[dummy][nofile][width=\textwidth]
\useexternalfigure[myone][my_pic_one][dummy]
\useexternalfigure[mytwo][my_pic_two][dummy]

Somewhere in your text there's \externalfigure[myone].
</pre>

'''Pictures as [[floating objects]]'''

Floats are numbered and placed by ConTeXt, and they can get a caption.

<pre>
\placeexternalfigure[place]{My Caption}{\externalfigure[myone]}
</pre>
<tt>place</tt> is one of:
left, right, here, top, bottom, inleft, inright, inmargin, margin, page, opposite, always, force, tall

You get ''no'' caption with </tt>none</tt>.
You get a table of figures with <tt>\showexternalfigures[alternative=a]</tt>. Alternatives (styles) a, b and c are predefined.

The second brackets of <tt>\placeexternalfigure</tt> can keep any command, e.g. <tt>\getbuffer</tt>.

You find more about floats ([[floating objects]]) in the manual.

'''Movies'''

Movies aren't recognized automatically yet, you need a more verbose declaration:
<pre>
\externalfigure[demo.mov][label=demo,width=4cm,height=4cm,preview=yes]
</pre>
<tt>preview=yes</tt> shows the first image as preview.
You find more about interactive Elements in [http://www.pragma-ade.com/general/manuals/mwidgets.pdf mwidgets.pdf]

Navigation menu