Next: 9.3 Equation Template
Up: 9 Templates
Previous: 9.1 Flexible inclusion of figures in different graphics
9.2 Separate handling of .gif/.jpg/.png and
.ps input formats
This template includes a JPG file
fig1.jpg of width xxx pixels and height
yyy pixels directly in the HTML output, and the
same figure as a PostScript file fig1.ps in the PostScript
output with height 7.5 in, assuming the older
\usepackage{epsfig} in the document preamble. The
two equivalent versions of fig1 would in this case
be prepared separately outside LATEX2HTML.
\begin{rawhtml}
<div align="center">
<img src="fig1.jpg" width="xxx" height="yyy" alt="Alt text"><BR>
<small>Caption text</small>
</div>
\end{rawhtml}
\begin{figure}
\begin{center}
%uncomment for actual use --
%\begin{latexonly}
%\epsfysize=7.5in
%\epsfbox{fig1.ps}
%\end{latexonly}
\caption{Caption text.\label{fig:example}}
\end{center}
\end{figure}
In this example, each type of graphics input is sent to the
corresponding output type independently by using conditional
(rawhtml, latexonly) text environments within LATEX2HTML.
The first simply writes the code needed to include the
.jpg image directly in the HTML, while the second gives the
TEX instructions to produce the Postscript version.
To use a pre-prepared fig1.gif or fig1.png in the
same way, substitute fig1.gif or fig1.png
for fig1.jpg in this example.
Next: 9.3 Equation Template
Up: 9 Templates
Previous: 9.1 Flexible inclusion of figures in different graphics
Home |
Contact Us |
Directories |
Site Map |
Help |
Search
|