my Latex and Tex4ht cheat sheet
my Latex cheat sheet - 12000.org
my Latex cheat sheet - 12000.org
You also want an ePaper? Increase the reach of your titles
YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.
3.14 How to use tex4ht with pdf <strong>and</strong> latex in same document?<br />
use this<br />
\documentclass[titlepage]{article}%<br />
\usepackage{ifpdf}<br />
\usepackage{hyperref}<br />
\begin{document}<br />
\ifpdf<br />
\else<br />
\fi<br />
I am in pdf mode %<br />
pdflatex code,will show up in pdf only<br />
% latex code, check if htlatex is loaded <strong>and</strong> use link only then<br />
\ifdefined\HCode<br />
\href{../../index.htm}{home} % show up in HTML only<br />
\else<br />
I am in latex mode % shows up in dvi <strong>and</strong> .ps only but not in html<br />
\fi<br />
\end{document}<br />
3.15 <strong>my</strong> setup for using htlatex on linux, installing make4ht<br />
1. typed kpsewhich -var-value TEXMFHOME<br />
to find where TEX will look for files.<br />
2. edits <strong>my</strong> .basrc <strong>and</strong> added this<br />
export TEXMFHOME=$HOME/texmf<br />
export PATH=$HOME/texmf/scripts/lu/make4ht-master:$PATH<br />
3. I use now make4ht to build latex to html (new builder in place of htlatex). Downloaded it from<br />
https://github.com/michal-h21/make4ht<br />
<strong>and</strong> extracted the zip file below $TEXHMF/scripts/lua folder.<br />
>unzip make4ht-master.zip<br />
Archive: make4ht-master.zip<br />
5417507d156b01aded3371efc2d5b71074bb0afe<br />
creating: make4ht-master/<br />
inflating: make4ht-master/README.md<br />
inflating: make4ht-master/lapp-mk4.lua<br />
inflating: make4ht-master/make4ht<br />
inflating: make4ht-master/make4ht-lib.lua<br />
inflating: make4ht-master/mkparams.lua<br />
inflating: make4ht-master/mkutils.lua<br />
>cd make4ht-master/<br />
So the tree looks like this<br />
70