# pic2graph(1) - man - phpMan

[PIC2GRAPH(1)](https://www.chedong.com/phpMan.php/man/PIC2GRAPH/1/markdown)                           General Commands Manual                          [PIC2GRAPH(1)](https://www.chedong.com/phpMan.php/man/PIC2GRAPH/1/markdown)



## NAME
       pic2graph - convert a PIC diagram into a cropped image

## SYNOPSIS
       **pic2graph** [**-unsafe**] [**-format** _output-format_] [**-eqn** _delimiters_] [_convert-arguments_]

### pic2graph --help

### pic2graph -v
### pic2graph --version

## DESCRIPTION
       _pic2graph_ reads a [_pic_(1)](https://www.chedong.com/phpMan.php/man/pic/1/markdown) program from the standard input and writes an image file, by default
       in Portable Network Graphics (PNG) format, to the standard output.  It furthermore translates
       [_eqn_(1)](https://www.chedong.com/phpMan.php/man/eqn/1/markdown) constructs, so it can be used for generating images of mathematical formulae.

       The  input  PIC code should _not_ be wrapped with the **.PS** and **.PE** macros that normally guard it
       within [_groff_(1)](https://www.chedong.com/phpMan.php/man/groff/1/markdown) documents.

       Arguments not recognized by _pic2graph_ are passed to the ImageMagick or GraphicsMagick program
       [_convert_(1)](https://www.chedong.com/phpMan.php/man/convert/1/markdown).   By  specifying  these,  you can give your image a border, set the image's pixel
       density, or perform other useful transformations.

       The output image is clipped using _convert_'s **-trim** option to the  smallest  possible  bounding
       box that contains all the black pixels.

## OPTIONS
### -eqn
              Use  _delimiters_ as the opening and closing characters that delimit _eqn_ directives; the
              default is “$$”.  The option argument _delimiters_ should be a two-character string, but
              an empty string ("") is accepted as a directive to disable _eqn_ processing.

### -format
              Write  the image in _output-format_, which must be understood by _convert_; the default is
              PNG.

       **--help** Display a usage message and exit.

### -unsafe
              Run _groff_ in _unsafe_ mode, enabling the PIC command **sh** to execute arbitrary Unix  shell
              commands.  The _groff_ default is to forbid this.

### -v
### --version
              Display version information and exit.

## ENVIRONMENT
       _GROFF_TMPDIR_
       _TMPDIR_
       _TMP_
       _TEMP_   These environment variables are searched in the given order to determine the directory
              where temporary files will be created.  If none are set, _/tmp_ is used.

## AUTHORS
       _pic2graph_ was written by Eric S. Raymond ⟨<esr@thyrsus.com>⟩, based on a recipe by  W.  Richard
       Stevens.

## SEE ALSO
       W. Richard Stevens, _Turning_ _PIC_ _into_ _HTML_ ⟨<http://www.kohala.com/start/troff/pic2html.html>⟩

       [_eqn2graph_(1)](https://www.chedong.com/phpMan.php/man/eqn2graph/1/markdown), [_grap2graph_(1)](https://www.chedong.com/phpMan.php/man/grap2graph/1/markdown), [_pic_(1)](https://www.chedong.com/phpMan.php/man/pic/1/markdown), [_eqn_(1)](https://www.chedong.com/phpMan.php/man/eqn/1/markdown), [_groff_(1)](https://www.chedong.com/phpMan.php/man/groff/1/markdown), [_convert_(1)](https://www.chedong.com/phpMan.php/man/convert/1/markdown)



groff 1.22.4                                23 March 2022                               [PIC2GRAPH(1)](https://www.chedong.com/phpMan.php/man/PIC2GRAPH/1/markdown)
