I am trying to do something similar to this post on configuring minipages with htlatex. However, my minipages are not inside a figure environment, so the strategy to apply a float: right
css to div.minipage:last-child
is no longer viable.
I am using the exact .cfg
file from the answer above and my LaTeX document has a format like this:
\documentclass{article}
\usepackage{blindtext}
\begin{document}
\noindent Text before.\medskip
\noindent
\begin{minipage}[t]{0.4\textwidth}
\blindtext
\end{minipage}
\hfill
\begin{minipage}[t]{0.5\textwidth}
\blindtext
\end{minipage}
\medskip \noindent Text after
\end{document}
Naturally, the second minipage does not float right because it is not a child of any element in the DOM.
So, for the lack of a better idea, I tried nesting the minipages
\documentclass{article}
\usepackage{blindtext}
\begin{document}
\noindent Text before.\medskip
\noindent
\begin{minipage}[t]{1.0\textwidth}
\begin{minipage}[t]{0.4\textwidth}
\blindtext
\end{minipage}
\hfill
\begin{minipage}[t]{0.5\textwidth}
\blindtext
\end{minipage}
\end{minipage}
\medskip \noindent Text after
\end{document}
That almost worked as expected, except that in the generated CSS, minipage1, the outermost minipage, has the same width as minipage3, the second child minipage. The width should be 100%, but it is not.
#minipage2{width:39.99939%;}
#minipage3{width:50%;}
#minipage1{width:50%;}