aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/regress/roff
diff options
context:
space:
mode:
authorIngo Schwarze <schwarze@openbsd.org>2017-05-07 17:31:45 +0000
committerIngo Schwarze <schwarze@openbsd.org>2017-05-07 17:31:45 +0000
commit72ffb5f81a5259c8b01aa48d71c3542bc8eed8d7 (patch)
tree31fa6b4a1d8a875e8da528874a5b9907e452f853 /regress/roff
parent3bbe9ca77bfa0a811b6ac068444fadfbb440cb8e (diff)
downloadmandoc-72ffb5f81a5259c8b01aa48d71c3542bc8eed8d7.tar.gz
mandoc-72ffb5f81a5259c8b01aa48d71c3542bc8eed8d7.tar.zst
mandoc-72ffb5f81a5259c8b01aa48d71c3542bc8eed8d7.zip
Basic implementation of the roff(7) .ta (define tab stops) request.
This is the first feature made possible by the parser reorganization. Improves the formatting of the SYNOPSIS in many Xenocara GL manuals. Also important for ports, as reported by many, including naddy@.
Diffstat (limited to 'regress/roff')
-rw-r--r--regress/roff/Makefile2
-rw-r--r--regress/roff/ta/Makefile5
-rw-r--r--regress/roff/ta/basic-man.in19
-rw-r--r--regress/roff/ta/basic-man.out_ascii22
-rw-r--r--regress/roff/ta/basic-mdoc.in34
-rw-r--r--regress/roff/ta/basic-mdoc.out_ascii25
6 files changed, 106 insertions, 1 deletions
diff --git a/regress/roff/Makefile b/regress/roff/Makefile
index 96474204..c97b99b1 100644
--- a/regress/roff/Makefile
+++ b/regress/roff/Makefile
@@ -1,7 +1,7 @@
# $OpenBSD: Makefile,v 1.20 2015/02/06 16:05:51 schwarze Exp $
SUBDIR = args cond esc scale string
-SUBDIR += br cc de ds ft ig it ll na nr ps rm sp tr
+SUBDIR += br cc de ds ft ig it ll na nr ps rm sp ta tr
.include "../Makefile.sub"
.include <bsd.subdir.mk>
diff --git a/regress/roff/ta/Makefile b/regress/roff/ta/Makefile
new file mode 100644
index 00000000..656c5174
--- /dev/null
+++ b/regress/roff/ta/Makefile
@@ -0,0 +1,5 @@
+# $OpenBSD$
+
+REGRESS_TARGETS = basic-mdoc basic-man
+
+.include <bsd.regress.mk>
diff --git a/regress/roff/ta/basic-man.in b/regress/roff/ta/basic-man.in
new file mode 100644
index 00000000..f2f4641d
--- /dev/null
+++ b/regress/roff/ta/basic-man.in
@@ -0,0 +1,19 @@
+.TH TA-BASIC-MAN 1 "May 7, 2014" OpenBSD
+.SH NAME
+ta-basic-man \- setting tabstop positions in man(7)
+.SH DESCRIPTION
+.nf
+default:
+1 2 3
+10n:
+.ta 10n
+1 2 3
+none:
+.ta
+1 2 3
+3n +6n T 4n +2n:
+.ta 3n +6n T 4n +2n
+1 2 3 4 5 6 7 8 9
+default unit:
+.ta 3 +4 12
+1 2 3 4
diff --git a/regress/roff/ta/basic-man.out_ascii b/regress/roff/ta/basic-man.out_ascii
new file mode 100644
index 00000000..37062245
--- /dev/null
+++ b/regress/roff/ta/basic-man.out_ascii
@@ -0,0 +1,22 @@
+TA-BASIC-MAN(1) General Commands Manual TA-BASIC-MAN(1)
+
+
+
+NNAAMMEE
+ ta-basic-man - setting tabstop positions in man(7)
+
+DDEESSCCRRIIPPTTIIOONN
+ default:
+ 1 2 3
+ 10n:
+ 1 23
+ none:
+ 123
+ 3n +6n T 4n +2n:
+ 1 2 3 4 5 6 7 8 9
+ default unit:
+ 1 2 3 4
+
+
+
+OpenBSD May 7, 2014 TA-BASIC-MAN(1)
diff --git a/regress/roff/ta/basic-mdoc.in b/regress/roff/ta/basic-mdoc.in
new file mode 100644
index 00000000..24c83bd4
--- /dev/null
+++ b/regress/roff/ta/basic-mdoc.in
@@ -0,0 +1,34 @@
+.Dd May 7, 2017
+.Dt TA-BASIC-MDOC 1
+.Os OpenBSD
+.Sh NAME
+.Nm ta-basic-mdoc
+.Nd setting tabstop positions in mdoc(7)
+.Sh DESCRIPTION
+.Bd -unfilled
+default:
+1 2 3
+10n:
+.ta 10n
+1 2 3
+none:
+.ta
+1 2 3
+3n +6n T 4n +2n:
+.ta 3n +6n T 4n +2n
+1 2 3 4 5 6 7 8 9
+.Ed
+.Pp
+literal:
+.Bd -literal -compact
+1 2 3
+.Ed
+.Pp
+after literal:
+.br
+1 2 3
+.Pp
+default unit:
+.br
+.ta 3 +4 12
+1 2 3 4
diff --git a/regress/roff/ta/basic-mdoc.out_ascii b/regress/roff/ta/basic-mdoc.out_ascii
new file mode 100644
index 00000000..83feb627
--- /dev/null
+++ b/regress/roff/ta/basic-mdoc.out_ascii
@@ -0,0 +1,25 @@
+TA-BASIC-MDOC(1) General Commands Manual TA-BASIC-MDOC(1)
+
+NNAAMMEE
+ ttaa--bbaassiicc--mmddoocc - setting tabstop positions in mdoc(7)
+
+DDEESSCCRRIIPPTTIIOONN
+ default:
+ 1 2 3
+ 10n:
+ 1 23
+ none:
+ 123
+ 3n +6n T 4n +2n:
+ 1 2 3 4 5 6 7 8 9
+
+ literal:
+ 1 2 3
+
+ after literal:
+ 1 2 3
+
+ default unit:
+ 1 2 3 4
+
+OpenBSD May 7, 2017 OpenBSD