Hi! In attach file /etc/asciidoc/man.conf for generating correct OS Inferno/Plan9 man pages, which are looks mostly same as manually written.
It can be distributed with asciidoc if you like. I'll be happy to hear about any possible improvements. If it will not be distributed with asciidoc, latest version will be available here: http://powerman.name/download/asciidoc/man.conf -- WBR, Alex. -- You received this message because you are subscribed to the Google Groups "asciidoc" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/asciidoc?hl=en.
# # man.conf # # OS Inferno and Plan9 compatible man pages. # # == SYNOPSIS .SH SYNOPSIS # === Second Header .SS Second Header # http://plain.url/example .B http://plain.url/example # man(1) .IR man (1) # ``quoted'' ‘‘quoted’’ # `single quoted' ‘single quoted’ # *ls -l* .B ls -l # *function_name* .B function_name # *func(param1,param2)* .BI func( param1 , param2 ) # *func(param1,nil)* .BI func( param1 , "" nil "" ) # *mod->func(param1)* .IB mod ->func( param1 ) # *(tuple1,tuple2)* .BI ( tuple1 , tuple2 ) # 'param1' .I param1 # *nil* .B nil # +UTF+ .SM UTF # # `/path/to/source.b` .B /path/to/source.b # .br # # .RS # *term1*:: value1 .TP # .B term1 # value1 # term2:: value2 .TP # term2 # value2 # .RS # term21::: value21 .TP # term21 # value21 # term22::: value22 .TP # term22 # value22 # .RE # .RE # # [horizontal] .RS # [indent="term1"] .TF term1 # .PD # *term1*:: value1 .TP # .B term1 # value1 # term2:: value2 .TP # term2 # value2 # .RE # # .RS # - dash1 .IP • # dash1 # - dash2 .IP • # dash2 # .RS # * star1 .IP • # star1 # * star2 .IP • # star2 # .RS # . num1 .IP # num1 # . num2 .IP # num2 # .RE # .RE # .RE [attributes] basebackend=man basebackend-man= # BAD DEFAULT: default \r\n not acceptable newline=\n # Man page structure [header] .TH {eval:'{manname}'.upper()} {manvolnum} .SH NAME {manname} \- {manpurpose} [synopsis] template::[sect1] [sect1] .SH {title} | [sect2] .SS {title} | [footer] [macros] # AUTODETECT: references to man pages (?su)(?<!\w)(?P<name>\w+)(?P<vol>\(\d\)[),.]*)=manref # AUTODETECT: *module->function(param1,param2)* with 0..3 params (?sum)^\.B (?P<module>\w+)->(?P<funcbeg>\w*\()(?P<funcend>\))=modref0 (?sum)^\.B (?P<module>\w+)->(?P<funcbeg>\w*\()(?P<param1>[^,)]+)(?P<funcend>\))=modref1 (?sum)^\.B (?P<module>\w+)->(?P<funcbeg>\w*\()(?P<param1>[^,)]+),(?P<param2>[^,)]+)(?P<funcend>\))=modref2 (?sum)^\.B (?P<module>\w+)->(?P<funcbeg>\w*\()(?P<param1>[^,)]+),(?P<param2>[^,)]+),(?P<param3>[^,)]+)(?P<funcend>\))=modref3 # AUTODETECT: *function(param1,param2)* with 1..3 params (?sum)^\.B (?P<funcbeg>\w*\()(?P<param1>[^,)]+)(?P<funcend>\))=funcref1 (?sum)^\.B (?P<funcbeg>\w*\()(?P<param1>[^,)]+),(?P<param2>[^,)]+)(?P<funcend>\))=funcref2 (?sum)^\.B (?P<funcbeg>\w*\()(?P<param1>[^,)]+),(?P<param2>[^,)]+),(?P<param3>[^,)]+)(?P<funcend>\))=funcref3 # Inline macros [manref-inlinemacro] {newline}.IR {name} {vol}{newline} [modref0-inlinemacro] {newline}.IB {module} ->{funcbeg}{funcend}{newline} [modref1-inlinemacro] {newline}.IB {module} ->{funcbeg} {par...@^nil$:"" nil "":{param1}} {funcend}{newline} [modref2-inlinemacro] {newline}.IB {module} ->{funcbeg} {par...@^nil$:"" nil "":{param1}} , {par...@^nil$:"" nil "":{param2}} {funcend}{newline} [modref3-inlinemacro] {newline}.IB {module} ->{funcbeg} {par...@^nil$:"" nil "":{param1}} , {par...@^nil$:"" nil "":{param2}} , {par...@^nil$:"" nil "":{param3}} {funcend}{newline} [funcref1-inlinemacro] {newline}.BI {funcbeg} {par...@^nil$:"" nil "":{param1}} {funcend}{newline} [funcref2-inlinemacro] {newline}.BI {funcbeg} {par...@^nil$:"" nil "":{param1}} , {par...@^nil$:"" nil "":{param2}} {funcend}{newline} [funcref3-inlinemacro] {newline}.BI {funcbeg} {par...@^nil$:"" nil "":{param1}} , {par...@^nil$:"" nil "":{param2}} , {par...@^nil$:"" nil "":{param3}} {funcend}{newline} [http-inlinemacro] {newline}.B {name}:{target}{newline} [https-inlinemacro] {newline}.B {name}:{target}{newline} [ftp-inlinemacro] {newline}.B {name}:{target}{newline} [file-inlinemacro] {newline}.B {name}:{target}{newline} [irc-inlinemacro] {newline}.B {name}:{target}{newline} [mailto-inlinemacro] {newline}.B {name}:{target}{newline} [callto-inlinemacro] {newline}.B {name}:{target}{newline} [link-inlinemacro] {newline}.B {name}:{target}{newline} [specialcharacters] # BAD DEFAULT: switch off default escaping as html entity >=> <=< &=& [replacements] # BAD DEFAULT: switch off default escaping as html entity ’=' [replacements2] # WORKAROUND: fix a lot of things, but I don't sure why these bad things happens (?m)^\s+= # WORKAROUND: fix [).,] supposed to be adjoining to bold/italic single word (?m)^\.([BI]) +(\S+) *\n((?!\.\w)[).,]+)\s*=.\1R \2 \3\n # WORKAROUND: fix line starting with dot after troff's join words command (?m)^(\.[A-Z][A-Z].*)\n((?!\.\w)\.+)=\1 \2\n # Inline literal. [literal-inlinemacro] # USAGE: source files {newline}.B {passtext}{newline}.br{newline} # Quoted text. [tags] # USAGE: variables emphasis={newline}.I |{newline} # USAGE: functions strong={newline}.B |{newline} # USAGE: all-capital names like UTF, ASCII, NUL monospaced={newline}.SM |{newline} # USAGE: quoted text, use instead of "..." doublequoted=‘‘|’’ singlequoted=‘|’ unquoted=| superscript=| subscript=| # Paragraph substitution. [paragraph] .PP{newline} | [literalparagraph] template::[literalblock] # Delimited blocks. [passthroughblock] | [listingblock] .EX{newline} |{newline} .EE [literalblock] .EX{newline} |{newline} .EE # List tags. [listtags-bulleted] list=.RS|.RE item=.IP • text=| [listtags-numbered] list=.RS|.RE item=.IP text=| [listtags-labeled] list=.RS|.RE entry= label= term=.TP item= text=| [listtags-horizontal] list=.RS{newline}.TF {indent}{newline}.PD|.RE entry= label= term=.TP item= text=| # Unused, but required sections [miscellaneous] pagewidth=800 pageunits= [image-blockmacro] [listtags-callout] [listtags-qanda] [listtags-glossary] [listtags-bibliography] [verseparagraph] [admonitionparagraph] [sidebarblock] [abstractblock] [quoteblock] [verseblock] [exampleblock] [admonitionblock] [mathblock] [tabletags-default] bodyrow= bodydata= paragraph= [tabletags-emphasis] [tabletags-strong] [tabletags-monospaced] [tabletags-verse] [tabletags-literal] [tabletags-asciidoc] [table]
