tmac/tmac.an*: support lq, rq strings

The `lq` and `rq` strings are not a groffism, but _almost_ universally
portable to man(7) renderers.

They originate in 4BSD (1980).[1]  They entered Unix System V with SVR4
(1988 or 1989).[2]  mandoc(1) has supported them since its inception.[3]

* tmac/tmac.an:
* tmac/tmac.antimes: Do it.  Use U+201C and U+201D if the output device
  is "utf", otherwise define them as `` and ''.  Don't define them as
  `"` because that breaks when interpolating the strings in macro
  arguments.[4]

[1] https://minnie.tuhs.org/cgi-bin/utree.pl?file=4BSD/usr/lib/tmac/tmac.an.new
[2]
e68293af91/sysvr4/svr4/ucbcmd/troff/troff.d/tmac.d/an (L46)
[3] https://cvsweb.openbsd.org/cgi-bin/cvsweb/src/usr.bin/mandoc/predefs.in?rev=1.1&content-type=text/x-cvsweb-markup
[4] https://www.gnu.org/software/groff/manual/groff.html.node/Calling-Macros.html

   "For the (neutral) double quote, you have recourse to an obscure
   syntactical feature of AT&T troff. ..."
This commit is contained in:
G. Branden Robinson
2025-08-24 11:53:38 -05:00
committed by Dan Cross
parent 19263a1071
commit e5b5757e64
2 changed files with 16 additions and 0 deletions

View File

@@ -478,6 +478,8 @@
.nr )V 11 \} .nr )V 11 \}
.if t \{.ds R ® .if t \{.ds R ®
.ds S \s\n()S .ds S \s\n()S
.ds lq “
.ds rq ”
..\} ..\}
.if n \{.ie \nL<=0 .nr )L 11i .if n \{.ie \nL<=0 .nr )L 11i
.el \{.nr )L \nLu .el \{.nr )L \nLu
@@ -491,6 +493,12 @@
.nr )O 0\} .nr )O 0\}
.ds R (Reg.) .ds R (Reg.)
.ds S .ds S
.ds lq ``
.ds rq ''
.\" Insert definitions for non-utf troff-mode devices here.
.if '\*(.T'utf' \{.ds lq “
.ds rq ”
.\}
..\} ..\}
.if \nT .nr LL 80n .if \nT .nr LL 80n
.if \nV>1 \{ .if \nV>1 \{

View File

@@ -450,6 +450,8 @@
.nr)V 12 \} .nr)V 12 \}
.ift \{.ds R \(rg .ift \{.ds R \(rg
.dsS \s\n()S .dsS \s\n()S
.ds lq “
.ds rq ”
..\} ..\}
.ifn \{.nr )L 11i .ifn \{.nr )L 11i
.nrLL 6.5i .nrLL 6.5i
@@ -461,6 +463,12 @@
.nr)O 0\} .nr)O 0\}
.dsR (Reg.) .dsR (Reg.)
.dsS .dsS
.ds lq ``
.ds rq ''
.\" Insert definitions for non-utf troff-mode devices here.
.if '\*(.T'utf' \{.ds lq “
.ds rq ”
.\}
..\} ..\}
.if\nT .nr LL 80n .if\nT .nr LL 80n
.if\nV>1 \{ .if\nV>1 \{