The "Callable" property is described in
https://man.freebsd.org/cgi/man.cgi?mdoc#MACRO_SYNTAX

Let's get straight to an example.


example.roff:

  .Dd September 1, 2025
  .Dt EXAMPLE 1
  .Os
  .Sh NAME
  .Nm Example
  .Nd does absolutely nothing, but has a man page
  .Sh DESCRIPTION
  %N
  .Pp
  .Ql %N


The `%N` is _not_ a callable macro.


mandoc lint:

  $ mandoc -Tlint example.roff
  mandoc: example.roff:10:5: WARNING: macro neither callable nor escaped: %N


mandoc output:

  $ mandoc -Tutf8 example.roff
  ...
  DESCRIPTION
       %N

       ā€˜%N’


groff output:

  $ groff -mdoc -Tutf8 example.roff
  ...
  DESCRIPTION
         %N

         ā€˜

Both appears to detect that the usage of `%N` is outside the mdoc spec.
The difference is that `mandoc` prints `%N` verbatim whereas `groff`
swallows `%N` and prints incomplete result.

Is `groff` working intended? or should it work like `mandoc` does?

I encountered the issue when fiddling with man-db `man` and `date`
command manual.
The example is a minimized version of `date.1`.
https://github.com/apple-oss-distributions/shell_cmds/blob/shell_cmds-326/date/date.1


Testing enviornment:
macOS 15.7
groff 1.23.0 (Homebrew)
mandoc 1.14.6_1 (Homebrew)

Reply via email to