Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I am packaging a program for ubuntu, And I am getting a lintian warning saying my binary needs a manpage.

How does one go about creating a manpage for a program?

share|improve this question

3 Answers 3

up vote 18 down vote accepted

With the help of Gmanedit Install gmanedit you are able to create manpages with a graphical GUI.

Gtk+ Manpages Editor is an editor for man pages that runs on X with GTK+.

Gmanedit is an application which allows you to edit manual pages (man) on Linux/Unix systems.

It is like most common HTML editors but more easy. You need to know manpages format.

enter image description here

According to the Debian FHS user program manpages are stored in usr/share/man/man1 or usr/local/share/man/man1.

After changing manpages it may be wise to update the manpage database by running mandb in a terminal.

Details on the manpage syntax are summarized in the manpage for man.

share|improve this answer
    
Sure, you're right. I was going to change it, but as soon as I saw MarcoCeppi there I didn't want to modify it. :D –  Lucio Mar 7 '13 at 15:46
    
@Lucio lol - that was from a time way back, when there was no apps.ubuntu yet ;) –  Takkat Mar 7 '13 at 18:39

Give this a whirl I have just uploaded it I write a number of apps and have been having trouble with a decent manpage editor

http://gtk-apps.org/content/show.php/Man+Page+Editor+?content=160219

This is a gtk2 app with a separate tab for each section importing manpages previewing and exporting are all supported, no esoteric formatting commands, this is still under development but is certainly stable enough to use.

share|improve this answer
1  
That application looks interesting. Could you provide a bit more detail, here, than just a link? –  Kevin Bowen Aug 29 '13 at 20:08
    
This is a gtk2 app with a separate tab for each section importing manpages previewing and exporting are all supported, no esoteric formatting commands, this is still under development but is certainly stable enough to use. –  Tony Duncun Sep 8 '13 at 17:29

You can write manpages in docbook/refentry, an XML documentation format,

<?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
               "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd">

<refentry id='vfplot1'>
<refentryinfo><date>1 July 2008</date></refentryinfo>
<refmeta>
<refentrytitle>VFPLOT</refentrytitle>
<manvolnum>1</manvolnum>
<refmiscinfo class='date'>1 July 2008</refmiscinfo>
</refmeta>
<refnamediv id='name'>
<refname>vfplot</refname>
<refpurpose>plot vector fields with curved arrows.</refpurpose>
</refnamediv>
<refsynopsisdiv id='synopsis'>
<cmdsynopsis>
  <command>vfplot</command>    
  <arg choice='opt'>-a <replaceable>aspect</replaceable></arg>
  <arg choice='opt'>-d <replaceable>file</replaceable></arg>
  <arg choice='opt'>-D <replaceable>pen</replaceable></arg>
    :

and then convert the results to man format using

xsltproc /path/to/docbook.xsl vfplot.xml

to html with

docbook2html docbook2html

and so on. This is not the easiest way to write a manpage, but if you have written XML before then you know the syntax already, it is just a matter of learning the tags to use.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.