_                    _
  ___ | |__   __ _ _______ | |_
 / _ \| '_ \ / _` |_  / _ \| __|
| (_) | | | | (_| |/ / (_) | |_
 \___/|_| |_|\__,_/___\___/ \__|

mdocusage

WIP: This document is a work in progress, it does not have all examples.
NOTE: The results in these examples are affected by the site css, the results would be different on the terminal or with a different css.

List have the following format:

.Bl -[TYPE]
.It
item
.El
The item needs to be in the following line, some list can have the item or extra information in-line, those will be specified.
| Result
dash | -
bullet | •
enum | 1,2,3...

.Bl -column string1 string2
- string: defines the width of the column by using the length of the string.
- strings can be quoted if it contains spaces.
Any number of strings can be used.
.It col1 Ta col2
- The contents of the line as specified in the It line.
- The cells are separated by Ta.
To specify the headers, add Sy to the cell to set the bold font in the first item.

| | |
Li | literal display font | Li words |
Ql | inline quoted literal display | Ql words | ‘words

(back to top)

If a character is not displayed, it may be need to be escaped. Most chracters or words conflicting with mdoc commands can be escaped adding \& before the required character or command.

" | \&"
. | \&.
\ | \e
No | \&No
Spaces can be escaped as well with \, "\ " will display " ".

(back to top)

- Review this document on OpenBSD 7.9 release.
- Add lists definitions: inset, diag, hang, ohang, tag.
- Translate to Spanish.

(back to top)

documentation, mandoc, roff, mdoc_list_examples
examples: </man/manoh>
OpenBSD manpages: mdoc(7), mandoc_char(7)
links
- The mandoc UNIX manpage compiler toolset

(back to top)

2025-11-23 : Added some common escape sequences.
2025-10-14 : Moved mdoc examples section to its own document.
2025-10-12 : Created.

(back to top)

ohazot | about | ohazot.com <admin@ohazot.com>

This document applies to: OpenBSD 7.8 , linux| 2025-11-23