summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--regress/usr.bin/mandoc/mdoc/Ad/Makefile4
-rw-r--r--regress/usr.bin/mandoc/mdoc/Ad/font.in10
-rw-r--r--regress/usr.bin/mandoc/mdoc/Ad/font.out_ascii9
-rw-r--r--regress/usr.bin/mandoc/mdoc/Ar/Makefile4
-rw-r--r--regress/usr.bin/mandoc/mdoc/Ar/font.in10
-rw-r--r--regress/usr.bin/mandoc/mdoc/Ar/font.out_ascii9
-rw-r--r--regress/usr.bin/mandoc/mdoc/Cd/Makefile4
-rw-r--r--regress/usr.bin/mandoc/mdoc/Cd/font.in10
-rw-r--r--regress/usr.bin/mandoc/mdoc/Cd/font.out_ascii9
-rw-r--r--regress/usr.bin/mandoc/mdoc/Cm/Makefile4
-rw-r--r--regress/usr.bin/mandoc/mdoc/Cm/font.in10
-rw-r--r--regress/usr.bin/mandoc/mdoc/Cm/font.out_ascii9
-rw-r--r--regress/usr.bin/mandoc/mdoc/Dv/font.in3
-rw-r--r--regress/usr.bin/mandoc/mdoc/Dv/font.out_ascii2
-rw-r--r--regress/usr.bin/mandoc/mdoc/Em/Makefile5
-rw-r--r--regress/usr.bin/mandoc/mdoc/Em/font.in10
-rw-r--r--regress/usr.bin/mandoc/mdoc/Em/font.out_ascii9
-rw-r--r--regress/usr.bin/mandoc/mdoc/Er/Makefile4
-rw-r--r--regress/usr.bin/mandoc/mdoc/Er/font.in10
-rw-r--r--regress/usr.bin/mandoc/mdoc/Er/font.out_ascii9
-rw-r--r--regress/usr.bin/mandoc/mdoc/Ev/font.in3
-rw-r--r--regress/usr.bin/mandoc/mdoc/Ev/font.out_ascii2
-rw-r--r--regress/usr.bin/mandoc/mdoc/Fl/Makefile4
-rw-r--r--regress/usr.bin/mandoc/mdoc/Fl/font.in10
-rw-r--r--regress/usr.bin/mandoc/mdoc/Fl/font.out_ascii9
-rw-r--r--regress/usr.bin/mandoc/mdoc/Fo/Makefile4
-rw-r--r--regress/usr.bin/mandoc/mdoc/Fo/font.in19
-rw-r--r--regress/usr.bin/mandoc/mdoc/Fo/font.out_ascii13
-rw-r--r--regress/usr.bin/mandoc/mdoc/Ft/Makefile5
-rw-r--r--regress/usr.bin/mandoc/mdoc/Ft/font.in10
-rw-r--r--regress/usr.bin/mandoc/mdoc/Ft/font.out_ascii9
-rw-r--r--regress/usr.bin/mandoc/mdoc/Ic/Makefile4
-rw-r--r--regress/usr.bin/mandoc/mdoc/Ic/font.in10
-rw-r--r--regress/usr.bin/mandoc/mdoc/Ic/font.out_ascii9
-rw-r--r--regress/usr.bin/mandoc/mdoc/In/Makefile4
-rw-r--r--regress/usr.bin/mandoc/mdoc/In/font.in10
-rw-r--r--regress/usr.bin/mandoc/mdoc/In/font.out_ascii9
-rw-r--r--regress/usr.bin/mandoc/mdoc/Li/Makefile4
-rw-r--r--regress/usr.bin/mandoc/mdoc/Li/font.in10
-rw-r--r--regress/usr.bin/mandoc/mdoc/Li/font.out_ascii9
-rw-r--r--regress/usr.bin/mandoc/mdoc/Lk/Makefile4
-rw-r--r--regress/usr.bin/mandoc/mdoc/Lk/font.in10
-rw-r--r--regress/usr.bin/mandoc/mdoc/Lk/font.out_ascii9
-rw-r--r--regress/usr.bin/mandoc/mdoc/Makefile7
-rw-r--r--regress/usr.bin/mandoc/mdoc/Ms/Makefile4
-rw-r--r--regress/usr.bin/mandoc/mdoc/Ms/font.in10
-rw-r--r--regress/usr.bin/mandoc/mdoc/Ms/font.out_ascii9
-rw-r--r--regress/usr.bin/mandoc/mdoc/Mt/Makefile4
-rw-r--r--regress/usr.bin/mandoc/mdoc/Mt/font.in10
-rw-r--r--regress/usr.bin/mandoc/mdoc/Mt/font.out_ascii9
-rw-r--r--regress/usr.bin/mandoc/mdoc/Nm/Makefile4
-rw-r--r--regress/usr.bin/mandoc/mdoc/Nm/font.in10
-rw-r--r--regress/usr.bin/mandoc/mdoc/Nm/font.out_ascii9
-rw-r--r--regress/usr.bin/mandoc/mdoc/Pa/Makefile6
-rw-r--r--regress/usr.bin/mandoc/mdoc/Pa/font.in10
-rw-r--r--regress/usr.bin/mandoc/mdoc/Pa/font.out_ascii9
-rw-r--r--regress/usr.bin/mandoc/mdoc/Sx/Makefile4
-rw-r--r--regress/usr.bin/mandoc/mdoc/Sx/font.in10
-rw-r--r--regress/usr.bin/mandoc/mdoc/Sx/font.out_ascii9
-rw-r--r--regress/usr.bin/mandoc/mdoc/Sy/Makefile4
-rw-r--r--regress/usr.bin/mandoc/mdoc/Sy/font.in10
-rw-r--r--regress/usr.bin/mandoc/mdoc/Sy/font.out_ascii9
-rw-r--r--regress/usr.bin/mandoc/mdoc/Tn/Makefile4
-rw-r--r--regress/usr.bin/mandoc/mdoc/Tn/font.in10
-rw-r--r--regress/usr.bin/mandoc/mdoc/Tn/font.out_ascii9
-rw-r--r--regress/usr.bin/mandoc/mdoc/Va/Makefile4
-rw-r--r--regress/usr.bin/mandoc/mdoc/Va/font.in10
-rw-r--r--regress/usr.bin/mandoc/mdoc/Va/font.out_ascii9
-rw-r--r--regress/usr.bin/mandoc/mdoc/Vt/Makefile4
-rw-r--r--regress/usr.bin/mandoc/mdoc/Vt/font.in10
-rw-r--r--regress/usr.bin/mandoc/mdoc/Vt/font.out_ascii9
-rw-r--r--usr.bin/mandoc/mdoc_man.c214
72 files changed, 642 insertions, 112 deletions
diff --git a/regress/usr.bin/mandoc/mdoc/Ad/Makefile b/regress/usr.bin/mandoc/mdoc/Ad/Makefile
index e37fab926d4..24e03a34e5c 100644
--- a/regress/usr.bin/mandoc/mdoc/Ad/Makefile
+++ b/regress/usr.bin/mandoc/mdoc/Ad/Makefile
@@ -1,5 +1,5 @@
-# $OpenBSD: Makefile,v 1.2 2011/11/17 16:28:45 schwarze Exp $
+# $OpenBSD: Makefile,v 1.3 2012/07/09 17:52:09 schwarze Exp $
-REGRESS_TARGETS=noarg
+REGRESS_TARGETS = noarg font
.include <bsd.regress.mk>
diff --git a/regress/usr.bin/mandoc/mdoc/Ad/font.in b/regress/usr.bin/mandoc/mdoc/Ad/font.in
new file mode 100644
index 00000000000..9b6e71d07d5
--- /dev/null
+++ b/regress/usr.bin/mandoc/mdoc/Ad/font.in
@@ -0,0 +1,10 @@
+.Dd July 9, 2012
+.Dt AD-FONT 1
+.Os OpenBSD
+.Sh NAME
+.Nm Ad-font
+.Nd changing fonts inside the address macro
+.Sh DESCRIPTION
+normal text
+.Ad emphasis\\fBbold\\fPback
+trailing text
diff --git a/regress/usr.bin/mandoc/mdoc/Ad/font.out_ascii b/regress/usr.bin/mandoc/mdoc/Ad/font.out_ascii
new file mode 100644
index 00000000000..86529c66332
--- /dev/null
+++ b/regress/usr.bin/mandoc/mdoc/Ad/font.out_ascii
@@ -0,0 +1,9 @@
+AD-FONT(1) OpenBSD Reference Manual AD-FONT(1)
+
+NNAAMMEE
+ AAdd--ffoonntt - changing fonts inside the address macro
+
+DDEESSCCRRIIPPTTIIOONN
+ normal text _e_m_p_h_a_s_i_sbboolldd_b_a_c_k trailing text
+
+OpenBSD July 9, 2012 OpenBSD
diff --git a/regress/usr.bin/mandoc/mdoc/Ar/Makefile b/regress/usr.bin/mandoc/mdoc/Ar/Makefile
index e9460ac853d..2d1d895cb1f 100644
--- a/regress/usr.bin/mandoc/mdoc/Ar/Makefile
+++ b/regress/usr.bin/mandoc/mdoc/Ar/Makefile
@@ -1,5 +1,5 @@
-# $OpenBSD: Makefile,v 1.2 2011/11/17 16:28:45 schwarze Exp $
+# $OpenBSD: Makefile,v 1.3 2012/07/09 17:52:09 schwarze Exp $
-REGRESS_TARGETS=punct
+REGRESS_TARGETS = punct font
.include <bsd.regress.mk>
diff --git a/regress/usr.bin/mandoc/mdoc/Ar/font.in b/regress/usr.bin/mandoc/mdoc/Ar/font.in
new file mode 100644
index 00000000000..aa14b7d85a9
--- /dev/null
+++ b/regress/usr.bin/mandoc/mdoc/Ar/font.in
@@ -0,0 +1,10 @@
+.Dd July 9, 2012
+.Dt AR-FONT 1
+.Os OpenBSD
+.Sh NAME
+.Nm Ar-font
+.Nd changing fonts inside the argument macro
+.Sh DESCRIPTION
+normal text
+.Ar emphasis\\fBbold\\fPback
+trailing text
diff --git a/regress/usr.bin/mandoc/mdoc/Ar/font.out_ascii b/regress/usr.bin/mandoc/mdoc/Ar/font.out_ascii
new file mode 100644
index 00000000000..9bef08d69e8
--- /dev/null
+++ b/regress/usr.bin/mandoc/mdoc/Ar/font.out_ascii
@@ -0,0 +1,9 @@
+AR-FONT(1) OpenBSD Reference Manual AR-FONT(1)
+
+NNAAMMEE
+ AArr--ffoonntt - changing fonts inside the argument macro
+
+DDEESSCCRRIIPPTTIIOONN
+ normal text _e_m_p_h_a_s_i_sbboolldd_b_a_c_k trailing text
+
+OpenBSD July 9, 2012 OpenBSD
diff --git a/regress/usr.bin/mandoc/mdoc/Cd/Makefile b/regress/usr.bin/mandoc/mdoc/Cd/Makefile
index e37fab926d4..24e03a34e5c 100644
--- a/regress/usr.bin/mandoc/mdoc/Cd/Makefile
+++ b/regress/usr.bin/mandoc/mdoc/Cd/Makefile
@@ -1,5 +1,5 @@
-# $OpenBSD: Makefile,v 1.2 2011/11/17 16:28:45 schwarze Exp $
+# $OpenBSD: Makefile,v 1.3 2012/07/09 17:52:09 schwarze Exp $
-REGRESS_TARGETS=noarg
+REGRESS_TARGETS = noarg font
.include <bsd.regress.mk>
diff --git a/regress/usr.bin/mandoc/mdoc/Cd/font.in b/regress/usr.bin/mandoc/mdoc/Cd/font.in
new file mode 100644
index 00000000000..716794ebda2
--- /dev/null
+++ b/regress/usr.bin/mandoc/mdoc/Cd/font.in
@@ -0,0 +1,10 @@
+.Dd July 9, 2012
+.Dt CD-FONT 1
+.Os OpenBSD
+.Sh NAME
+.Nm Cd-font
+.Nd changing fonts inside the configuration declaration macro
+.Sh DESCRIPTION
+normal text
+.Cd bold\\fIemphasis\\fPback
+trailing text
diff --git a/regress/usr.bin/mandoc/mdoc/Cd/font.out_ascii b/regress/usr.bin/mandoc/mdoc/Cd/font.out_ascii
new file mode 100644
index 00000000000..7b4a9a61b3b
--- /dev/null
+++ b/regress/usr.bin/mandoc/mdoc/Cd/font.out_ascii
@@ -0,0 +1,9 @@
+CD-FONT(1) OpenBSD Reference Manual CD-FONT(1)
+
+NNAAMMEE
+ CCdd--ffoonntt - changing fonts inside the configuration declaration macro
+
+DDEESSCCRRIIPPTTIIOONN
+ normal text bboolldd_e_m_p_h_a_s_i_sbbaacckk trailing text
+
+OpenBSD July 9, 2012 OpenBSD
diff --git a/regress/usr.bin/mandoc/mdoc/Cm/Makefile b/regress/usr.bin/mandoc/mdoc/Cm/Makefile
index 4ea90ef158a..c4a36673f0d 100644
--- a/regress/usr.bin/mandoc/mdoc/Cm/Makefile
+++ b/regress/usr.bin/mandoc/mdoc/Cm/Makefile
@@ -1,5 +1,5 @@
-# $OpenBSD: Makefile,v 1.1 2012/07/07 14:10:55 schwarze Exp $
+# $OpenBSD: Makefile,v 1.2 2012/07/09 17:52:09 schwarze Exp $
-REGRESS_TARGETS=basic
+REGRESS_TARGETS = basic font
.include <bsd.regress.mk>
diff --git a/regress/usr.bin/mandoc/mdoc/Cm/font.in b/regress/usr.bin/mandoc/mdoc/Cm/font.in
new file mode 100644
index 00000000000..db58f6ddac6
--- /dev/null
+++ b/regress/usr.bin/mandoc/mdoc/Cm/font.in
@@ -0,0 +1,10 @@
+.Dd July 9, 2012
+.Dt CM-FONT 1
+.Os OpenBSD
+.Sh NAME
+.Nm Cm-font
+.Nd changing fonts inside the command modifier macro
+.Sh DESCRIPTION
+normal text
+.Cm bold\\fIemphasis\\fPback
+trailing text
diff --git a/regress/usr.bin/mandoc/mdoc/Cm/font.out_ascii b/regress/usr.bin/mandoc/mdoc/Cm/font.out_ascii
new file mode 100644
index 00000000000..469618100bc
--- /dev/null
+++ b/regress/usr.bin/mandoc/mdoc/Cm/font.out_ascii
@@ -0,0 +1,9 @@
+CM-FONT(1) OpenBSD Reference Manual CM-FONT(1)
+
+NNAAMMEE
+ CCmm--ffoonntt - changing fonts inside the command modifier macro
+
+DDEESSCCRRIIPPTTIIOONN
+ normal text bboolldd_e_m_p_h_a_s_i_sbbaacckk trailing text
+
+OpenBSD July 9, 2012 OpenBSD
diff --git a/regress/usr.bin/mandoc/mdoc/Dv/font.in b/regress/usr.bin/mandoc/mdoc/Dv/font.in
index c952ccda7b9..8e3c5bcb8b3 100644
--- a/regress/usr.bin/mandoc/mdoc/Dv/font.in
+++ b/regress/usr.bin/mandoc/mdoc/Dv/font.in
@@ -8,3 +8,6 @@
The
.Dv BUFSIZ
macro.
+.Pp
+And with
+.Dv some \\fIembedded\\fP string .
diff --git a/regress/usr.bin/mandoc/mdoc/Dv/font.out_ascii b/regress/usr.bin/mandoc/mdoc/Dv/font.out_ascii
index 3b67501cb46..8941d879ae8 100644
--- a/regress/usr.bin/mandoc/mdoc/Dv/font.out_ascii
+++ b/regress/usr.bin/mandoc/mdoc/Dv/font.out_ascii
@@ -6,4 +6,6 @@ NNAAMMEE
DDEESSCCRRIIPPTTIIOONN
The BUFSIZ macro.
+ And with some _e_m_b_e_d_d_e_d string.
+
OpenBSD October 21, 2011 OpenBSD
diff --git a/regress/usr.bin/mandoc/mdoc/Em/Makefile b/regress/usr.bin/mandoc/mdoc/Em/Makefile
new file mode 100644
index 00000000000..915e456c354
--- /dev/null
+++ b/regress/usr.bin/mandoc/mdoc/Em/Makefile
@@ -0,0 +1,5 @@
+# $OpenBSD: Makefile,v 1.1 2012/07/09 17:52:09 schwarze Exp $
+
+REGRESS_TARGETS = font
+
+.include <bsd.regress.mk>
diff --git a/regress/usr.bin/mandoc/mdoc/Em/font.in b/regress/usr.bin/mandoc/mdoc/Em/font.in
new file mode 100644
index 00000000000..3e547d63859
--- /dev/null
+++ b/regress/usr.bin/mandoc/mdoc/Em/font.in
@@ -0,0 +1,10 @@
+.Dd July 9, 2012
+.Dt EM-FONT 1
+.Os OpenBSD
+.Sh NAME
+.Nm Em-font
+.Nd changing fonts inside the emphasis macro
+.Sh DESCRIPTION
+normal text
+.Em emphasis\\fBbold\\fPback
+trailing text
diff --git a/regress/usr.bin/mandoc/mdoc/Em/font.out_ascii b/regress/usr.bin/mandoc/mdoc/Em/font.out_ascii
new file mode 100644
index 00000000000..8d283a5b782
--- /dev/null
+++ b/regress/usr.bin/mandoc/mdoc/Em/font.out_ascii
@@ -0,0 +1,9 @@
+EM-FONT(1) OpenBSD Reference Manual EM-FONT(1)
+
+NNAAMMEE
+ EEmm--ffoonntt - changing fonts inside the emphasis macro
+
+DDEESSCCRRIIPPTTIIOONN
+ normal text _e_m_p_h_a_s_i_sbboolldd_b_a_c_k trailing text
+
+OpenBSD July 9, 2012 OpenBSD
diff --git a/regress/usr.bin/mandoc/mdoc/Er/Makefile b/regress/usr.bin/mandoc/mdoc/Er/Makefile
index e37fab926d4..24e03a34e5c 100644
--- a/regress/usr.bin/mandoc/mdoc/Er/Makefile
+++ b/regress/usr.bin/mandoc/mdoc/Er/Makefile
@@ -1,5 +1,5 @@
-# $OpenBSD: Makefile,v 1.2 2011/11/17 16:28:45 schwarze Exp $
+# $OpenBSD: Makefile,v 1.3 2012/07/09 17:52:09 schwarze Exp $
-REGRESS_TARGETS=noarg
+REGRESS_TARGETS = noarg font
.include <bsd.regress.mk>
diff --git a/regress/usr.bin/mandoc/mdoc/Er/font.in b/regress/usr.bin/mandoc/mdoc/Er/font.in
new file mode 100644
index 00000000000..4e3d337b6a2
--- /dev/null
+++ b/regress/usr.bin/mandoc/mdoc/Er/font.in
@@ -0,0 +1,10 @@
+.Dd July 9, 2012
+.Dt ER-FONT 1
+.Os OpenBSD
+.Sh NAME
+.Nm Er-font
+.Nd changing fonts inside the error code macro
+.Sh DESCRIPTION
+normal text
+.Er EFONT\\fIemphasis\\fPEBACK
+trailing text
diff --git a/regress/usr.bin/mandoc/mdoc/Er/font.out_ascii b/regress/usr.bin/mandoc/mdoc/Er/font.out_ascii
new file mode 100644
index 00000000000..03111133456
--- /dev/null
+++ b/regress/usr.bin/mandoc/mdoc/Er/font.out_ascii
@@ -0,0 +1,9 @@
+ER-FONT(1) OpenBSD Reference Manual ER-FONT(1)
+
+NNAAMMEE
+ EErr--ffoonntt - changing fonts inside the error code macro
+
+DDEESSCCRRIIPPTTIIOONN
+ normal text EFONT_e_m_p_h_a_s_i_sEBACK trailing text
+
+OpenBSD July 9, 2012 OpenBSD
diff --git a/regress/usr.bin/mandoc/mdoc/Ev/font.in b/regress/usr.bin/mandoc/mdoc/Ev/font.in
index 975009f12b4..a9213d81be1 100644
--- a/regress/usr.bin/mandoc/mdoc/Ev/font.in
+++ b/regress/usr.bin/mandoc/mdoc/Ev/font.in
@@ -8,3 +8,6 @@
The
.Ev PATH
variable.
+.Pp
+And with
+.Ev some \\fIembedded\\fP string .
diff --git a/regress/usr.bin/mandoc/mdoc/Ev/font.out_ascii b/regress/usr.bin/mandoc/mdoc/Ev/font.out_ascii
index fa8baa105a7..0105a47d228 100644
--- a/regress/usr.bin/mandoc/mdoc/Ev/font.out_ascii
+++ b/regress/usr.bin/mandoc/mdoc/Ev/font.out_ascii
@@ -6,4 +6,6 @@ NNAAMMEE
DDEESSCCRRIIPPTTIIOONN
The PATH variable.
+ And with some _e_m_b_e_d_d_e_d string.
+
OpenBSD October 21, 2011 OpenBSD
diff --git a/regress/usr.bin/mandoc/mdoc/Fl/Makefile b/regress/usr.bin/mandoc/mdoc/Fl/Makefile
index 4630f4af057..0cb9546ecf8 100644
--- a/regress/usr.bin/mandoc/mdoc/Fl/Makefile
+++ b/regress/usr.bin/mandoc/mdoc/Fl/Makefile
@@ -1,6 +1,6 @@
-# $OpenBSD: Makefile,v 1.6 2012/07/07 14:10:55 schwarze Exp $
+# $OpenBSD: Makefile,v 1.7 2012/07/09 17:52:09 schwarze Exp $
-REGRESS_TARGETS=noarg multiarg parsed punct
+REGRESS_TARGETS = noarg multiarg parsed punct font
# Do not regenerate the punct output file for now,
# because groff-1.15 and groff-1.20.1 handle
diff --git a/regress/usr.bin/mandoc/mdoc/Fl/font.in b/regress/usr.bin/mandoc/mdoc/Fl/font.in
new file mode 100644
index 00000000000..c7514d315d2
--- /dev/null
+++ b/regress/usr.bin/mandoc/mdoc/Fl/font.in
@@ -0,0 +1,10 @@
+.Dd July 9, 2012
+.Dt FL-FONT 1
+.Os OpenBSD
+.Sh NAME
+.Nm Fl-font
+.Nd changing fonts inside the flag macro
+.Sh DESCRIPTION
+normal text
+.Fl bold\\fIemphasis\\fPback
+trailing text
diff --git a/regress/usr.bin/mandoc/mdoc/Fl/font.out_ascii b/regress/usr.bin/mandoc/mdoc/Fl/font.out_ascii
new file mode 100644
index 00000000000..9bb482d05a3
--- /dev/null
+++ b/regress/usr.bin/mandoc/mdoc/Fl/font.out_ascii
@@ -0,0 +1,9 @@
+FL-FONT(1) OpenBSD Reference Manual FL-FONT(1)
+
+NNAAMMEE
+ FFll--ffoonntt - changing fonts inside the flag macro
+
+DDEESSCCRRIIPPTTIIOONN
+ normal text --bboolldd_e_m_p_h_a_s_i_sbbaacckk trailing text
+
+OpenBSD July 9, 2012 OpenBSD
diff --git a/regress/usr.bin/mandoc/mdoc/Fo/Makefile b/regress/usr.bin/mandoc/mdoc/Fo/Makefile
index a08826a0d30..d9da91a2621 100644
--- a/regress/usr.bin/mandoc/mdoc/Fo/Makefile
+++ b/regress/usr.bin/mandoc/mdoc/Fo/Makefile
@@ -1,6 +1,6 @@
-# $OpenBSD: Makefile,v 1.4 2012/07/08 18:38:07 schwarze Exp $
+# $OpenBSD: Makefile,v 1.5 2012/07/09 17:52:09 schwarze Exp $
-REGRESS_TARGETS = basic section noarg
+REGRESS_TARGETS = basic section noarg font
# groff 1.21 does not handle .nr nS
diff --git a/regress/usr.bin/mandoc/mdoc/Fo/font.in b/regress/usr.bin/mandoc/mdoc/Fo/font.in
new file mode 100644
index 00000000000..894a86aa3ed
--- /dev/null
+++ b/regress/usr.bin/mandoc/mdoc/Fo/font.in
@@ -0,0 +1,19 @@
+.Dd July 9, 2012
+.Dt FO-FONT 1
+.Os OpenBSD
+.Sh NAME
+.Nm Fo-font
+.Nd font nesting in function blocks
+.Sh DESCRIPTION
+.Fn prefix\\fIname\\fPsuffix "type arg"
+trailing text
+.Pp
+.Fo prefix\\fIname\\fPsuffix
+.Fa "type arg"
+.Fc
+trailing text
+.Pp
+.Fo function
+.Fa prefix\\fBbold\\fPsuffix
+.Fc
+trailing text
diff --git a/regress/usr.bin/mandoc/mdoc/Fo/font.out_ascii b/regress/usr.bin/mandoc/mdoc/Fo/font.out_ascii
new file mode 100644
index 00000000000..e291b47a0cf
--- /dev/null
+++ b/regress/usr.bin/mandoc/mdoc/Fo/font.out_ascii
@@ -0,0 +1,13 @@
+FO-FONT(1) OpenBSD Reference Manual FO-FONT(1)
+
+NNAAMMEE
+ FFoo--ffoonntt - font nesting in function blocks
+
+DDEESSCCRRIIPPTTIIOONN
+ pprreeffiixx_n_a_m_essuuffffiixx(_t_y_p_e _a_r_g) trailing text
+
+ pprreeffiixx_n_a_m_essuuffffiixx(_t_y_p_e _a_r_g) trailing text
+
+ ffuunnccttiioonn(_p_r_e_f_i_xbboolldd_s_u_f_f_i_x) trailing text
+
+OpenBSD July 9, 2012 OpenBSD
diff --git a/regress/usr.bin/mandoc/mdoc/Ft/Makefile b/regress/usr.bin/mandoc/mdoc/Ft/Makefile
new file mode 100644
index 00000000000..915e456c354
--- /dev/null
+++ b/regress/usr.bin/mandoc/mdoc/Ft/Makefile
@@ -0,0 +1,5 @@
+# $OpenBSD: Makefile,v 1.1 2012/07/09 17:52:09 schwarze Exp $
+
+REGRESS_TARGETS = font
+
+.include <bsd.regress.mk>
diff --git a/regress/usr.bin/mandoc/mdoc/Ft/font.in b/regress/usr.bin/mandoc/mdoc/Ft/font.in
new file mode 100644
index 00000000000..6304aaddd56
--- /dev/null
+++ b/regress/usr.bin/mandoc/mdoc/Ft/font.in
@@ -0,0 +1,10 @@
+.Dd July 9, 2012
+.Dt FT-FONT 1
+.Os OpenBSD
+.Sh NAME
+.Nm Ft-font
+.Nd changing fonts inside the function return type macro
+.Sh DESCRIPTION
+normal text
+.Ft emphasis\\fBbold\\fPback
+trailing text
diff --git a/regress/usr.bin/mandoc/mdoc/Ft/font.out_ascii b/regress/usr.bin/mandoc/mdoc/Ft/font.out_ascii
new file mode 100644
index 00000000000..e420ed392ac
--- /dev/null
+++ b/regress/usr.bin/mandoc/mdoc/Ft/font.out_ascii
@@ -0,0 +1,9 @@
+FT-FONT(1) OpenBSD Reference Manual FT-FONT(1)
+
+NNAAMMEE
+ FFtt--ffoonntt - changing fonts inside the function return type macro
+
+DDEESSCCRRIIPPTTIIOONN
+ normal text _e_m_p_h_a_s_i_sbboolldd_b_a_c_k trailing text
+
+OpenBSD July 9, 2012 OpenBSD
diff --git a/regress/usr.bin/mandoc/mdoc/Ic/Makefile b/regress/usr.bin/mandoc/mdoc/Ic/Makefile
index e37fab926d4..24e03a34e5c 100644
--- a/regress/usr.bin/mandoc/mdoc/Ic/Makefile
+++ b/regress/usr.bin/mandoc/mdoc/Ic/Makefile
@@ -1,5 +1,5 @@
-# $OpenBSD: Makefile,v 1.2 2011/11/17 16:28:45 schwarze Exp $
+# $OpenBSD: Makefile,v 1.3 2012/07/09 17:52:09 schwarze Exp $
-REGRESS_TARGETS=noarg
+REGRESS_TARGETS = noarg font
.include <bsd.regress.mk>
diff --git a/regress/usr.bin/mandoc/mdoc/Ic/font.in b/regress/usr.bin/mandoc/mdoc/Ic/font.in
new file mode 100644
index 00000000000..26e8029813c
--- /dev/null
+++ b/regress/usr.bin/mandoc/mdoc/Ic/font.in
@@ -0,0 +1,10 @@
+.Dd July 9, 2012
+.Dt IC-FONT 1
+.Os OpenBSD
+.Sh NAME
+.Nm Ic-font
+.Nd changing fonts inside the internal command macro
+.Sh DESCRIPTION
+normal text
+.Ic bold\\fIemphasis\\fPback
+trailing text
diff --git a/regress/usr.bin/mandoc/mdoc/Ic/font.out_ascii b/regress/usr.bin/mandoc/mdoc/Ic/font.out_ascii
new file mode 100644
index 00000000000..d4ae50396e5
--- /dev/null
+++ b/regress/usr.bin/mandoc/mdoc/Ic/font.out_ascii
@@ -0,0 +1,9 @@
+IC-FONT(1) OpenBSD Reference Manual IC-FONT(1)
+
+NNAAMMEE
+ IIcc--ffoonntt - changing fonts inside the internal command macro
+
+DDEESSCCRRIIPPTTIIOONN
+ normal text bboolldd_e_m_p_h_a_s_i_sbbaacckk trailing text
+
+OpenBSD July 9, 2012 OpenBSD
diff --git a/regress/usr.bin/mandoc/mdoc/In/Makefile b/regress/usr.bin/mandoc/mdoc/In/Makefile
index 85ed4ec65aa..8d76a4df828 100644
--- a/regress/usr.bin/mandoc/mdoc/In/Makefile
+++ b/regress/usr.bin/mandoc/mdoc/In/Makefile
@@ -1,5 +1,5 @@
-# $OpenBSD: Makefile,v 1.3 2012/07/08 18:38:07 schwarze Exp $
+# $OpenBSD: Makefile,v 1.4 2012/07/09 17:52:09 schwarze Exp $
-REGRESS_TARGETS = break
+REGRESS_TARGETS = break font
.include <bsd.regress.mk>
diff --git a/regress/usr.bin/mandoc/mdoc/In/font.in b/regress/usr.bin/mandoc/mdoc/In/font.in
new file mode 100644
index 00000000000..e24ab18dd5f
--- /dev/null
+++ b/regress/usr.bin/mandoc/mdoc/In/font.in
@@ -0,0 +1,10 @@
+.Dd July 9, 2012
+.Dt IN-FONT 2
+.Os OpenBSD
+.Sh NAME
+.Nm In-font
+.Nd changing the font inside the include macro
+.Sh DESCRIPTION
+normal text
+.In prefix\\fBheader\\fPsuffix
+trailing text
diff --git a/regress/usr.bin/mandoc/mdoc/In/font.out_ascii b/regress/usr.bin/mandoc/mdoc/In/font.out_ascii
new file mode 100644
index 00000000000..a993579635f
--- /dev/null
+++ b/regress/usr.bin/mandoc/mdoc/In/font.out_ascii
@@ -0,0 +1,9 @@
+IN-FONT(2) OpenBSD Programmer's Manual IN-FONT(2)
+
+NNAAMMEE
+ IInn--ffoonntt - changing the font inside the include macro
+
+DDEESSCCRRIIPPTTIIOONN
+ normal text <_p_r_e_f_i_xhheeaaddeerr_s_u_f_f_i_x> trailing text
+
+OpenBSD July 9, 2012 OpenBSD
diff --git a/regress/usr.bin/mandoc/mdoc/Li/Makefile b/regress/usr.bin/mandoc/mdoc/Li/Makefile
index e9460ac853d..2d1d895cb1f 100644
--- a/regress/usr.bin/mandoc/mdoc/Li/Makefile
+++ b/regress/usr.bin/mandoc/mdoc/Li/Makefile
@@ -1,5 +1,5 @@
-# $OpenBSD: Makefile,v 1.2 2011/11/17 16:28:45 schwarze Exp $
+# $OpenBSD: Makefile,v 1.3 2012/07/09 17:52:09 schwarze Exp $
-REGRESS_TARGETS=punct
+REGRESS_TARGETS = punct font
.include <bsd.regress.mk>
diff --git a/regress/usr.bin/mandoc/mdoc/Li/font.in b/regress/usr.bin/mandoc/mdoc/Li/font.in
new file mode 100644
index 00000000000..d15d61bbbd4
--- /dev/null
+++ b/regress/usr.bin/mandoc/mdoc/Li/font.in
@@ -0,0 +1,10 @@
+.Dd July 9, 2012
+.Dt LI-FONT 1
+.Os OpenBSD
+.Sh NAME
+.Nm Li-font
+.Nd changing fonts inside the literal in-line macro
+.Sh DESCRIPTION
+normal text
+.Li literal\\fIemphasis\\fPback
+trailing text
diff --git a/regress/usr.bin/mandoc/mdoc/Li/font.out_ascii b/regress/usr.bin/mandoc/mdoc/Li/font.out_ascii
new file mode 100644
index 00000000000..d2779983aac
--- /dev/null
+++ b/regress/usr.bin/mandoc/mdoc/Li/font.out_ascii
@@ -0,0 +1,9 @@
+LI-FONT(1) OpenBSD Reference Manual LI-FONT(1)
+
+NNAAMMEE
+ LLii--ffoonntt - changing fonts inside the literal in-line macro
+
+DDEESSCCRRIIPPTTIIOONN
+ normal text literal_e_m_p_h_a_s_i_sback trailing text
+
+OpenBSD July 9, 2012 OpenBSD
diff --git a/regress/usr.bin/mandoc/mdoc/Lk/Makefile b/regress/usr.bin/mandoc/mdoc/Lk/Makefile
index 11e920e8e69..17864b0cf74 100644
--- a/regress/usr.bin/mandoc/mdoc/Lk/Makefile
+++ b/regress/usr.bin/mandoc/mdoc/Lk/Makefile
@@ -1,5 +1,5 @@
-# $OpenBSD: Makefile,v 1.1 2012/07/08 22:48:38 schwarze Exp $
+# $OpenBSD: Makefile,v 1.2 2012/07/09 17:52:09 schwarze Exp $
-REGRESS_TARGETS = link noarg
+REGRESS_TARGETS = link noarg font
.include <bsd.regress.mk>
diff --git a/regress/usr.bin/mandoc/mdoc/Lk/font.in b/regress/usr.bin/mandoc/mdoc/Lk/font.in
new file mode 100644
index 00000000000..23af0554e8d
--- /dev/null
+++ b/regress/usr.bin/mandoc/mdoc/Lk/font.in
@@ -0,0 +1,10 @@
+.Dd July 9, 2012
+.Dt LK-FONT 1
+.Os OpenBSD
+.Sh NAME
+.Nm Lk-font
+.Nd changing the font inside the hyperlink macro
+.Sh DESCRIPTION
+normal text
+.Lk http://www.\\fIopenbsd\\fP.org/ Open\\fBBSD\\fPweb
+trailing text
diff --git a/regress/usr.bin/mandoc/mdoc/Lk/font.out_ascii b/regress/usr.bin/mandoc/mdoc/Lk/font.out_ascii
new file mode 100644
index 00000000000..41c51e38b9c
--- /dev/null
+++ b/regress/usr.bin/mandoc/mdoc/Lk/font.out_ascii
@@ -0,0 +1,9 @@
+LK-FONT(1) OpenBSD Reference Manual LK-FONT(1)
+
+NNAAMMEE
+ LLkk--ffoonntt - changing the font inside the hyperlink macro
+
+DDEESSCCRRIIPPTTIIOONN
+ normal text _O_p_e_nBBSSDD_w_e_b_: hhttttpp::////wwwwww.._o_p_e_n_b_s_d..oorrgg// trailing text
+
+OpenBSD July 9, 2012 OpenBSD
diff --git a/regress/usr.bin/mandoc/mdoc/Makefile b/regress/usr.bin/mandoc/mdoc/Makefile
index b1baf23d852..9e468b38957 100644
--- a/regress/usr.bin/mandoc/mdoc/Makefile
+++ b/regress/usr.bin/mandoc/mdoc/Makefile
@@ -1,12 +1,9 @@
-# $OpenBSD: Makefile,v 1.21 2012/07/08 22:48:38 schwarze Exp $
+# $OpenBSD: Makefile,v 1.22 2012/07/09 17:52:09 schwarze Exp $
SUBDIR += Ad An Ap Aq Ar At Bd Bk Bl Brq Bx Cd Cm D1 Dl Dq Dv Er Ev Fl Fo
-SUBDIR += Ic In Lb Lk Li Ms Mt Nd Nm No Ns Oo Op Ox Pf Pp Qq Rs
+SUBDIR += Ic In Lb Lk Li Ms Mt Nd Nm No Ns Oo Op Ox Pa Pf Pp Qq Rs
SUBDIR += Sm Sq St Sx Sy Tn Ux Va Vt Xr blank
-# disabled, mandoc must be fixed:
-# Pa
-
ascii groff groff-clean obj-clean tman: _SUBDIRUSE
.include <bsd.subdir.mk>
diff --git a/regress/usr.bin/mandoc/mdoc/Ms/Makefile b/regress/usr.bin/mandoc/mdoc/Ms/Makefile
index e37fab926d4..24e03a34e5c 100644
--- a/regress/usr.bin/mandoc/mdoc/Ms/Makefile
+++ b/regress/usr.bin/mandoc/mdoc/Ms/Makefile
@@ -1,5 +1,5 @@
-# $OpenBSD: Makefile,v 1.2 2011/11/17 16:28:45 schwarze Exp $
+# $OpenBSD: Makefile,v 1.3 2012/07/09 17:52:09 schwarze Exp $
-REGRESS_TARGETS=noarg
+REGRESS_TARGETS = noarg font
.include <bsd.regress.mk>
diff --git a/regress/usr.bin/mandoc/mdoc/Ms/font.in b/regress/usr.bin/mandoc/mdoc/Ms/font.in
new file mode 100644
index 00000000000..9eb9d8eff11
--- /dev/null
+++ b/regress/usr.bin/mandoc/mdoc/Ms/font.in
@@ -0,0 +1,10 @@
+.Dd July 9, 2012
+.Dt MS-FONT 1
+.Os OpenBSD
+.Sh NAME
+.Nm Ms-font
+.Nd changing fonts inside the mathematical symbol macro
+.Sh DESCRIPTION
+normal text
+.Ms bold\\fIemphasis\\fPback
+trailing text
diff --git a/regress/usr.bin/mandoc/mdoc/Ms/font.out_ascii b/regress/usr.bin/mandoc/mdoc/Ms/font.out_ascii
new file mode 100644
index 00000000000..4e1fbf95f5b
--- /dev/null
+++ b/regress/usr.bin/mandoc/mdoc/Ms/font.out_ascii
@@ -0,0 +1,9 @@
+MS-FONT(1) OpenBSD Reference Manual MS-FONT(1)
+
+NNAAMMEE
+ MMss--ffoonntt - changing fonts inside the mathematical symbol macro
+
+DDEESSCCRRIIPPTTIIOONN
+ normal text bboolldd_e_m_p_h_a_s_i_sbbaacckk trailing text
+
+OpenBSD July 9, 2012 OpenBSD
diff --git a/regress/usr.bin/mandoc/mdoc/Mt/Makefile b/regress/usr.bin/mandoc/mdoc/Mt/Makefile
index b068f11de84..34cbbe19129 100644
--- a/regress/usr.bin/mandoc/mdoc/Mt/Makefile
+++ b/regress/usr.bin/mandoc/mdoc/Mt/Makefile
@@ -1,5 +1,5 @@
-# $OpenBSD: Makefile,v 1.4 2012/07/09 09:30:28 schwarze Exp $
+# $OpenBSD: Makefile,v 1.5 2012/07/09 17:52:09 schwarze Exp $
-REGRESS_TARGETS=simple
+REGRESS_TARGETS = simple font
.include <bsd.regress.mk>
diff --git a/regress/usr.bin/mandoc/mdoc/Mt/font.in b/regress/usr.bin/mandoc/mdoc/Mt/font.in
new file mode 100644
index 00000000000..66c5ba1f515
--- /dev/null
+++ b/regress/usr.bin/mandoc/mdoc/Mt/font.in
@@ -0,0 +1,10 @@
+.Dd July 9, 2012
+.Dt MT-FONT 1
+.Os OpenBSD
+.Sh NAME
+.Nm Mt-font
+.Nd changing fonts inside the mailto macro
+.Sh DESCRIPTION
+normal text
+.Mt emphasis\\fBbold\\fPback
+trailing text
diff --git a/regress/usr.bin/mandoc/mdoc/Mt/font.out_ascii b/regress/usr.bin/mandoc/mdoc/Mt/font.out_ascii
new file mode 100644
index 00000000000..1b033d56a5c
--- /dev/null
+++ b/regress/usr.bin/mandoc/mdoc/Mt/font.out_ascii
@@ -0,0 +1,9 @@
+MT-FONT(1) OpenBSD Reference Manual MT-FONT(1)
+
+NNAAMMEE
+ MMtt--ffoonntt - changing fonts inside the mailto macro
+
+DDEESSCCRRIIPPTTIIOONN
+ normal text _e_m_p_h_a_s_i_sbboolldd_b_a_c_k trailing text
+
+OpenBSD July 9, 2012 OpenBSD
diff --git a/regress/usr.bin/mandoc/mdoc/Nm/Makefile b/regress/usr.bin/mandoc/mdoc/Nm/Makefile
index 4891d3cef47..634e488c130 100644
--- a/regress/usr.bin/mandoc/mdoc/Nm/Makefile
+++ b/regress/usr.bin/mandoc/mdoc/Nm/Makefile
@@ -1,5 +1,5 @@
-# $OpenBSD: Makefile,v 1.3 2012/07/07 14:10:55 schwarze Exp $
+# $OpenBSD: Makefile,v 1.4 2012/07/09 17:52:09 schwarze Exp $
-REGRESS_TARGETS=empty
+REGRESS_TARGETS = empty font
.include <bsd.regress.mk>
diff --git a/regress/usr.bin/mandoc/mdoc/Nm/font.in b/regress/usr.bin/mandoc/mdoc/Nm/font.in
new file mode 100644
index 00000000000..c68a501bd2e
--- /dev/null
+++ b/regress/usr.bin/mandoc/mdoc/Nm/font.in
@@ -0,0 +1,10 @@
+.Dd July 9, 2012
+.Dt NM-FONT 1
+.Os OpenBSD
+.Sh NAME
+.Nm Nm-font
+.Nd changing fonts inside the name macro
+.Sh DESCRIPTION
+normal text
+.Nm bold\\fIemphasis\\fPback
+trailing text
diff --git a/regress/usr.bin/mandoc/mdoc/Nm/font.out_ascii b/regress/usr.bin/mandoc/mdoc/Nm/font.out_ascii
new file mode 100644
index 00000000000..adc9e56ff81
--- /dev/null
+++ b/regress/usr.bin/mandoc/mdoc/Nm/font.out_ascii
@@ -0,0 +1,9 @@
+NM-FONT(1) OpenBSD Reference Manual NM-FONT(1)
+
+NNAAMMEE
+ NNmm--ffoonntt - changing fonts inside the name macro
+
+DDEESSCCRRIIPPTTIIOONN
+ normal text bboolldd_e_m_p_h_a_s_i_sbbaacckk trailing text
+
+OpenBSD July 9, 2012 OpenBSD
diff --git a/regress/usr.bin/mandoc/mdoc/Pa/Makefile b/regress/usr.bin/mandoc/mdoc/Pa/Makefile
index 9c0c37eb706..a8859d57f22 100644
--- a/regress/usr.bin/mandoc/mdoc/Pa/Makefile
+++ b/regress/usr.bin/mandoc/mdoc/Pa/Makefile
@@ -1,5 +1,7 @@
-# $OpenBSD: Makefile,v 1.2 2011/11/17 16:28:46 schwarze Exp $
+# $OpenBSD: Makefile,v 1.3 2012/07/09 17:52:09 schwarze Exp $
-REGRESS_TARGETS=FILES
+REGRESS_TARGETS = font
+
+# XXX The FILES target doesn't currently work.
.include <bsd.regress.mk>
diff --git a/regress/usr.bin/mandoc/mdoc/Pa/font.in b/regress/usr.bin/mandoc/mdoc/Pa/font.in
new file mode 100644
index 00000000000..ce23f7726d9
--- /dev/null
+++ b/regress/usr.bin/mandoc/mdoc/Pa/font.in
@@ -0,0 +1,10 @@
+.Dd July 9, 2012
+.Dt PA-FONT 1
+.Os OpenBSD
+.Sh NAME
+.Nm Pa-font
+.Nd changing fonts inside the path macro
+.Sh DESCRIPTION
+normal text
+.Pa emphasis\\fBbold\\fPback
+trailing text
diff --git a/regress/usr.bin/mandoc/mdoc/Pa/font.out_ascii b/regress/usr.bin/mandoc/mdoc/Pa/font.out_ascii
new file mode 100644
index 00000000000..c2b0dcaec6f
--- /dev/null
+++ b/regress/usr.bin/mandoc/mdoc/Pa/font.out_ascii
@@ -0,0 +1,9 @@
+PA-FONT(1) OpenBSD Reference Manual PA-FONT(1)
+
+NNAAMMEE
+ PPaa--ffoonntt - changing fonts inside the path macro
+
+DDEESSCCRRIIPPTTIIOONN
+ normal text _e_m_p_h_a_s_i_sbboolldd_b_a_c_k trailing text
+
+OpenBSD July 9, 2012 OpenBSD
diff --git a/regress/usr.bin/mandoc/mdoc/Sx/Makefile b/regress/usr.bin/mandoc/mdoc/Sx/Makefile
index baeb2ca2c05..24e03a34e5c 100644
--- a/regress/usr.bin/mandoc/mdoc/Sx/Makefile
+++ b/regress/usr.bin/mandoc/mdoc/Sx/Makefile
@@ -1,5 +1,5 @@
-# $OpenBSD: Makefile,v 1.2 2011/11/17 16:28:46 schwarze Exp $
+# $OpenBSD: Makefile,v 1.3 2012/07/09 17:52:09 schwarze Exp $
-REGRESS_TARGETS=noarg
+REGRESS_TARGETS = noarg font
.include <bsd.regress.mk>
diff --git a/regress/usr.bin/mandoc/mdoc/Sx/font.in b/regress/usr.bin/mandoc/mdoc/Sx/font.in
new file mode 100644
index 00000000000..92d95014b4c
--- /dev/null
+++ b/regress/usr.bin/mandoc/mdoc/Sx/font.in
@@ -0,0 +1,10 @@
+.Dd July 9, 2012
+.Dt SX-FONT 1
+.Os OpenBSD
+.Sh NAME
+.Nm Sx-font
+.Nd changing fonts inside the cross reference macro
+.Sh DESCRIPTION
+normal text
+.Sx emphasis\\fBbold\\fPback
+trailing text
diff --git a/regress/usr.bin/mandoc/mdoc/Sx/font.out_ascii b/regress/usr.bin/mandoc/mdoc/Sx/font.out_ascii
new file mode 100644
index 00000000000..c95637f4f80
--- /dev/null
+++ b/regress/usr.bin/mandoc/mdoc/Sx/font.out_ascii
@@ -0,0 +1,9 @@
+SX-FONT(1) OpenBSD Reference Manual SX-FONT(1)
+
+NNAAMMEE
+ SSxx--ffoonntt - changing fonts inside the cross reference macro
+
+DDEESSCCRRIIPPTTIIOONN
+ normal text _e_m_p_h_a_s_i_sbboolldd_b_a_c_k trailing text
+
+OpenBSD July 9, 2012 OpenBSD
diff --git a/regress/usr.bin/mandoc/mdoc/Sy/Makefile b/regress/usr.bin/mandoc/mdoc/Sy/Makefile
index baeb2ca2c05..24e03a34e5c 100644
--- a/regress/usr.bin/mandoc/mdoc/Sy/Makefile
+++ b/regress/usr.bin/mandoc/mdoc/Sy/Makefile
@@ -1,5 +1,5 @@
-# $OpenBSD: Makefile,v 1.2 2011/11/17 16:28:46 schwarze Exp $
+# $OpenBSD: Makefile,v 1.3 2012/07/09 17:52:09 schwarze Exp $
-REGRESS_TARGETS=noarg
+REGRESS_TARGETS = noarg font
.include <bsd.regress.mk>
diff --git a/regress/usr.bin/mandoc/mdoc/Sy/font.in b/regress/usr.bin/mandoc/mdoc/Sy/font.in
new file mode 100644
index 00000000000..3a7bbb062fc
--- /dev/null
+++ b/regress/usr.bin/mandoc/mdoc/Sy/font.in
@@ -0,0 +1,10 @@
+.Dd July 9, 2012
+.Dt SY-FONT 1
+.Os OpenBSD
+.Sh NAME
+.Nm Sy-font
+.Nd changing fonts inside the symbolic font macro
+.Sh DESCRIPTION
+normal text
+.Sy bold\\fIemphasis\\fPback
+trailing text
diff --git a/regress/usr.bin/mandoc/mdoc/Sy/font.out_ascii b/regress/usr.bin/mandoc/mdoc/Sy/font.out_ascii
new file mode 100644
index 00000000000..12d4bd8f8a0
--- /dev/null
+++ b/regress/usr.bin/mandoc/mdoc/Sy/font.out_ascii
@@ -0,0 +1,9 @@
+SY-FONT(1) OpenBSD Reference Manual SY-FONT(1)
+
+NNAAMMEE
+ SSyy--ffoonntt - changing fonts inside the symbolic font macro
+
+DDEESSCCRRIIPPTTIIOONN
+ normal text bboolldd_e_m_p_h_a_s_i_sbbaacckk trailing text
+
+OpenBSD July 9, 2012 OpenBSD
diff --git a/regress/usr.bin/mandoc/mdoc/Tn/Makefile b/regress/usr.bin/mandoc/mdoc/Tn/Makefile
index baeb2ca2c05..24e03a34e5c 100644
--- a/regress/usr.bin/mandoc/mdoc/Tn/Makefile
+++ b/regress/usr.bin/mandoc/mdoc/Tn/Makefile
@@ -1,5 +1,5 @@
-# $OpenBSD: Makefile,v 1.2 2011/11/17 16:28:46 schwarze Exp $
+# $OpenBSD: Makefile,v 1.3 2012/07/09 17:52:09 schwarze Exp $
-REGRESS_TARGETS=noarg
+REGRESS_TARGETS = noarg font
.include <bsd.regress.mk>
diff --git a/regress/usr.bin/mandoc/mdoc/Tn/font.in b/regress/usr.bin/mandoc/mdoc/Tn/font.in
new file mode 100644
index 00000000000..c854c6de428
--- /dev/null
+++ b/regress/usr.bin/mandoc/mdoc/Tn/font.in
@@ -0,0 +1,10 @@
+.Dd July 9, 2012
+.Dt TN-FONT 1
+.Os OpenBSD
+.Sh NAME
+.Nm Tn-font
+.Nd changing fonts inside the trade name macro
+.Sh DESCRIPTION
+normal text
+.Tn literal\\fIemphasis\\fPback
+trailing text
diff --git a/regress/usr.bin/mandoc/mdoc/Tn/font.out_ascii b/regress/usr.bin/mandoc/mdoc/Tn/font.out_ascii
new file mode 100644
index 00000000000..5bfcb9d4227
--- /dev/null
+++ b/regress/usr.bin/mandoc/mdoc/Tn/font.out_ascii
@@ -0,0 +1,9 @@
+TN-FONT(1) OpenBSD Reference Manual TN-FONT(1)
+
+NNAAMMEE
+ TTnn--ffoonntt - changing fonts inside the trade name macro
+
+DDEESSCCRRIIPPTTIIOONN
+ normal text literal_e_m_p_h_a_s_i_sback trailing text
+
+OpenBSD July 9, 2012 OpenBSD
diff --git a/regress/usr.bin/mandoc/mdoc/Va/Makefile b/regress/usr.bin/mandoc/mdoc/Va/Makefile
index a2d48cd8c19..c4a36673f0d 100644
--- a/regress/usr.bin/mandoc/mdoc/Va/Makefile
+++ b/regress/usr.bin/mandoc/mdoc/Va/Makefile
@@ -1,5 +1,5 @@
-# $OpenBSD: Makefile,v 1.1 2012/07/08 18:38:07 schwarze Exp $
+# $OpenBSD: Makefile,v 1.2 2012/07/09 17:52:09 schwarze Exp $
-REGRESS_TARGETS = basic
+REGRESS_TARGETS = basic font
.include <bsd.regress.mk>
diff --git a/regress/usr.bin/mandoc/mdoc/Va/font.in b/regress/usr.bin/mandoc/mdoc/Va/font.in
new file mode 100644
index 00000000000..654ee2816b5
--- /dev/null
+++ b/regress/usr.bin/mandoc/mdoc/Va/font.in
@@ -0,0 +1,10 @@
+.Dd July 9, 2012
+.Dt VA-FONT 1
+.Os OpenBSD
+.Sh NAME
+.Nm Va-font
+.Nd changing fonts inside the variable name macro
+.Sh DESCRIPTION
+normal text
+.Va emphasis\\fBbold\\fPback
+trailing text
diff --git a/regress/usr.bin/mandoc/mdoc/Va/font.out_ascii b/regress/usr.bin/mandoc/mdoc/Va/font.out_ascii
new file mode 100644
index 00000000000..d88f484e48a
--- /dev/null
+++ b/regress/usr.bin/mandoc/mdoc/Va/font.out_ascii
@@ -0,0 +1,9 @@
+VA-FONT(1) OpenBSD Reference Manual VA-FONT(1)
+
+NNAAMMEE
+ VVaa--ffoonntt - changing fonts inside the variable name macro
+
+DDEESSCCRRIIPPTTIIOONN
+ normal text _e_m_p_h_a_s_i_sbboolldd_b_a_c_k trailing text
+
+OpenBSD July 9, 2012 OpenBSD
diff --git a/regress/usr.bin/mandoc/mdoc/Vt/Makefile b/regress/usr.bin/mandoc/mdoc/Vt/Makefile
index 1314efdea70..5e89cf0641c 100644
--- a/regress/usr.bin/mandoc/mdoc/Vt/Makefile
+++ b/regress/usr.bin/mandoc/mdoc/Vt/Makefile
@@ -1,5 +1,5 @@
-# $OpenBSD: Makefile,v 1.3 2012/07/08 10:58:44 schwarze Exp $
+# $OpenBSD: Makefile,v 1.4 2012/07/09 17:52:09 schwarze Exp $
-REGRESS_TARGETS = noarg spacing
+REGRESS_TARGETS = noarg spacing font
.include <bsd.regress.mk>
diff --git a/regress/usr.bin/mandoc/mdoc/Vt/font.in b/regress/usr.bin/mandoc/mdoc/Vt/font.in
new file mode 100644
index 00000000000..c90692eff66
--- /dev/null
+++ b/regress/usr.bin/mandoc/mdoc/Vt/font.in
@@ -0,0 +1,10 @@
+.Dd July 9, 2012
+.Dt VT-FONT 1
+.Os OpenBSD
+.Sh NAME
+.Nm Vt-font
+.Nd changing fonts inside the variable type macro
+.Sh DESCRIPTION
+normal text
+.Vt emphasis\\fBbold\\fPback
+trailing text
diff --git a/regress/usr.bin/mandoc/mdoc/Vt/font.out_ascii b/regress/usr.bin/mandoc/mdoc/Vt/font.out_ascii
new file mode 100644
index 00000000000..19762b431e0
--- /dev/null
+++ b/regress/usr.bin/mandoc/mdoc/Vt/font.out_ascii
@@ -0,0 +1,9 @@
+VT-FONT(1) OpenBSD Reference Manual VT-FONT(1)
+
+NNAAMMEE
+ VVtt--ffoonntt - changing fonts inside the variable type macro
+
+DDEESSCCRRIIPPTTIIOONN
+ normal text _e_m_p_h_a_s_i_sbboolldd_b_a_c_k trailing text
+
+OpenBSD July 9, 2012 OpenBSD
diff --git a/usr.bin/mandoc/mdoc_man.c b/usr.bin/mandoc/mdoc_man.c
index bc73458e892..32254712e64 100644
--- a/usr.bin/mandoc/mdoc_man.c
+++ b/usr.bin/mandoc/mdoc_man.c
@@ -1,4 +1,4 @@
-/* $Id: mdoc_man.c,v 1.23 2012/07/09 09:30:28 schwarze Exp $ */
+/* $Id: mdoc_man.c,v 1.24 2012/07/09 17:52:09 schwarze Exp $ */
/*
* Copyright (c) 2011, 2012 Ingo Schwarze <schwarze@openbsd.org>
*
@@ -37,13 +37,17 @@ struct manact {
static int cond_body(DECL_ARGS);
static int cond_head(DECL_ARGS);
+static void font_push(char);
+static void font_pop(void);
static void post_bd(DECL_ARGS);
static void post_bk(DECL_ARGS);
static void post_dl(DECL_ARGS);
static void post_enc(DECL_ARGS);
static void post_fa(DECL_ARGS);
+static void post_fl(DECL_ARGS);
static void post_fn(DECL_ARGS);
static void post_fo(DECL_ARGS);
+static void post_font(DECL_ARGS);
static void post_in(DECL_ARGS);
static void post_lb(DECL_ARGS);
static void post_nm(DECL_ARGS);
@@ -60,13 +64,16 @@ static int pre_br(DECL_ARGS);
static int pre_bx(DECL_ARGS);
static int pre_dl(DECL_ARGS);
static int pre_enc(DECL_ARGS);
+static int pre_em(DECL_ARGS);
static int pre_fa(DECL_ARGS);
+static int pre_fl(DECL_ARGS);
static int pre_fn(DECL_ARGS);
static int pre_fo(DECL_ARGS);
static int pre_ft(DECL_ARGS);
static int pre_in(DECL_ARGS);
static int pre_it(DECL_ARGS);
static int pre_lk(DECL_ARGS);
+static int pre_li(DECL_ARGS);
static int pre_nm(DECL_ARGS);
static int pre_no(DECL_ARGS);
static int pre_ns(DECL_ARGS);
@@ -74,6 +81,7 @@ static int pre_pp(DECL_ARGS);
static int pre_sm(DECL_ARGS);
static int pre_sp(DECL_ARGS);
static int pre_sect(DECL_ARGS);
+static int pre_sy(DECL_ARGS);
static void pre_syn(const struct mdoc_node *);
static int pre_vt(DECL_ARGS);
static int pre_ux(DECL_ARGS);
@@ -97,37 +105,37 @@ static const struct manact manacts[MDOC_MAX + 1] = {
{ NULL, NULL, NULL, NULL, NULL }, /* Bl */
{ NULL, NULL, NULL, NULL, NULL }, /* El */
{ NULL, pre_it, NULL, NULL, NULL }, /* _It */
- { NULL, pre_enc, post_enc, "\\fI", "\\fP" }, /* Ad */
+ { NULL, pre_em, post_font, NULL, NULL }, /* Ad */
{ NULL, pre_an, NULL, NULL, NULL }, /* An */
- { NULL, pre_enc, post_enc, "\\fI", "\\fP" }, /* Ar */
- { NULL, pre_enc, post_enc, "\\fB", "\\fP" }, /* Cd */
- { NULL, pre_enc, post_enc, "\\fB", "\\fP" }, /* Cm */
- { NULL, pre_enc, post_enc, "\\fR", "\\fP" }, /* Dv */
- { NULL, pre_enc, post_enc, "\\fR", "\\fP" }, /* Er */
- { NULL, pre_enc, post_enc, "\\fR", "\\fP" }, /* Ev */
+ { NULL, pre_em, post_font, NULL, NULL }, /* Ar */
+ { NULL, pre_sy, post_font, NULL, NULL }, /* Cd */
+ { NULL, pre_sy, post_font, NULL, NULL }, /* Cm */
+ { NULL, pre_li, post_font, NULL, NULL }, /* Dv */
+ { NULL, pre_li, post_font, NULL, NULL }, /* Er */
+ { NULL, pre_li, post_font, NULL, NULL }, /* Ev */
{ NULL, pre_enc, post_enc, "The \\fB",
"\\fP\nutility exits 0 on success, and >0 if an error occurs."
}, /* Ex */
{ NULL, pre_fa, post_fa, NULL, NULL }, /* Fa */
{ NULL, NULL, NULL, NULL, NULL }, /* _Fd */
- { NULL, pre_enc, post_enc, "\\fB-", "\\fP" }, /* Fl */
+ { NULL, pre_fl, post_fl, NULL, NULL }, /* Fl */
{ NULL, pre_fn, post_fn, NULL, NULL }, /* Fn */
- { NULL, pre_ft, post_enc, NULL, "\\fP" }, /* Ft */
- { NULL, pre_enc, post_enc, "\\fB", "\\fP" }, /* Ic */
+ { NULL, pre_ft, post_font, NULL, NULL }, /* Ft */
+ { NULL, pre_sy, post_font, NULL, NULL }, /* Ic */
{ NULL, pre_in, post_in, NULL, NULL }, /* In */
- { NULL, pre_enc, post_enc, "\\fR", "\\fP" }, /* Li */
+ { NULL, pre_li, post_font, NULL, NULL }, /* Li */
{ cond_head, pre_enc, NULL, "\\- ", NULL }, /* Nd */
{ NULL, pre_nm, post_nm, NULL, NULL }, /* Nm */
{ cond_body, pre_enc, post_enc, "[", "]" }, /* Op */
{ NULL, NULL, NULL, NULL, NULL }, /* Ot */
- { NULL, pre_enc, post_enc, "\\fI", "\\fP" }, /* Pa */
+ { NULL, pre_em, post_font, NULL, NULL }, /* Pa */
{ NULL, pre_enc, post_enc, "The \\fB",
"\\fP\nfunction returns the value 0 if successful;\n"
"otherwise the value -1 is returned and the global\n"
"variable \\fIerrno\\fP is set to indicate the error."
}, /* Rv */
{ NULL, NULL, NULL, NULL, NULL }, /* St */
- { NULL, pre_enc, post_enc, "\\fI", "\\fP" }, /* Va */
+ { NULL, pre_em, post_font, NULL, NULL }, /* Va */
{ NULL, pre_vt, post_vt, NULL, NULL }, /* Vt */
{ NULL, pre_xr, NULL, NULL, NULL }, /* Xr */
{ NULL, NULL, post_percent, NULL, NULL }, /* _%A */
@@ -157,10 +165,10 @@ static const struct manact manacts[MDOC_MAX + 1] = {
{ cond_body, pre_enc, post_enc, "``", "''" }, /* Dq */
{ NULL, NULL, NULL, NULL, NULL }, /* _Ec */
{ NULL, NULL, NULL, NULL, NULL }, /* _Ef */
- { NULL, pre_enc, post_enc, "\\fI", "\\fP" }, /* Em */
+ { NULL, pre_em, post_font, NULL, NULL }, /* Em */
{ NULL, NULL, NULL, NULL, NULL }, /* _Eo */
{ NULL, pre_ux, NULL, "FreeBSD", NULL }, /* Fx */
- { NULL, pre_enc, post_enc, "\\fB", "\\fP" }, /* Ms */
+ { NULL, pre_sy, post_font, NULL, NULL }, /* Ms */
{ NULL, pre_no, NULL, NULL, NULL }, /* No */
{ NULL, pre_ns, NULL, NULL, NULL }, /* Ns */
{ NULL, pre_ux, NULL, "NetBSD", NULL }, /* Nx */
@@ -179,9 +187,9 @@ static const struct manact manacts[MDOC_MAX + 1] = {
{ cond_body, pre_enc, post_enc, "`", "'" }, /* So */
{ cond_body, pre_enc, post_enc, "`", "'" }, /* Sq */
{ NULL, pre_sm, NULL, NULL, NULL }, /* Sm */
- { NULL, pre_enc, post_enc, "\\fI", "\\fP" }, /* Sx */
- { NULL, pre_enc, post_enc, "\\fB", "\\fP" }, /* Sy */
- { NULL, pre_enc, post_enc, "\\fR", "\\fP" }, /* Tn */
+ { NULL, pre_em, post_font, NULL, NULL }, /* Sx */
+ { NULL, pre_sy, post_font, NULL, NULL }, /* Sy */
+ { NULL, pre_li, post_font, NULL, NULL }, /* Tn */
{ NULL, pre_ux, NULL, "UNIX", NULL }, /* Ux */
{ NULL, NULL, NULL, NULL, NULL }, /* _Xc */
{ NULL, NULL, NULL, NULL, NULL }, /* _Xo */
@@ -198,7 +206,7 @@ static const struct manact manacts[MDOC_MAX + 1] = {
{ NULL, NULL, post_lb, NULL, NULL }, /* Lb */
{ NULL, pre_pp, NULL, NULL, NULL }, /* Lp */
{ NULL, pre_lk, NULL, NULL, NULL }, /* Lk */
- { NULL, pre_enc, post_enc, "\\fI", "\\fP" }, /* Mt */
+ { NULL, pre_em, post_font, NULL, NULL }, /* Mt */
{ cond_body, pre_enc, post_enc, "{", "}" }, /* Brq */
{ cond_body, pre_enc, post_enc, "{", "}" }, /* Bro */
{ NULL, NULL, NULL, NULL, NULL }, /* Brc */
@@ -225,6 +233,38 @@ static int outflags;
#define MMAN_An_split (1 << 7)
#define MMAN_An_nosplit (1 << 8)
+static struct {
+ char *head;
+ char *tail;
+ size_t size;
+} fontqueue;
+
+static void
+font_push(char newfont)
+{
+
+ if (fontqueue.head + fontqueue.size <= ++fontqueue.tail) {
+ fontqueue.size += 8;
+ fontqueue.head = mandoc_realloc(fontqueue.head,
+ fontqueue.size);
+ }
+ *fontqueue.tail = newfont;
+ print_word("\\f");
+ putchar(newfont);
+ outflags &= ~MMAN_spc;
+}
+
+static void
+font_pop(void)
+{
+
+ if (fontqueue.tail > fontqueue.head)
+ fontqueue.tail--;
+ outflags &= ~MMAN_spc;
+ print_word("\\f");
+ putchar(*fontqueue.tail);
+}
+
static void
print_word(const char *s)
{
@@ -331,6 +371,11 @@ man_mdoc(void *arg, const struct mdoc *mdoc)
m->title, m->msec, m->date, m->os, m->vol);
outflags = MMAN_nl | MMAN_Sm;
+ if (0 == fontqueue.size) {
+ fontqueue.size = 8;
+ fontqueue.head = fontqueue.tail = mandoc_malloc(8);
+ *fontqueue.tail = 'R';
+ }
print_node(m, n);
putchar('\n');
}
@@ -407,10 +452,6 @@ cond_body(DECL_ARGS)
return(MDOC_BODY == n->type);
}
-/*
- * Output a font encoding before a node, e.g., \fR.
- * This obviously has no trailing space.
- */
static int
pre_enc(DECL_ARGS)
{
@@ -424,9 +465,6 @@ pre_enc(DECL_ARGS)
return(1);
}
-/*
- * Output a font encoding subsequent a node, e.g., \fP.
- */
static void
post_enc(DECL_ARGS)
{
@@ -437,8 +475,13 @@ post_enc(DECL_ARGS)
return;
outflags &= ~MMAN_spc;
print_word(suffix);
- if (MDOC_Fl == n->tok && 0 == n->nchild)
- outflags &= ~MMAN_spc;
+}
+
+static void
+post_font(DECL_ARGS)
+{
+
+ font_pop();
}
/*
@@ -667,6 +710,14 @@ post_dl(DECL_ARGS)
}
static int
+pre_em(DECL_ARGS)
+{
+
+ font_push('I');
+ return(1);
+}
+
+static int
pre_fa(DECL_ARGS)
{
@@ -674,11 +725,9 @@ pre_fa(DECL_ARGS)
n = n->child;
while (NULL != n) {
- print_word("\\fI");
- outflags &= ~MMAN_spc;
+ font_push('I');
print_node(m, n);
- outflags &= ~MMAN_spc;
- print_word("\\fP");
+ font_pop();
if (NULL != (n = n->next))
print_word(",");
}
@@ -694,6 +743,25 @@ post_fa(DECL_ARGS)
}
static int
+pre_fl(DECL_ARGS)
+{
+
+ font_push('B');
+ print_word("-");
+ outflags &= ~MMAN_spc;
+ return(1);
+}
+
+static void
+post_fl(DECL_ARGS)
+{
+
+ font_pop();
+ if (0 == n->nchild)
+ outflags &= ~MMAN_spc;
+}
+
+static int
pre_fn(DECL_ARGS)
{
@@ -703,11 +771,11 @@ pre_fn(DECL_ARGS)
if (NULL == n)
return(0);
- print_word("\\fB");
- outflags &= ~MMAN_spc;
+ font_push('B');
print_node(m, n);
+ font_pop();
outflags &= ~MMAN_spc;
- print_word("\\fP(");
+ print_word("(");
outflags &= ~MMAN_spc;
return(pre_fa(m, n->next));
}
@@ -732,8 +800,7 @@ pre_fo(DECL_ARGS)
pre_syn(n);
break;
case (MDOC_HEAD):
- print_word("\\fB");
- outflags &= ~MMAN_spc;
+ font_push('B');
break;
case (MDOC_BODY):
outflags &= ~MMAN_spc;
@@ -752,8 +819,7 @@ post_fo(DECL_ARGS)
switch (n->type) {
case (MDOC_HEAD):
- outflags &= ~MMAN_spc;
- print_word("\\fP");
+ font_pop();
break;
case (MDOC_BODY):
post_fn(m, n);
@@ -768,8 +834,7 @@ pre_ft(DECL_ARGS)
{
pre_syn(n);
- print_word("\\fI");
- outflags &= ~MMAN_spc;
+ font_push('I');
return(1);
}
@@ -779,10 +844,14 @@ pre_in(DECL_ARGS)
if (MDOC_SYNPRETTY & n->flags) {
pre_syn(n);
- print_word("\\fB#include <");
- } else
- print_word("<\\fI");
- outflags &= ~MMAN_spc;
+ font_push('B');
+ print_word("#include <");
+ outflags &= ~MMAN_spc;
+ } else {
+ print_word("<");
+ outflags &= ~MMAN_spc;
+ font_push('I');
+ }
return(1);
}
@@ -790,12 +859,16 @@ static void
post_in(DECL_ARGS)
{
- outflags &= ~MMAN_spc;
if (MDOC_SYNPRETTY & n->flags) {
- print_word(">\\fP");
+ outflags &= ~MMAN_spc;
+ print_word(">");
+ font_pop();
outflags |= MMAN_br;
- } else
- print_word("\\fP>");
+ } else {
+ font_pop();
+ outflags &= ~MMAN_spc;
+ print_word(">");
+ }
}
static int
@@ -840,26 +913,30 @@ pre_lk(DECL_ARGS)
return(0);
if (NULL != (descr = link->next)) {
- print_word("\\fI");
- outflags &= ~MMAN_spc;
+ font_push('I');
while (NULL != descr) {
print_word(descr->string);
descr = descr->next;
}
print_word(":");
- outflags &= ~MMAN_spc;
- print_word("\\fP");
+ font_pop();
}
- print_word("\\fB");
- outflags &= ~MMAN_spc;
+ font_push('B');
print_word(link->string);
- outflags &= ~MMAN_spc;
- print_word("\\fP");
+ font_pop();
return(0);
}
static int
+pre_li(DECL_ARGS)
+{
+
+ font_push('R');
+ return(1);
+}
+
+static int
pre_nm(DECL_ARGS)
{
@@ -869,8 +946,7 @@ pre_nm(DECL_ARGS)
return(1);
if (NULL == n->child && NULL == m->name)
return(0);
- print_word("\\fB");
- outflags &= ~MMAN_spc;
+ font_push('B');
if (NULL == n->child)
print_word(m->name);
return(1);
@@ -882,8 +958,7 @@ post_nm(DECL_ARGS)
if (MDOC_ELEM != n->type && MDOC_HEAD != n->type)
return;
- outflags &= ~MMAN_spc;
- print_word("\\fP");
+ font_pop();
}
static int
@@ -951,6 +1026,14 @@ post_sp(DECL_ARGS)
}
static int
+pre_sy(DECL_ARGS)
+{
+
+ font_push('B');
+ return(1);
+}
+
+static int
pre_vt(DECL_ARGS)
{
@@ -965,8 +1048,7 @@ pre_vt(DECL_ARGS)
return(0);
}
}
- print_word("\\fI");
- outflags &= ~MMAN_spc;
+ font_push('I');
return(1);
}
@@ -976,9 +1058,7 @@ post_vt(DECL_ARGS)
if (MDOC_SYNPRETTY & n->flags && MDOC_BODY != n->type)
return;
-
- outflags &= ~MMAN_spc;
- print_word("\\fP");
+ font_pop();
}
static int