Manual pages can be written either in the old man macros or the new doc macros. The man macro set provides minimal
rich text functions, with directives for the title line, section headers, (bold, small or italic) fonts, paragraphs and adding/reducing indentation. The newer mdoc language is more semantic in nature, and contains specialized macros for most standard sections such as program name, synopsis, function names, and the name of the authors. This information can be used to implement a
semantic search for manuals by programs such as
mandoc. Although it also includes directives to directly control the styling, it is expected that the specialized macros will cover most of the use-cases. Both the mandoc and the groff projects consider mdoc the preferred format for new documents. Although man pages are, to troff, text laid out using 10-point
Roman type, this distinction is usually moot because man pages are viewed in the terminal (TTY) instead of laid out on paper. As a result, the "small font" macro is seldom used. On the other hand, bold and italic text is supported by the terminal via
ECMA-48, and groff's grotty does emit them as requested when it detects a supporting terminal. The BSD mandoc however only supports bold and underlined (as a replacement for italics) text via the typewriter backspace-then-overstrike sequence, which needs to be translated into ECMA-48 by less. Some tools have been used to convert documents in a less contrived format to manual pages. Examples include GNU's help2man, which takes a --help output and some additional content to generate a manual page. The manual would be barely more useful than the said output, but for GNU programs this is not an issue as texinfo is the main documentation system. A number of tools, including
pandoc, ronn, and md2man support conversion from
Markdown to manual pages. All these tools emit the man format, as Markdown is not expressive enough to match the semantic content of mdoc.
DocBook has an inbuilt man(7) converter – of appalling quality, according to mandoc's author who wrote a separate mdoc(7) converter. Man pages are usually written in English, but translations into other languages may be available on the system. The GNU man-db and the mandoc man is known to search for localized manual pages under subdirectories. In addition, some Unix
GUI applications (particularly those built using the
GNOME and
KDE development environments) now provide end-user documentation in
HTML and include embedded HTML viewers such as yelp for reading the help within the application. An HTML system in
Emacs is also slated to replace texinfo. ==See also==