Open main menu

Changes

58 bytes added ,  11:10, 2 September 2004
m
changed pre to texcode and tt to cmd
'''Direct use of <tt>mypic.pdf</tt>'''
<pretexcode>
\externalfigure[mypic]
</pretexcode>
Additional parameters:
<pretexcode>
\externalfigure[file or reference name][key=value, key=value, ...]
</pretexcode>
* scale = ''scaling value''
You can define your own image directory with:
<pretexcode>
\setupexternalfigures[directory={../pictures}]
</pretexcode>
You can define the path relative or absolute, but use always forward slashes!
Declaration of all used pictures in your environment, project or header file is better than direct use of file names in your code.
<pretexcode>
\useexternalfigure[reference name][file name][options]
</pretexcode>
Same options as above. You can even inherit them like this:
<pretexcode>
\useexternalfigure[dummy][nofile][width=\textwidth]
\useexternalfigure[myone][my_pic_one][dummy]
Somewhere in your text there's \externalfigure[myone].
</pretexcode>
'''Pictures as [[Floating Objects]]'''
Floats are numbered and placed by ConTeXt, and they can get a caption.
<pretexcode>
\placeexternalfigure[place]{My Caption}{\externalfigure[myone]}
</pretexcode>
<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 <ttcmd>\showexternalfigures[alternative=a]</ttcmd>. Alternatives (styles) a, b and c are predefined.
The second brackets of <ttcmd>\placeexternalfigure</ttcmd> can keep any command, e.g. <ttcmd>\getbuffer</ttcmd>.
You find more about floats ([[Floating Objects]]) in the manual.
Movies aren't recognized automatically yet, you need a more verbose declaration:
<pretexcode>
\externalfigure[demo.mov][label=demo,width=4cm,height=4cm,preview=yes]
</pretexcode>
<tt>preview=yes</tt> shows the first image as preview.
You find more about interactive Elements in [http://www.pragma-ade.com/general/manuals/mwidget-s.pdf mwidget-s.pdf]