LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 02-28-2019, 08:37 PM   #1
SaintDanBert
Senior Member
 
Registered: Jan 2009
Location: "North Shore" Louisiana USA
Distribution: Mint-20.1 with Cinnamon
Posts: 1,771
Blog Entries: 3

Rep: Reputation: 108Reputation: 108
how to create man page files


How do I create my own man pages on Linux?

Is there a template out there somewhere that I can use instead of creating
a well formatted man-page from scratch?

I'm sure I'm not asking the right questions because the world has turned a few times since I did this last.

I know the whole roff, nroff, groff macro-based history of man-page writing. (My 1979 master's these was "typeset" using groff.) I'd prefer to avoid re-creating that tool chain, writing the content as groff, and so on.

When I try searching, I get all sorts of links to existing man-pages, but I've not found how I'm supposed to create man-pages for my home-grown (groan?) projects or for linux software that I gather from the wild.

Thanks in advance,
~~~ 0;-Dan
 
Old 02-28-2019, 10:03 PM   #2
Mechanikx
Member
 
Registered: Jul 2018
Distribution: Slackware
Posts: 351

Rep: Reputation: 258Reputation: 258Reputation: 258
I did a search and found some resources that might be of some interest.

https://stackoverflow.com/questions/...y-shell-script

One of the answers mentions 'help2man'. Another:

Quote:
What about using pandoc. You can write document in markdown (or even html, latex) and can covert to html, pdf, word,man pages, epub, .... This way you can write documentation in one format and convert/distribute in any format you like
I also found 'txt2man':

https://www.systutorials.com/docs/linux/man/1-txt2man/

Quote:
txt2man - convert flat ASCII text to man page format
From the description:

Quote:
txt2man converts the input text into nroff/troff standard man(7) macros used to format Unix manual pages...
 
1 members found this post helpful.
Old 02-28-2019, 10:09 PM   #3
frankbell
LQ Guru
 
Registered: Jan 2006
Location: Virginia, USA
Distribution: Slackware, Ubuntu MATE, Mageia, and whatever VMs I happen to be playing with
Posts: 19,324
Blog Entries: 28

Rep: Reputation: 6142Reputation: 6142Reputation: 6142Reputation: 6142Reputation: 6142Reputation: 6142Reputation: 6142Reputation: 6142Reputation: 6142Reputation: 6142Reputation: 6142
See

Code:
man man
.
 
1 members found this post helpful.
Old 03-01-2019, 04:25 AM   #4
hydrurga
LQ Guru
 
Registered: Nov 2008
Location: Pictland
Distribution: Linux Mint 21 MATE
Posts: 8,048
Blog Entries: 5

Rep: Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925
When I was doing some work on a man file for a Linux application, this was the guide I used:

http://www.schweikhardt.net/man_page_howto.html
 
1 members found this post helpful.
Old 03-01-2019, 04:45 AM   #5
Turbocapitalist
LQ Guru
 
Registered: Apr 2005
Distribution: Linux Mint, Devuan, OpenBSD
Posts: 7,309
Blog Entries: 3

Rep: Reputation: 3721Reputation: 3721Reputation: 3721Reputation: 3721Reputation: 3721Reputation: 3721Reputation: 3721Reputation: 3721Reputation: 3721Reputation: 3721Reputation: 3721
Quote:
Originally Posted by frankbell View Post
See

Code:
man man
.
Or more specifically in regards to the manual pages and not the manual page viewer:

Code:
man 7 man
man 7 man-pages
There have also been some nice developments in regards to manual pages at the OpenBSD project. I hope some of their improvements make it over the various GNU/Linux and systemd/Linux distros. If that is interesting look up "mandoc"
 
1 members found this post helpful.
Old 03-01-2019, 07:10 AM   #6
BW-userx
LQ Guru
 
Registered: Sep 2013
Location: Somewhere in my head.
Distribution: Slackware (15 current), Slack15, Ubuntu studio, MX Linux, FreeBSD 13.1, WIn10
Posts: 10,342

Rep: Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242
I searched -> "create man page linux"

http://www.linuxhowtos.org/System/creatingman.htm

https://www.cyberciti.biz/faq/linux-...ing-a-manpage/

and more...

I think it was, if I remember correctly, to check your work on your man page in the terminal where it is located just type
Code:
man ./(name of man file)
then it brings it up it is formatted presentation mode.

Last edited by BW-userx; 03-01-2019 at 07:14 AM.
 
1 members found this post helpful.
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
man page is not found although $MANPATH and man.conf changed Abbraxas Linux - Newbie 3 09-05-2011 06:40 PM
Create a Manual / Man Page for a Script or Tool Hi_This_is_Dev Linux - General 1 08-26-2010 01:33 PM
"info ls" shows man page instead of info page lorenz Slackware 8 09-21-2007 08:47 PM
man alsamixer not showing the man page nosaku Slackware 1 12-20-2004 08:52 AM
Is there a man page on how to use man page? jdruin Linux - Software 2 10-30-2004 09:29 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 11:30 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration