############################################################
# @(#) Images, Dirk Hagedorn, 1996/04/16
############################################################
!subnode Images

UDO enables you to include images into your destination format if it
supports images like ST-Guide, (!LaTeX), HTML and Windows Help.
This chapter explains how to include images into a destination
file and what destination commands UDO generates.

!index !/image
To display an image you can use the (!I)!/image(!i) command. You have to add
the name of the image (!I)without(!i) suffix and an optional image title.

!index (!/img ...)
To display images right inside the text you can use the placeholder
(!I)(!/img ..)(!i) when converting into Windows Help or HTML. The other
formats don't allow to use images inside the text or it is so difficult that
UDO can't automatize it.

Since Release 6 images will not be centred in all cases. To display a
centred image you have to insert the (!I)!/image(!i) command into a center
environment. To display a right justified image you have to insert the
(!I)!/image(!i) command inside a flushright environment. In all other cases
images will be displayed left justified.

############################################################
!subsubnode *.img & ST-Guide

Example: (!T)!/image tiger A tiger(!t)

UDO opens the file (!T)tiger.img(!t) and reads the size of this image. A
special ST-Guide command called (!T)@limage(!t) is generated and the needed
parameters are calculated due to the information of the GEM image header.

If you want to display a subtitle add it right after the name of the image
file. This subtitle will look like ""(Figure x: A tiger)"".

############################################################
!subsubnode *.img & Lindner-(!TeX)

If you are using Lindner-(!TeX) and you want to include a GEM image into
your DVI file you have to add (!I)!/tex_lindner(!i) to your preamble.

UDO replaces the tool called (!T)IMGTOTEX(!t) that is part of
Lindner-(!TeX). UDO has all functions of this tool built in.

To set the size of an image you have to use the (!I)!/tex_dpi(!i) command.
An example:

!begin_quote
!begin_verbatim
!tex_dpi 100
!image tiger A GEM image
!end_verbatim
!end_quote

UDO reads in the header of (!V)tiger.img(!v), calculates its size and
adjusts the header to 100 dpi. In the destination file a (!TeX) macro will
be generated that includes this image and displays it with 100 dpi.

!smallskip

(!HINT) Using 100 dpi screenshots are displayed in the original screen
size on my HP DeskJet 510. (!I)!/tex_dpi(!i) can be used before any image.
If you are using an image more than once you shouldn't try to display it in
different resolutions. Use a copy of your image instead and display the
original one with the first and the copy with the second resolution.

############################################################
!subsubnode *.img & CS-(!TeX)/Multi(!TeX)

If you are using CS-(!TeX) or Multi(!TeX) and you want to include a GEM
image into your DVI file you have to add (!I)!/tex_strunk(!i) to your
preamble.

Because the drivers of CS-(!TeX) support the macros of Lindner-(!TeX) the
same is done here as in the upper section.

############################################################
!subsubnode *.msp & em(!TeX)

If you are using em(!TeX) and you want to include an MSP image to your DVI
file you have to add (!I)!/tex_emtex(!i) to your preamble. Furthermore you
have to set the resolution of an image via (!I)!/tex_dpi(!i).

The macros for em(!TeX) are generated according to the information of
(!V)dvidrv.doc(!v) of em(!TeX).

In first place UDO tries to read in the header of (!V)tiger.msp(!v) when
reading the command (!T)!/image tiger A tiger(!t). If UDO doesn't find
(!V)tiger.msp(!v) it will try to find (!V)tiger.pcx(!v).

An example shows what kind of macro UDO generates for em(!TeX). ''w'' and
''h'' represent the width and height of the image:

!begin_quote
!begin_verbatim
\begin{figure}[htb]
\begin{...}
\begin{picture}(<w>,<h>)
    \put(0,<h>){\special{em:graph tiger.msp}}
\end{picture}
\end{...}
\caption{A tiger}
\end{figure}
!end_verbatim
!end_quote

(!HINT) I use (!I)!/tex_dpi 300(!i) on my HP DeskJet 510 to display
screenshots.

