You may wish the hypertext version of your document to differ from the paper version. To restrict text to the paper version, use the environment:
\begin{latexonly}
This text will only appear in the LATEX version.
\end{latexonly}
To restrict text to the hypertext version, use the environment:
\begin{htmlonly}
This text will only appear in the hypertext version.
\end{htmlonly}
Note:
Single lines of HTML-only and LATEX-only text can be controlled using the commands:
\html{text for the hypertext version}
and
\latex{text for the paper version}
Or you could use the conditional statement:
text for the \latexhtml{paper}{hypertext} version.
If you want to have a section that only appears in the paper version of your document, then your document preamble must define new commands to replace the LATEX sectioning commands, for example:
You must then use these new commands instead of the normal sectioning commands, for example:
\begin{latexonly}
\latexonlysection{LaTeX readers beware...}
LaTeX readers are missing out by not reading the HTML version of this document.
\end{latexonly}
If a sectioning command appears in an htmlonly environment, you get the warning message
“Cannot find \end{htmlonly}”, but the result should be satisfactory.