[tex4ht] using minipage in tex4ht?

William F Hammond gellmu at gmail.com
Sun Feb 23 03:13:52 CET 2014


On Sat, Feb 22, 2014 at 4:41 PM, Nasser M. Abbasi wrote:

> Here is the small example:
>
> \documentclass{article}
> %\usepackage[demo]{graphicx}
> \usepackage{graphicx}
> \usepackage{capt-of}
>
> \begin{document}
>
> \begin{figure}[htbp]
>  %
>  \begin{minipage}{0.4\linewidth}
>   some text that should show up
>   to the left side of the following image
>  \end{minipage}
> %%
>  \begin{minipage}{0.5\linewidth}
>   \centering
>   \includegraphics[width=\textwidth]{foo.png}
>   \captionof{figure}{result of the above}
>  \end{minipage}
>  %
> \end{figure}
> \end{document}
>
>
Two html divs can be placed side by side using css "float:right" and
"float:left".  Also think about margins, padding, and text-align.  So to
begin replace the div.minipage entry in
"minipage.css" with something like:
div.minipage{width: 45%; float: left; margin: 1ex 1em 1ex 0;}
div.minipage:last-child{clear: none; float: right; margin: 1ex 0 1ex 1em;}

Also in the source I think you want \linewidth instead of \textwidth in the
width spec for \includegraphics.

      -- Bill

-- 
William F Hammond
Email: gellmu at gmail.com
https://www.facebook.com/william.f.hammond
http://www.albany.edu/~hammond/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://tug.org/pipermail/tex4ht/attachments/20140222/f5e72dfd/attachment.html>


More information about the tex4ht mailing list