Is there a specification for the format used by man pages?

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP











up vote
2
down vote

favorite












I would like to parse man pages into a more structure form, but I'm unable to find a proper specification for the data format under use by man pages. Should I be looking for troff or nroff or groff or something else? groff(7) says




The groff system has all features of the classical roff, but adds many extensions.




Are these extensions the various preprocessors like tbl or something else?



So far I've found the following resources:



  • troff.org - This has historical notes and some tutorials, and some dead links.


  • roff(7) (OpenBSD, Linux) - Doesn't really have a specification, only a brief overview and bunch of history.


  • man-pages(7) (Linux) - This provides guidelines about sections in man pages (which is useful), but it doesn't talk about the data format.


  • A Typesetter-independent TROFF and Troff User's Manual - these are fairly old, so I can't really judge what the differences are between the troff in those papers and in practice.


Is there a clear specification somewhere for the exact format under use by man pages?










share|improve this question

















  • 2




    no standard - just similar/derived implementations. You omitted one manpage, with the macros (here).
    – Thomas Dickey
    3 hours ago










  • @ThomasDickey, yes I looked at that but I don't know if that is comprehensive (my hunch is that it isn't).
    – theindigamer
    3 hours ago










  • sure it is not: but the point of your question is standards, and there are none.
    – Thomas Dickey
    3 hours ago










  • To clarify, does your comment mean "none of roff/troff/nroff/groff have standards" or "man pages in practice do not follow any particular *roff system" or both?
    – theindigamer
    2 hours ago










  • All of the *roff variants use the same instructions. Man pages add to those instructions a set of macros to do common things. But individual manpages may use either the underlying instructions or the macros or both with no consistency. ivanivan's answer, for example, is all about macros. But some pages hardly use the macros.
    – Cupcake Protocol
    2 hours ago














up vote
2
down vote

favorite












I would like to parse man pages into a more structure form, but I'm unable to find a proper specification for the data format under use by man pages. Should I be looking for troff or nroff or groff or something else? groff(7) says




The groff system has all features of the classical roff, but adds many extensions.




Are these extensions the various preprocessors like tbl or something else?



So far I've found the following resources:



  • troff.org - This has historical notes and some tutorials, and some dead links.


  • roff(7) (OpenBSD, Linux) - Doesn't really have a specification, only a brief overview and bunch of history.


  • man-pages(7) (Linux) - This provides guidelines about sections in man pages (which is useful), but it doesn't talk about the data format.


  • A Typesetter-independent TROFF and Troff User's Manual - these are fairly old, so I can't really judge what the differences are between the troff in those papers and in practice.


Is there a clear specification somewhere for the exact format under use by man pages?










share|improve this question

















  • 2




    no standard - just similar/derived implementations. You omitted one manpage, with the macros (here).
    – Thomas Dickey
    3 hours ago










  • @ThomasDickey, yes I looked at that but I don't know if that is comprehensive (my hunch is that it isn't).
    – theindigamer
    3 hours ago










  • sure it is not: but the point of your question is standards, and there are none.
    – Thomas Dickey
    3 hours ago










  • To clarify, does your comment mean "none of roff/troff/nroff/groff have standards" or "man pages in practice do not follow any particular *roff system" or both?
    – theindigamer
    2 hours ago










  • All of the *roff variants use the same instructions. Man pages add to those instructions a set of macros to do common things. But individual manpages may use either the underlying instructions or the macros or both with no consistency. ivanivan's answer, for example, is all about macros. But some pages hardly use the macros.
    – Cupcake Protocol
    2 hours ago












up vote
2
down vote

favorite









up vote
2
down vote

favorite











I would like to parse man pages into a more structure form, but I'm unable to find a proper specification for the data format under use by man pages. Should I be looking for troff or nroff or groff or something else? groff(7) says




The groff system has all features of the classical roff, but adds many extensions.




Are these extensions the various preprocessors like tbl or something else?



So far I've found the following resources:



  • troff.org - This has historical notes and some tutorials, and some dead links.


  • roff(7) (OpenBSD, Linux) - Doesn't really have a specification, only a brief overview and bunch of history.


  • man-pages(7) (Linux) - This provides guidelines about sections in man pages (which is useful), but it doesn't talk about the data format.


  • A Typesetter-independent TROFF and Troff User's Manual - these are fairly old, so I can't really judge what the differences are between the troff in those papers and in practice.


Is there a clear specification somewhere for the exact format under use by man pages?










share|improve this question













I would like to parse man pages into a more structure form, but I'm unable to find a proper specification for the data format under use by man pages. Should I be looking for troff or nroff or groff or something else? groff(7) says




