I'd like to configure tex4ht to set the width of a minipage div class based on the width specified in the LaTeX source. Here's what I have so far:
The tex file is:
\documentclass{article}
\begin{document}
\begin{minipage}[c]{0.6\textwidth}
Some text
\end{minipage}
\hfill
\begin{minipage}[c]{0.3\textwidth}
some more text
\end{minipage}
\end{document}
and my cfg file (with inspiration from https://www.mail-archive.com/tex4ht@tug.org/msg00764.html) is:
\Preamble{html}
\Configure{HtmlPar}
{\EndP\Tg<p>}
{\EndP\Tg<p>}
{\HCode{</p>\Hnewline}}
{\HCode{</p>\Hnewline}}
\ConfigureEnv{minipage}{\ifvmode\IgnorePar\fi\EndP\HCode{<div class="minipage" align="center" style="width:INSERT WIDTH HERE;">}}{\ifvmode\IgnorePar\fi\EndP\HCode{</div>\Hnewline}}{}{}
\Css{div.minipage {
float: left;
margin: 1ex 1em 1ex 0;
}
}
\Css{div.minipage:last-child {
clear: none;
float: right;
margin: 1ex 0 1ex 1em;
}
}
\begin{document}
\EndPreamble
For instance, I'd like the first minipage in the above tex example (with width of 0.6\textwidth) to result in a corresponding div with width 60%. So essentially, referencing this example, I'm looking for a way to:
- extract only the "0.6" from \begin{minipage}[c]{0.6\textwidth}
- multiply 0.6*100 = 60
- insert 60, along with a % sign, into the width of the div
I may be a bit out of my element with this; I've been frantically trying to learn tex4ht and feel I have only a tenuous grasp of most aspects. This community's questions and answers have been tremendously helpful to me, and I'll sincerely appreciate any guidance on this issue.

tex4htand the other dealing with design and typography, for example – michal.h21 Aug 07 '14 at 17:34