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%;}

[ERROR] htlatex: ? 15 Argument of \striptextwidth has an extra }.– Rushi Apr 05 '21 at 03:14\blindtextin one of the minipages in the MWE by the following tikz code:
– Rushi Apr 05 '21 at 03:17\usetikzlibrary{arrows,positioning} \begin{tikzpicture}[>=latex'] \node [draw, text width=1.3cm, text centered] (s) {system $y=u$}; \draw [->] node[coordinate,left=1cm of s](u){} (u) -- node [above, near start] {$u$} (s); \draw [->] (s) node[coordinate,right=1cm of s](y){} -- node [above, near end] {$y$} (y); \end{tikzpicture}\includegraphics. I posted the question here. I could not think of a decent title though, feel free to edit! – Rushi Apr 05 '21 at 17:09htlatexsays there is an error on line 15, like the error message above, which file is it talking about? I opened up all the temp files generated in the same directory as the.texfile to see if there was anything relevant on line 15 of any of those that will help me fix the configuration without bothering you, but it didn't look like the error message was referring to any of those files. It also has a?where the file name should be according to the header. – Rushi Apr 05 '21 at 21:26text width=1.3cmoption from my TikZ node, the error goes away. I updated my question with the new information. – Rushi Apr 06 '21 at 04:13text widthoption. – michal.h21 Apr 06 '21 at 08:07\parboxinside the node text. That is,\node [draw] (s) {\parbox[t]{1.3cm}{\centering system $y=u$}};instead of\node [draw, text centered, text width=1.3cm] (s) {system $y=u$};. Unfortunately, this workaround involves changing too much of my existing LaTeX code (class notes, 100 pages, lots of TikZ pictures) to be useful. – Rushi Apr 06 '21 at 14:40