This would be useful for example in adding a long description of a multi-media resource in the paper version of a document. Such a description would be redundant in the electronic version, as the user can have direct access to this resource.
Here is an example of the use of the
latexonly environment,
used earlier in this manual:
\begin{latexonly}
\begin{figure} \begin{center} \fbox{\includegraphics[width=4in]{psfiles/eform.ps}} \end{center} \caption{An electronic form. Of course in the online version of this document the form above would be active.} \end{figure}\end
{latexonly}
Note the warning concerning how the environment delimiters should be used in the LATEX source code.
Note the warning concerning how the environment delimiters should be used in the LATEX source code.
{...}
command causes everything within the braces
to be processed by LATEX, but ignored by LATEX2HTML.
{...}
command causes everything within the braces
to be ignored by LATEX and processed by LATEX2HTML.
{...}{...}
causes everything
within the first set of braces to be processed exclusively by LATEX,
with the contents of the second set of braces processed solely by LATEX2HTML.
%
begin{latexonly}
and %
end{latexonly}
is ignored by LATEX2HTML.
The difference is that the
latexonly environment
puts the contents into a group, in which all definitions are local.
There is no such scoping with the %begin...%end
variant,
since LATEX sees the initial %s simply as starting comments.
The following example should clarify what happens:
\newcommand{\A}{The letter A.} \newcommand{\B}{The letter B.}
\
begin{latexonly}
\renewcommand{\A}{Not the letter A.}
\
end{latexonly}
%
begin{latexonly}
\renewcommand{\B}{Not the letter B.}
%
end{latexonly}
\begin{document} \A \B \end{document}If you process this with LATEX, the result is: The letter A. Not the letter B.
Note the warning concerning how the environment delimiters should be used in the LATEX source code.
Warning:
Be careful when using LATEX commands which alter the values of counters
(e.g. numbered figures or equations) in conditional text, because this may
cause the counter values in the electronic version to lose synchronisation
with the values of the corresponding counters in the LATEX version.
Note the warning concerning how the environment delimiters should be used in the LATEX source code.
One further important use of the
makeimage environment is as follows.
If a
makeimage environment occurs as a sub-environment within
a
figure environment, then an image will not be made of the
figure's contents. Instead, the contents are treated as normal text,
each part being handled as if there were no
figure at all,
except that everything is placed within a single cell of a
<TABLE>...</TABLE> construction in HTML 3.2.
The contents of any \caption
commands are placed between <CAPTION>...</CAPTION> tags
for the <TABLE>.
Normally an image of the entire contents of the
figure would be
placed within the single cell of the <TABLE>.
Now images are made of any subparts of those
figure's contents
that really need it, in particular the
makeimage sub-environments.
An empty
makeimage sub-environment does not generate an image of itself,
yet still it inhibits an image being made of the whole
figure.
These comments apply also to
table environments.
97.1