The groff system has all features of the classical roff, but adds many extensions.




Are these extensions the various preprocessors like tbl or something else?



So far I've found the following resources:



  • troff.org - This has historical notes and some tutorials, and some dead links.


  • roff(7) (OpenBSD, Linux) - Doesn't really have a specification, only a brief overview and bunch of history.


  • man-pages(7) (Linux) - This provides guidelines about sections in man pages (which is useful), but it doesn't talk about the data format.


  • A Typesetter-independent TROFF and Troff User's Manual - these are fairly old, so I can't really judge what the differences are between the troff in those papers and in practice.


Is there a clear specification somewhere for the exact format under use by man pages?







man






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked 3 hours ago









theindigamer

133128




133128







  • 2




    no standard - just similar/derived implementations. You omitted one manpage, with the macros (here).
    – Thomas Dickey
    3 hours ago










  • @ThomasDickey, yes I looked at that but I don't know if that is comprehensive (my hunch is that it isn't).
    – theindigamer
    3 hours ago










  • sure it is not: but the point of your question is standards, and there are none.
    – Thomas Dickey
    3 hours ago










  • To clarify, does your comment mean "none of roff/troff/nroff/groff have standards" or "man pages in practice do not follow any particular *roff system" or both?
    – theindigamer
    2 hours ago










  • All of the *roff variants use the same instructions. Man pages add to those instructions a set of macros to do common things. But individual manpages may use either the underlying instructions or the macros or both with no consistency. ivanivan's answer, for example, is all about macros. But some pages hardly use the macros.
    – Cupcake Protocol
    2 hours ago












  • 2




    no standard - just similar/derived implementations. You omitted one manpage, with the macros (here).
    – Thomas Dickey
    3 hours ago










  • @ThomasDickey, yes I looked at that but I don't know if that is comprehensive (my hunch is that it isn't).
    – theindigamer
    3 hours ago










  • sure it is not: but the point of your question is standards, and there are none.
    – Thomas Dickey
    3 hours ago










  • To clarify, does your comment mean "none of roff/troff/nroff/groff have standards" or "man pages in practice do not follow any particular *roff system" or both?
    – theindigamer
    2 hours ago










  • All of the *roff variants use the same instructions. Man pages add to those instructions a set of macros to do common things. But individual manpages may use either the underlying instructions or the macros or both with no consistency. ivanivan's answer, for example, is all about macros. But some pages hardly use the macros.
    – Cupcake Protocol
    2 hours ago







2




2




no standard - just similar/derived implementations. You omitted one manpage, with the macros (here).
– Thomas Dickey
3 hours ago




no standard - just similar/derived implementations. You omitted one manpage, with the macros (here).
– Thomas Dickey
3 hours ago












@ThomasDickey, yes I looked at that but I don't know if that is comprehensive (my hunch is that it isn't).
– theindigamer
3 hours ago




@ThomasDickey, yes I looked at that but I don't know if that is comprehensive (my hunch is that it isn't).
– theindigamer
3 hours ago












sure it is not: but the point of your question is standards, and there are none.
– Thomas Dickey
3 hours ago




sure it is not: but the point of your question is standards, and there are none.
– Thomas Dickey
3 hours ago












To clarify, does your comment mean "none of roff/troff/nroff/groff have standards" or "man pages in practice do not follow any particular *roff system" or both?
– theindigamer
2 hours ago




To clarify, does your comment mean "none of roff/troff/nroff/groff have standards" or "man pages in practice do not follow any particular *roff system" or both?
– theindigamer
2 hours ago












All of the *roff variants use the same instructions. Man pages add to those instructions a set of macros to do common things. But individual manpages may use either the underlying instructions or the macros or both with no consistency. ivanivan's answer, for example, is all about macros. But some pages hardly use the macros.
– Cupcake Protocol
2 hours ago




All of the *roff variants use the same instructions. Man pages add to those instructions a set of macros to do common things. But individual manpages may use either the underlying instructions or the macros or both with no consistency. ivanivan's answer, for example, is all about macros. But some pages hardly use the macros.
– Cupcake Protocol
2 hours ago










1 Answer
1






active

oldest

votes

















up vote
0
down vote













Yup. Think like HTML... but pre-HTML. Basically a bunch of typesetting macros for groff ...



First, there are some commonly agreed on sections - of course you can add more...



NAME
SYNOPSIS
DESCRIPTION
OPTIONS
BUGS
AUTHOR
SEE ALSO


And for each (and everywhere else) you use the groff typesetting macro syntax.



For example, a TITLE HEADER can be done like so -



