[TUHS] pic

Dan Cross crossd at gmail.com
Thu Aug 11 10:10:57 AEST 2022


On Wed, Aug 10, 2022 at 2:24 PM Jon Steinhart <jon at fourwinds.com> wrote:
> Dennis Boone writes:
> >  > Would that happen to be available somewhere, for posterity?
> >
> > pic2plot, from the plotutils package, will do pic -> various formats,
> > including svg.
>
> Huh.  Wasn't aware of that one, but seems to rely on a groff svg driver
> which I've never seen.
>
> What I've done is pic -> groff -> ps2pdf -> pdf2svg -> inkscape.
> Inkscape is used just to crop bounding box to the image size so
> that there's not a huge amount of whitespace.

Google has built an in-house documentation system
based on extended markdown, and it was very nice:
check your text markdown files into a specially-named
subdirectory in the monorepo and point a web browser
at an internal service for a nicely rendered web version,
available immediately. There was a syntax for including
graphviz markup, and something similar for (I think)
state diagrams, but support for more general drawing
was missing, and I thought pic(1) would be just dandy,
if it could be persuaded to generate SVG.

I wrote to Brian, who works part-time at Google, and
pitched the idea to him, and he extended pic to
generate SVG, though it wasn't clear to what sources
he was modifying, exactly. Then the pandemic hit, and
I ended up leaving Google, so I don't think it went
beyond that, but IIRC he said that coercing pic to
generate SVG wasn't particularly difficult.

        - Dan C.


More information about the TUHS mailing list