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.

htlatex foo.tex "html,2,notoc*"<br />

\documentclass{article}%<br />

\usepackage{ifpdf}<br />

\usepackage{lipsum}<br />

\begin{document}<br />

\title{test toc}<br />

\author{me}<br />

\date{\today}<br />

\maketitle<br />

\tableofcontents<br />

\section{section 1}<br />

\lipsum{1}<br />

\subsection{subsection 1}<br />

text<br />

\section{section 2}<br />

\lipsum{1}<br />

\section{section 3}<br />

\lipsum{1}<br />

\end{document}<br />

3.8 Changing the depth of the main toc in HTML<br />

To change how deep the TOC is on the main page in HTML, do the following. Suppose we want to show chapter,<br />

section, subsection, <strong>and</strong> subsubsection in the TOC, then here is an example<br />

\begin{document}<br />

\title{<strong>my</strong> dynamics <strong>cheat</strong> <strong>sheet</strong>}<br />

\author{{\small Nasser M. Abbasi}}<br />

\date{{\small \today}}<br />

\maketitle<br />

\ifdefined\HCode<br />

\Configure{tableofcontents*}{chapter,section,subsection,subsubsection}<br />

\fi<br />

\tableofcontents<br />

Splitting the document (html) based on section is different. This is h<strong>and</strong>led as follows. Suppose we want to<br />

split by 2, then compile as<br />

make4ht foo.tex "htm,2,charset=utf-8,pic-align,notoc*" " -cunihtf -utf8"<br />

If you are using a htlatex .cfg file, say <strong>my</strong>.cfg, then change the above to be<br />

make4ht foo.tex "<strong>my</strong>,htm,2,charset=utf-8,pic-align,notoc*" " -cunihtf -utf8"<br />

Notice the use of notoc*<br />

61

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

Saved successfully!

Ooh no, something went wrong!