.TH [name of program] [section number] [center footer] [left footer] [center header]


Or a SECTION HEADER -



.SH [section name]


And of course, you can bold, italic, underline, etc -



.B = bold
.BI = bold alternating italic
.BR = bold alternating Roman
.I = italic
.IB = italic alternating bold
.IR = italic alternating Roman
.RB = Roman alternating bold
.RI = Roman alternating italic


And you can even make comments in your text file -



." This is a comment


And then things like paragraphing (like the <p></p> html tag set) with .PP



Don't forget to name the file appropriately, and then gzip it when done.



This info (and more) is from http://www.linuxhowtos.org/System/creatingman.htm






share|improve this answer




















  • " Think like HTML... but pre-HTML" -- that is a bit hard, given that I am younger than HTML :P.
    – theindigamer
    3 hours ago










  • I'm not sure how accurate this answer is. man(1) page uses ." for comments.
    – theindigamer
    2 hours ago










  • @theindigamer I only wrote one man page (out of curiosity, much like the OP seems to be) and it was a long time ago and I don't have the bookmark (maybe at work?). My last sentence states where I got that info.
    – ivanivan
    1 hour ago










Your Answer








StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "106"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);

else
createEditor();

);

function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);



);













 

draft saved


draft discarded


















StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f481025%2fis-there-a-specification-for-the-format-used-by-man-pages%23new-answer', 'question_page');

);

Post as a guest






























1 Answer
1






active

oldest

votes








1 Answer
1






active

oldest

votes









active

oldest

votes






active

oldest

votes








up vote
0
down vote













Yup. Think like HTML... but pre-HTML. Basically a bunch of typesetting macros for groff ...



First, there are some commonly agreed on sections - of course you can add more...



NAME
SYNOPSIS
DESCRIPTION
OPTIONS
BUGS
AUTHOR
SEE ALSO


And for each (and everywhere else) you use the groff typesetting macro syntax.



For example, a TITLE HEADER can be done like so -



.TH [name of program] [section number] [center footer] [left footer] [center header]


Or a SECTION HEADER -



.SH [section name]


And of course, you can bold, italic, underline, etc -



.B = bold
.BI = bold alternating italic
.BR = bold alternating Roman
.I = italic
.IB = italic alternating bold
.IR = italic alternating Roman
.RB = Roman alternating bold
.RI = Roman alternating italic


And you can even make comments in your text file -



." This is a comment


And then things like paragraphing (like the <p></p> html tag set) with .PP



Don't forget to name the file appropriately, and then gzip it when done.



This info (and more) is from http://www.linuxhowtos.org/System/creatingman.htm






share|improve this answer




















  • " Think like HTML... but pre-HTML" -- that is a bit hard, given that I am younger than HTML :P.
    – theindigamer
    3 hours ago










  • I'm not sure how accurate this answer is. man(1) page uses ." for comments.
    – theindigamer
    2 hours ago










  • @theindigamer I only wrote one man page (out of curiosity, much like the OP seems to be) and it was a long time ago and I don't have the bookmark (maybe at work?). My last sentence states where I got that info.
    – ivanivan
    1 hour ago














up vote
0
down vote













Yup. Think like HTML... but pre-HTML. Basically a bunch of typesetting macros for groff ...



First, there are some commonly agreed on sections - of course you can add more...



NAME
SYNOPSIS
DESCRIPTION
OPTIONS
BUGS
AUTHOR
SEE ALSO


And for each (and everywhere else) you use the groff typesetting macro syntax.



For example, a TITLE HEADER can be done like so -



.TH [name of program] [section number] [center footer] [left footer] [center header]


Or a SECTION HEADER -



.SH [section name]


And of course, you can bold, italic, underline, etc -



.B = bold
.BI = bold alternating italic
.BR = bold alternating Roman
.I = italic
.IB = italic alternating bold
.IR = italic alternating Roman
.RB = Roman alternating bold
.RI = Roman alternating italic


And you can even make comments in your text file -



." This is a comment


And then things like paragraphing (like the <p></p> html tag set) with .PP



Don't forget to name the file appropriately, and then gzip it when done.



This info (and more) is from http://www.linuxhowtos.org/System/creatingman.htm






share|improve this answer




















  • " Think like HTML... but pre-HTML" -- that is a bit hard, given that I am younger than HTML :P.
    – theindigamer
    3 hours ago










  • I'm not sure how accurate this answer is. man(1) page uses ." for comments.
    – theindigamer
    2 hours ago










  • @theindigamer I only wrote one man page (out of curiosity, much like the OP seems to be) and it was a long time ago and I don't have the bookmark (maybe at work?). My last sentence states where I got that info.
    – ivanivan
    1 hour ago












