0

Give a working c code how to use groff to generate man pages for it in pdf format
. Is it something that can be automatically generated or does it require any manual
file creation? The only instruction I have is to use groff with the “man” macro package

pensee
  • 375
  • 1
  • 10
  • Groff has pdf support. https://man7.org/linux/man-pages/man1/groff.1.html What is the question? – Tim Dec 01 '20 at 06:37
  • It isn't clear what you want exactly. Working C code is generally written in C, while manuals are generally written in English. Do you expect that there exist an automatic way to convert one to the other? – n. m. could be an AI Dec 01 '20 at 06:53
  • Yes i was looking for way to convert a working C code to man page. what does groff do then? Like if i want to build a man page for my c program what will be steps to do it and how will groff come into picture – pensee Dec 01 '20 at 18:20

1 Answers1

0

Groff (with the macros for man pages) format the text in the appropriate way. You still need to write the text. The man macros ore or less force you to write the pages in the correct format.

There is no way that you can generate man pages from a C program automatically. The program tells the computer what to do, the man pages tell the user what to do. These are completely different concepts.

Ljm Dullaart
  • 4,273
  • 2
  • 14
  • 31