From comparing the different PS and PE macros of ms and mm I learned the adding
.HTML-IMAGE and .HTML-IMAGE-END respectively does the trick. At least it works 
in
my case.

Hans

hbezemer--- via <groff@gnu.org> wrote:

> Thanks Dave, that makes it clear for me.
> 
> I've tried my first minimal example. but now with -ms and this gives a good 
> result. 
> Thus: echo ".PS\nbox\n.PE" | pic | groff -Thtml -ms works.
> 
> Would it be useful to modify the -mm PS and PE macros so that they work with 
> grohtml
> since the macro package is provided with groff by default?
> 
> 
> Hans
> 
> 
> 
> 
> Dave Kemper <saint.s...@gmail.com> wrote:
> 
> > On 11/29/23, hbezemer--- via <groff@gnu.org> wrote:
> > > When changing -ms to -mm (the macro I'm using): No images are created.
> > >
> > > Maybe groff_mm(7) is the culprit?
> > 
> > Different macro packages provide different definitions of .PS and .PE.
> > Some seem to work with grohtml and some not:
> > 
> > $ cat foo.n
> > .PS
> > box
> > .PE
> > $ groff -ms -p -Thtml foo.n | fgrep img
> > pnmcrop: The image is entirely background; there is nothing to crop.
> > <p align="center" style="margin-top: 1em"><img
> > src="grohtml-26116-1.png" alt="Image grohtml-26116-1.png"></p>
> > $ groff -mm -p -Thtml foo.n | fgrep img
> > $ groff -me -p -Thtml foo.n | fgrep img
> > pnmcrop: The image is entirely background; there is nothing to crop.
> > <p align="center"><img src="grohtml-26182-1.png" alt="Image
> > grohtml-26182-1.png"></p>
> > $ groff -mpic -p -Thtml foo.n | fgrep img
> > $
> > 
> > (The last example uses minimal fallback .PS and .PE definitions, as
> > described in pic(1).)
> > 
> > So you could try grabbing the .PS and .PE macro definitions from one
> > of the macro files that does work (at least -ms and -me) and adding
> > them to your own document source file.

Reply via email to