By Alvin Alexander. Last updated: June 4, 2016
This is a collection of LaTeX example tags. I'm in the process of creating one super-LaTeX example file to show how to do many things with LaTeX that work with both pdflatex and latex2html, and this is part of that super-file.
In the example content below I'm showing:
- How to include HTML-only content.
- How to include LaTeX-only content.
- How to include source code from a file (or anything else that you want to include from a separate file, verbatim.)
My current LaTeX examples
% some preamble stuff up here ...
\usepackage{version}
\usepackage[pdftex]{graphicx}
\usepackage{html}
\usepackage{verbatimfiles}
\usepackage{hyperref}
% this html stuff works with l2h
\begin{htmlonly}
\htmladdnormallink{DevDaily Home Page}{http://www.devdaily.com/}
\end{htmlonly}
% include this image only in the html version of this content
\begin{htmlonly}
\begin{rawhtml}
<img border="0" src="../bench2.gif">
\end{rawhtml}
\end{htmlonly}
Try some conditional text below here:
\begin{latexonly}
This is some latex-only text.\\
It should appear in a PDF but not in my html docs.\\
\end{latexonly}
% include the contents of the HelloWorld2.java file right here, verbatim.
A verbatimfile test here:
\verbatimfile{HelloWorld2.java}

