gbranden pushed a commit to branch master
in repository groff.
commit 994bc0a8ca336bad02a814a590bef2faea652894
Author: G. Branden Robinson <[email protected]>
AuthorDate: Sat Dec 17 19:35:38 2022 -0600
[mdoc]: Throw diagnostic if "-Thtml -rD1".
* tmac/doc.tmac: Inform user we're ignoring their "-rD1" setting if also
formatting HTML; parallels groff man(7) behavior.
---
ChangeLog | 5 +++++
tmac/doc.tmac | 11 +++++++++--
2 files changed, 14 insertions(+), 2 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index 0f7e330a8..26e3860b3 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2022-12-17 G. Branden Robinson <[email protected]>
+
+ * tmac/doc.tmac: Inform user we're ignoring their "-rD1" setting
+ if also formatting HTML; parallels groff man(7) behavior.
+
2022-12-17 G. Branden Robinson <[email protected]>
* tmac/doc.tmac: Trivially refactor. Relocate handling of `D`
diff --git a/tmac/doc.tmac b/tmac/doc.tmac
index 9ec04ac77..4edc408f6 100644
--- a/tmac/doc.tmac
+++ b/tmac/doc.tmac
@@ -107,8 +107,15 @@
.el \
. nr 3usekeeps 1
.
-.\" Use -rD=1 for double-sided printing.
-.if !r D .nr D 0
+.\" double-sided layout
+.ie !r D \
+. nr D 0
+.el \
+. if \n[D] \
+. if \n[doc-is-output-html] \{\
+. tm mdoc: ignoring double-sided layout in HTML output
+. nr D 0
+. \}
.
.\" TODO: Implement HF string.
.
_______________________________________________
Groff-commit mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/groff-commit