-
Notifications
You must be signed in to change notification settings - Fork 4
/
epub2.cfg
24 lines (21 loc) · 1.18 KB
/
epub2.cfg
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
\Preamble{xhtml,pic-align}
\Configure{graphics*}
{pdf}
{
\Needs{"pdf2svg '\csname Gin@base\endcsname.pdf' '\csname Gin@base\endcsname_ebook.svg' && scour -i '\csname Gin@base\endcsname_ebook.svg' -o '\csname Gin@base\endcsname_tmp.svg' --enable-viewboxing --enable-id-stripping --enable-comment-stripping --shorten-ids --indent=none && mv -f '\csname Gin@base\endcsname_tmp.svg' '\csname Gin@base\endcsname_ebook.svg' "}%
\Picture[\csname a:GraphicsAlt\endcsname]{\csname Gin@base\endcsname_ebook.svg}%
\special{t4ht+@File: \csname Gin@base\endcsname_ebook.svg}
}
\Configure{Picture}{.svg}
\makeatletter
\Configure{graphics*}
{svg}
{
{\Configure{Needs}{File: \[email protected]}\Needs{}}
\Picture[\csname a:GraphicsAlt\endcsname]{\csname Gin@base\endcsname.svg \csname a:Gin-dim\endcsname}
}
\ConfigureEnv{equation}{\ifvmode\IgnorePar\fi\EndP\HCode{<div class="equation">}\Picture*{}}{\EndPicture\HCode{</div>}}{}{}
\Css{div.align{width:auto;text-align:right;},div.equation{text-align:right;}}
\begin{document}
\Configure{$}{\PicMath}{\EndPicMath}{}%$
\EndPreamble