Forrest logo
back to the pic tool

pic:tldr:b5d90

pic: Typeset input with pictures to PDF using the [me] macro package.
$ pic -T ${pdf} ${path-to-input-pic} | groff -${me} -T ${pdf} > ${path-to-output-pdf}
try on your machine

This command consists of two parts, separated by the pipe symbol "|". Let's break it down:

First part: pic -T ${pdf} ${path-to-input-pic}

  • "pic" is a command that is used to create diagrams and drawings in plain text format.
  • "-T" is an option that specifies the output format. In this case, it is set to ${pdf}, which is a placeholder for the desired output format (e.g., pdf).
  • ${path-to-input-pic} is also a placeholder for the file path to the input pic file.

Second part: groff -${me} -T ${pdf} > ${path-to-output-pdf}

  • "groff" is a command used for typesetting and formatting documents.
  • "-${me}" is an option that specifies the type of groff macro package to use. The ${me} is a placeholder for the desired package.
  • "-T" is an option that specifies the output format. In this case, it is set to ${pdf}, another placeholder for the desired output format.
  • ">" is used to redirect the output of the command to a file rather than displaying it in the terminal.
  • ${path-to-output-pdf} is a placeholder for the file path to the output PDF file.

So, overall, this command is using the "pic" command to process the input pic file and convert it to the desired format (e.g., PDF). Then, the output of that command is piped to the "groff" command to further format it using a specific macro package. Finally, the formatted output is redirected to a PDF file specified by ${path-to-output-pdf}.

This explanation was created by an AI. In most cases those are correct. But please always be careful and never run a command you are not sure if it is safe.
back to the pic tool