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.

\Configure{@HEAD}{}<br />

\Configure{@HEAD}{\HCode{\Hnewline}}<br />

\Configure{@HEAD}{\HCode{\Hnewline}}<br />

\Configure{@HEAD}{\HCode{\Hnewline}}<br />

\Configure{Picture}{.svg}<br />

\makeatletter<br />

\Configure{graphics*}<br />

{svg}<br />

{<br />

{\Configure{Needs}{File: \Gin@base.svg}\Needs{}}<br />

\Picture[\csname a:GraphicsAlt\endcsname]{\csname Gin@base\endcsname.svg<br />

\csname a:Gin-dim\endcsname}<br />

}<br />

%<br />

\makeatletter<br />

\Configure{graphics*}<br />

{eps}%<br />

{\Needs{"convert \csname Gin@base\endcsname.eps<br />

\csname Gin@base\endcsname.png"}%<br />

\Picture[pict]{\csname Gin@base\endcsname.png}%<br />

\special{t4ht+@File: \csname Gin@base\endcsname.png}<br />

}<br />

\begin{document}<br />

\EndPreamble<br />

Now compile your .tex file like this (where nma.cfg below is your tex4eht .cfg file.)<br />

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

Make sure to inlcude \usepackage{graphicx} in your latex document! else you’ll get this error<br />

(/usr/local/texlive/2014/texmf-dist/tex/generic/tex4ht/html4-math.4ht))<br />

l.34 --- TeX4ht warning --- \Configure{graphics*}? ---<br />

! LaTeX Error: Missing \begin{document} in `nma.cfg'.<br />

Thanks goes to Michal-h21 for help in making the above instructions.<br />

3.28 converting cropped pdf page to svg<br />

After cropping part of pdf page <strong>and</strong> generating foo.pdf file, which is one page only, to convert this to svg file to<br />

include with tex4ht, do this<br />

pdf2svg p.pdf p.svg<br />

I found this works better than<br />

inkscape --without-gui --file=p.pdf --export-plain-svg=p.svg<br />

This can be used to do the conversion of all cropped pdf files in the folder<br />

79

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

Saved successfully!

Ooh no, something went wrong!