up vote
0
down vote










up vote
0
down vote









Yup. Think like HTML... but pre-HTML. Basically a bunch of typesetting macros for groff ...



First, there are some commonly agreed on sections - of course you can add more...



NAME
SYNOPSIS
DESCRIPTION
OPTIONS
BUGS
AUTHOR
SEE ALSO


And for each (and everywhere else) you use the groff typesetting macro syntax.



For example, a TITLE HEADER can be done like so -



.TH [name of program] [section number] [center footer] [left footer] [center header]


Or a SECTION HEADER -



.SH [section name]


And of course, you can bold, italic, underline, etc -



.B = bold
.BI = bold alternating italic
.BR = bold alternating Roman
.I = italic
.IB = italic alternating bold
.IR = italic alternating Roman
.RB = Roman alternating bold
.RI = Roman alternating italic


And you can even make comments in your text file -



." This is a comment


And then things like paragraphing (like the <p></p> html tag set) with .PP



Don't forget to name the file appropriately, and then gzip it when done.



This info (and more) is from http://www.linuxhowtos.org/System/creatingman.htm






share|improve this answer












Yup. Think like HTML... but pre-HTML. Basically a bunch of typesetting macros for groff ...



First, there are some commonly agreed on sections - of course you can add more...



NAME
SYNOPSIS
DESCRIPTION
OPTIONS
BUGS
AUTHOR
SEE ALSO


And for each (and everywhere else) you use the groff typesetting macro syntax.



For example, a TITLE HEADER can be done like so -



.TH [name of program] [section number] [center footer] [left footer] [center header]


Or a SECTION HEADER -



.SH [section name]


And of course, you can bold, italic, underline, etc -



.B = bold
.BI = bold alternating italic
.BR = bold alternating Roman
.I = italic
.IB = italic alternating bold
.IR = italic alternating Roman
.RB = Roman alternating bold
.RI = Roman alternating italic


And you can even make comments in your text file -



." This is a comment


And then things like paragraphing (like the <p></p> html tag set) with .PP



Don't forget to name the file appropriately, and then gzip it when done.



This info (and more) is from http://www.linuxhowtos.org/System/creatingman.htm







share|improve this answer












share|improve this answer



share|improve this answer










answered 3 hours ago









ivanivan

3,3491314




3,3491314











  • " Think like HTML... but pre-HTML" -- that is a bit hard, given that I am younger than HTML :P.
    – theindigamer
    3 hours ago










  • I'm not sure how accurate this answer is. man(1) page uses ." for comments.
    – theindigamer
    2 hours ago










  • @theindigamer I only wrote one man page (out of curiosity, much like the OP seems to be) and it was a long time ago and I don't have the bookmark (maybe at work?). My last sentence states where I got that info.
    – ivanivan
    1 hour ago
















  • " Think like HTML... but pre-HTML" -- that is a bit hard, given that I am younger than HTML :P.
    – theindigamer
    3 hours ago










  • I'm not sure how accurate this answer is. man(1) page uses ." for comments.
    – theindigamer
    2 hours ago










  • @theindigamer I only wrote one man page (out of curiosity, much like the OP seems to be) and it was a long time ago and I don't have the bookmark (maybe at work?). My last sentence states where I got that info.
    – ivanivan
    1 hour ago















" Think like HTML... but pre-HTML" -- that is a bit hard, given that I am younger than HTML :P.
– theindigamer
3 hours ago




" Think like HTML... but pre-HTML" -- that is a bit hard, given that I am younger than HTML :P.
– theindigamer
3 hours ago












I'm not sure how accurate this answer is. man(1) page uses ." for comments.
– theindigamer
2 hours ago




I'm not sure how accurate this answer is. man(1) page uses ." for comments.
– theindigamer
2 hours ago












@theindigamer I only wrote one man page (out of curiosity, much like the OP seems to be) and it was a long time ago and I don't have the bookmark (maybe at work?). My last sentence states where I got that info.
– ivanivan
1 hour ago




@theindigamer I only wrote one man page (out of curiosity, much like the OP seems to be) and it was a long time ago and I don't have the bookmark (maybe at work?). My last sentence states where I got that info.
– ivanivan
1 hour ago

















 

draft saved


draft discarded















































 


draft saved


draft discarded














StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f481025%2fis-there-a-specification-for-the-format-used-by-man-pages%23new-answer', 'question_page');

);

Post as a guest













































































Popular posts from this blog

How to check contact read email or not when send email to Individual?

Displaying single band from multi-band raster using QGIS

How many registers does an x86_64 CPU actually have?