Hi,

just FYI:

zeurk...@volny.cz wrote on Tue, Dec 17, 2019 at 08:10:10PM +0100:
> jmc@ wrote:

>> Dq produces "", so use either Dq or "".

> Medoes it for consistency with cases like:
> 
> .Vt "struct blaat" Va scaahp Ns Ic ";"
> 
> where the quotes are part of the invocation syntax.

Not really.

The arguments of .Vt almost never need quoting, not even if there
are other macros before or after it on the same input line.

The usual way to quote punctuation is by prepending a zero-width
space, so if you really wanted to talk about a command called ";",
you would write:   .Ic \&;
But such a command would be weirdly named indeed, and appending
an internal command to a variable name would make no sense either.

If "scaahp" is a global variable, the best way to mention it is
simply

  .Vt struct blaat scaahp ;

as documented in the mdoc(7) manual:

  https://man.openbsd.org/mdoc.7#Vt_2

Note that the trailing semicolon is just punctuation, so it is
actually important to *not* escape or quote it.

The forms

  .Va struct blaat scaahp ;
  .Vt struct blaat Va scaahp ;

are also acceptable albeit less common.
No quoting or escaping either way...


Quoting with "" *is* needed in cases where it matters that two words
are kept together in a single macro argument even though there is
a space character between them in the source:

  .Sh SYNOPSIS
  .Ft double
  .Fn sin "double x"

But that certainly isn't needed for .Vt.  Relatively few macros
care, most prominently .Fa and .Fn.

Yours,
  Ingo

Reply via email to