############################################################
!subsubnode *.pcx & em(!TeX)

If you are using em(!TeX) and you want to include a Paintbrush PCX to your
DVI file you have to add (!I)!/tex_emtex(!i) to your preamble. Furthermore
you have to set the resolution of an image via (!I)!/tex_dpi(!i).

The macros for em(!TeX) are generated according to the information of
(!V)dvidrv.doc(!v) of em(!TeX).

In first place UDO tries to read in the header of (!V)tiger.msp(!v) when
reading the command (!T)!/image tiger A tiger(!t). If UDO doesn't find
(!V)tiger.msp(!v) it will try to find (!V)tiger.pcx(!v).

An example shows what kind of macro UDO generates for em(!TeX). ''w'' and
''h'' represent the width and height of the image:

!begin_quote
!begin_verbatim
\begin{figure}[htb]
\begin{...}
\begin{picture}(<w>,<h>)
    \put(0,<h>){\special{em:graph tiger.pcx}}
\end{picture}
\end{...}
\caption{A tiger}
\end{figure}
!end_verbatim
!end_quote

!smallskip

(!B)Note:(!b) In first place UDO tries to find an MSP image. If you are using
images from Paintbrush PCX you can ignore the warning printed by UDO.

############################################################
!subsubnode *.gif & HTML

UDO can generate HTML commands to include a GIF. UDO doesn't check if the
GIF is existing!

For HTML the second parameter of the (!I)!/image(!i) command will be used as
the alternative text. The command (!T)!/image tiger A tiger(!t) will be
converted into the following HTML commands:

!begin_quote
!begin_verbatim
<p align=...>
<img src="tiger.gif" alt="(Figure 1: A tiger)">
</p><br>
!end_verbatim
!end_quote

If you don't set the title of this image UDO doesn't output an alternative
text. The command (!T)!/image tiger(!t) will be converted into this:

!begin_quote
!begin_verbatim
<p align=...>
<img src="../gif/tiger.gif" alt="">
</p><br>
!end_verbatim
!end_quote


############################################################
!subsubnode *.jpg & HTML
!ignore_links

By default UDO expects that you want to display GIF's (see above). But it's
possible to display any other kind of image format, too.

!index !/html_img_suffix

To tell UDO which suffix you want to use the next time you use the
(!I)!/image(!i) command you can use the command (!I)!/html_img_suffix(!i).

If the upper tiger isn't inside a GIF but inside a JPEG image you can insert
the following command right before the (!I)!/image(!i) command:

!begin_quote
!begin_verbatim
!html_img_suffix jpg
!end_verbatim
!end_quote

If the file is named (!V)tiger.jpeg(!v) instead of (!V)tiger.jpg(!v) use the
following line:

!begin_quote
!begin_verbatim
!html_img_suffix jpeg
!end_verbatim
!end_quote

The setting is used for all following images. If you want to display a GIF
next time you have to use (!I)!/html_img_suffix~gif(!i) before the next
(!I)!/image(!i) command is used.

############################################################
!subsubnode *.bmp & WinHelp

UDO can generate commands for Windows Help to display Windows bitmaps (BMP).
UDO doesn't check if a BMP is existing!

An image can be displayed with or without a subtitle. Windows Help centers
the image in the help file.

!begin_enumerate
!item without subtitle: (!T)!/image tiger(!t)
!item with subtitle: (!T)!/image tiger A tiger(!t)
!end_enumerate

UDO will then generate these commands:

!begin_quote
!begin_verbatim
{\qc \{bmc tiger.bmp\}}\par\pard
\par
{\qc (Figure 1: A tiger)}\par\pard
!end_verbatim
!end_quote

(!HINTS)

!begin_enumerate

!item	UDO won't check if the image file is existing. If it doesn't exists
or the filename is wrong the Microsoft Helpcompiler will print an error
message.

!index !/win_inline_bitmaps
!item	With the switch (!I)!/win_inline_bitmaps(!i) you can tell UDO to use
special Windows Help commands to use ""hard-coded"" images.

!end_enumerate
