Skip to content

Use standard troff escape sequences #10716

@mohd-akram

Description

@mohd-akram

Explain the problem.
Not all parsers support Groff style \[xx] escape sequences. Eg. on macOS, they cause issues with whatis:

$ cat pandoc.html
<h1>NAME</h1>
pandoc &mdash; general markup converter
$ mkdir -p man/man1
$ pandoc -tman pandoc.html > man/man1/pandoc.1
$ /usr/libexec/makewhatis man
$ cat man/whatis
pandoc(1)                - [em] general markup converter

I would suggest using the standard \(xx style escape sequences, eg. \(em which are supported by all parsers.

This should apply to other two-character escape sequences in --ascii mode as well, eg. Δ becomes \(*D, which has been around since troff was introduced.

Longer escape sequences can use \C'nnn', eg. \C'hbar'.

Pandoc version?
pandoc 3.6.2, macOS 15.3.2

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions