2
0

README 3.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182
  1. The manpages are generated by processing *.m4 files using m4.
  2. Manpages are written in "roff", which is an ancient text formatting/markup system and language
  3. with a lot of peculiarities. For the Dinit manpages we try to stick to the subset documented here.
  4. Roff formatting guide:
  5. Inline formatting ("escapes"):
  6. \fB - set bold
  7. \fI - set italic (may show as underlined when output on console)
  8. \fR - set regular (i.e. unset bold & italic)
  9. Special characters (see groff_char(7)):
  10. '\ ' - (backslash followed by space) - non-breaking space
  11. \& - zero-width space
  12. \- - literal hyphen (also suppresses line breaking through dash)
  13. \(em - em-dash (GNU groff accepts "\[em]" as well but it may not be portable)
  14. \(en - en-dash
  15. \(bu - bullet point
  16. ` and ' (backtick / apostrophe) - use for opening/closing single quotes
  17. Line commands ("requests"):
  18. .\" - begins a comment line (may be used for spacing in source document without the effect that having a
  19. line would)
  20. .sp - vertical space (i.e. blank line without breaking paragraph)
  21. ... and macros (which behave like requests). Arguments can be quoted ("...") if they contain
  22. spaces.
  23. .TH <title> <section> [<up to three extras>] - title macro. See "structure" notes below.
  24. .SH <name> - section heading for <name> (name usually capitalised). If name is omitted the
  25. next line is used.
  26. .LP - begin a new normal paragraph
  27. .HP - begin a hanging paragraph (lines after the first are indented)
  28. .TP - begin an indented paragraph with unindented label (label is on the next line); .TQ can be used
  29. immediately after the first label, in order to specify additional labels, each appearing on their
  30. own line.
  31. .IP - indented paragraph (can be used to follow on from .TP)
  32. .IP \(bu - indented paragraph with bullet point
  33. .RS - increase left margin by one level (and reset indentation)
  34. .RE - decrease left margin by one level
  35. .EX - begin example (monospace font, line ends as they appear in source)
  36. .EE - end example
  37. Structure:
  38. Documents should start with a .TH header line ("8" is the man section):
  39. .TH DINIT "8" "October 2022" "Dinit 0.16.1" "Dinit - service management system"
  40. This should be followed by a NAME section:
  41. .SH NAME
  42. dinit \- supervise processes and manage services
  43. Gotchas:
  44. * Sentences should always end (with a period) at the end of a line (this affects spacing in output).
  45. * hyphens which are actually part of a word (part of a setting name for example) should be
  46. preceded by a backslash ("\-") which will prevent the literal from being split over multiple lines.
  47. * Blank lines should be avoided. Use .LP/.HP/.TP/.IP for example to start a paragraph. Use .IP for
  48. follow-on paragraphs after .TP. Use .sp for space within a paragraph in the rare case that is
  49. needed.
  50. For synopsis:
  51. .PD 0 -- no space between paragraphs
  52. .nh -- disable hyphenation
  53. .HP -- begin hanging paragraph
  54. (command goes here)
  55. .HP
  56. (next command variant)
  57. .PD -- default paragraph spacing
  58. .hy -- default hyphenation