[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[bug #62945] [www] detangle www.tmac from html device
From: |
G. Branden Robinson |
Subject: |
[bug #62945] [www] detangle www.tmac from html device |
Date: |
Tue, 23 Aug 2022 17:58:06 -0400 (EDT) |
URL:
<https://savannah.gnu.org/bugs/?62945>
Summary: [www] detangle www.tmac from html device
Project: GNU troff
Submitter: gbranden
Submitted: Tue 23 Aug 2022 09:58:05 PM UTC
Category: Macro - others/general
Severity: 1 - Wish
Item Group: Feature change
Status: None
Privacy: Public
Assigned to: None
Open/Closed: Open
Discussion Lock: Any
Planned Release: None
_______________________________________________________
Follow-up Comments:
-------------------------------------------------------
Date: Tue 23 Aug 2022 09:58:05 PM UTC By: G. Branden Robinson <gbranden>
I thought this was going to be easy...
(Also, I forgot and could not locate where this discussion with Dave took
place--maybe he could remind me.)
diff --git a/ChangeLog b/ChangeLog
index 33e49ae28..984c72c2a 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2022-08-20 G. Branden Robinson <g.branden.robinson@gmail.com>
+
+ * tmac/html.tmac: Stop automatically loading `www.tmac`. That
+ auxiliary package is a convenience, not a necessity.
+ * NEWS: Add item.
+
+ Thanks to Dave Kemper for the discussion.
+
2022-08-23 G. Branden Robinson <g.branden.robinson@gmail.com>
* src/roff/troff/env.cpp (environment::set_family): Throw error
diff --git a/NEWS b/NEWS
index 43463ccee..0d92277a6 100644
--- a/NEWS
+++ b/NEWS
@@ -420,6 +420,17 @@ o On output devices using the Latin-1 character encoding
("groff -T
sequences like `this' in the input (character remapping with 'char'
requests and similar notwithstanding).
+grohtml
+------
+
+o The grohtml output driver no longer directs the formatter to
+ automatically load the "www.tmac" auxiliary macro package for all
+ documents rendered for the "html" and "xhtml" output devices; the
+ package is a convenience, not a necessity. To use the macros
+ documented in groff_www(7), load the package with the "-m www"
+ command-line option to groff or use the ".mso www.tmac" request in
+ your document.
+
gropdf
------
diff --git a/tmac/html.tmac b/tmac/html.tmac
index 887b2882c..fa2e0e165 100644
--- a/tmac/html.tmac
+++ b/tmac/html.tmac
@@ -533,8 +533,6 @@
.defcolor yellow1 rgb #fffc17
.defcolor yellowgreen rgb #52d017
.
-.mso www.tmac
-.
.ie '\[char97]'a' \
. mso latin1.tmac
.el \
It's not. Some macros that IMO properly belong in html.tmac are defined in
www.tmac instead.
The comment before them even gives away this fact!
.\"
.\" supplementary macros used by other macro sets
.\"
.\" here are some tags specially for -Tps or -Thtml when invoked by
.\" pre-html to generate PNG images from postscript.
.
.\" --------------------------------------------------------------------
.\" HTML-DO-IMAGE - tell troff to issue an image marker which can be
.\" read back by pre-html
.\"
.de HTML-DO-IMAGE
. if r ps4html \
. nop \O[5\\$2\\$1.png]\O[1]\O[3]
. if \\n[www-html] \
. nop \O[5\\$2\\$1.png]\O[0]\O[3]
..
.
.\" --------------------------------------------------------------------
.\" HTML-IMAGE-END - terminate an image for HTML
.\"
.de HTML-IMAGE-END
. if r ps4html \
. nop \O[4]\O[2]\O[0]
. if \\n[www-html] \
. nop \O[4]\O[2]\O[1]
..
.
.nr www-png-no 0
.
.\" --------------------------------------------------------------------
.\" www-make-unique-name - generate another unique name in string
.\" 'www-unique-name'
.\"
.de www-make-unique-name
. nr www-png-no +1
. ds www-unique-name \\*[www-image-template]\\n[www-png-no]\"
..
.
.\" --------------------------------------------------------------------
.\" HTML-IMAGE and friends tell grohtml that this region of text needs
.\" to be rendered as an image.
.\"
.de HTML-IMAGE
. \" generates a centered image
. www-make-unique-name
. HTML-DO-IMAGE \\*[www-unique-name] c
..
.
.de HTML-IMAGE-RIGHT
. www-make-unique-name
. HTML-DO-IMAGE \\*[www-unique-name] r
..
.
.de HTML-IMAGE-LEFT
. www-make-unique-name
. HTML-DO-IMAGE \\*[www-unique-name] l
..
.
.de HTML-IMAGE-INLINE
. www-make-unique-name
. HTML-DO-IMAGE \\*[www-unique-name] i
..
.
.\" EQN-HTML-IMAGE and friends check to see whether the equation is
.\" not in an image, in which case it allows HTML
.\" (mathml) to be generated (if -Txhtml was specified).
.
.de EQN-HTML-IMAGE
. \" generates a centered image
. www-make-unique-name
. EQN-HTML-DO-IMAGE \\*[www-unique-name] c
..
.
.de EQN-HTML-IMAGE-RIGHT
. www-make-unique-name
. EQN-HTML-DO-IMAGE \\*[www-unique-name] r
..
.
.de EQN-HTML-IMAGE-LEFT
. www-make-unique-name
. EQN-HTML-DO-IMAGE \\*[www-unique-name] l
..
.
.de EQN-HTML-IMAGE-INLINE
. www-make-unique-name
. EQN-HTML-DO-IMAGE \\*[www-unique-name] i
..
.
.\" --------------------------------------------------------------------
.\" EQN-HTML-DO-IMAGE - tell troff to issue an image marker which can be
.\" read back by pre-html
.\"
.de EQN-HTML-DO-IMAGE
. ie r xhtml \{\
. if !(\\n[.O] == 0) \{\
. if r ps4html \
. nop \O[5\\$2\\$1.png]\O[1]\O[3]
. if \\n[www-html] \
. nop \O[5\\$2\\$1.png]\O[0]\O[3]
. \}
. \}
. el \
. HTML-DO-IMAGE \\$*
..
.
.\" --------------------------------------------------------------------
.\" EQN-HTML-IMAGE-END - terminate an image for HTML
.\"
.de EQN-HTML-IMAGE-END
. ie r xhtml \{\
. if !(\\n[.O] == 0) \{\
. if r ps4html \
. nop \O[4]\O[2]\O[0]
. if \\n[www-html] \
. nop \O[4]\O[2]\O[1]
. \}
. \}
. el \
. HTML-IMAGE-END
..
_______________________________________________________
Reply to this item at:
<https://savannah.gnu.org/bugs/?62945>
_______________________________________________
Message sent via Savannah
https://savannah.gnu.org/
- [bug #62945] [www] detangle www.tmac from html device,
G. Branden Robinson <=