bugGNU roff - Bugs: bug #62945, [www] detangle www.tmac from html...

 
 

bug #62945: [www] detangle www.tmac from html device

Submitter:  G. Branden Robinson <gbranden>
Submitted:  Tue 23 Aug 2022 09:58:05 PM UTC
   
 
Category:  Macro package - others/general Severity:  1 - Wish
Item Group:  Feature change Status:  None
Privacy:  Public Assigned to:  None
Open/Closed:  Open Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Sat 08 Oct 2022 02:08:59 AM UTC, comment #2: 

Removing the autoloading of www.tmac for -Thtml runs also has a small back-compatibility concern: this autoloading has been documented since 2000's commit e092fba4, when the man page was introduced (as tmac/groff_markup.man, documenting the macro file then named tmac/tmac.arkup) in groff 1.16.  However, grohtml has also been characterized as alpha software since at least that time, so users should expect some behavioral churn.

Dave <barx>
Group Member
Wed 24 Aug 2022 06:26:46 AM UTC, comment #1: 

original submission:

> (Also, I forgot and could not locate where this discussion
> with Dave took place--maybe he could remind me.)


You're probably thinking of where bug #62726 veered wildly off topic?

Dave <barx>
Group Member
Tue 23 Aug 2022 09:58:05 PM UTC, original submission:  

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
..


G. Branden Robinson <gbranden>
Group administrator

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by barx (Posted a comment)
  • -email is unavailable- added by gbranden (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only logged-in users can vote.

     

    No changes have been made to this item

    Back to the top

    Powered by Savane 3.14-f13d.
    Corresponding source code