13.11.2015 Views

my Latex and Tex4ht cheat sheet

my Latex cheat sheet - 12000.org

my Latex cheat sheet - 12000.org

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Another way is to use HCode<br />

\documentclass{report}<br />

\usepackage{hyperref}<br />

\begin{document}<br />

\tableofcontents<br />

%---------------------<br />

\ifdefined\HCode<br />

\href{foo.htm}{HTML}<br />

\TocAt{chapter,section,subsection,subsubsection}<br />

\fi<br />

\chapter{chapter 1}<br />

\section{section 1 in chapter 1}<br />

\subsection{subsection 1 in section 1 in chapter 1}<br />

\subsection{subsection 2 in section 1 in chapter 1}<br />

\subsubsection{subsubsection 1 subsection 2 in section 1 in chapter 1}<br />

\end{document}<br />

3.6 Adding tex4ht configuration inside latex file instead of using .cfg<br />

One can use \Configure after \begin{document}<br />

These are from Michal Hoftich, a tex4ht expert on the tex4ht mailing list:<br />

(untested, just an idea):<br />

\documentclass{article}<br />

\ifdefined\HCode<br />

\newcomm<strong>and</strong>\html[1]{%<br />

\HCode{#1}%<br />

}%<br />

\else<br />

\newcomm<strong>and</strong>\html[1]{}%<br />

\fi<br />

\begin{document}<br />

\html{

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!