From 977b25a76ae8263e53fb4eb1abfc395769f23e3d Mon Sep 17 00:00:00 2001 From: Russ Cox Date: Thu, 13 Aug 2020 23:41:59 -0400 Subject: tmac: introduce real manual reference macro instead of overloading IR The overloading of IR emits magic \X'...' sequences that turn into HTML manual links. But not all such IR invocations should be manual links; those had to be written to avoid the IR macro before. Worse, the \X'...' ending the IR causes troff to emit only a single space after a period. Defining a new IM macro for manual references fixes both problems. Fixes #441. --- man/man1/troff2html.1 | 25 +++++++++++++------------ 1 file changed, 13 insertions(+), 12 deletions(-) (limited to 'man/man1/troff2html.1') diff --git a/man/man1/troff2html.1 b/man/man1/troff2html.1 index a40e22f0..98ea62a8 100644 --- a/man/man1/troff2html.1 +++ b/man/man1/troff2html.1 @@ -13,7 +13,7 @@ troff2html \- convert troff output into HTML .SH DESCRIPTION .I Troff2html reads the -.IR troff (1) +.IM troff (1) output in the named .IR files , default standard input, @@ -25,12 +25,13 @@ does a tolerable job with straight output, but it is helped by annotations, described below. Its main use is for .B man2html -(see Plan 9's \fIhttpd\fR(8)), +(see Plan 9's +.IR httpd (8)), which converts -.IR man (1) +.IM man (1) pages into HTML and depends on a specially annotated set of -.IR man (7) +.IM man (7) macros, invoked by .B troff .BR -manhtml . @@ -57,25 +58,25 @@ x X html manref end cp 1 .EE .PP which are used to create HTML hyperlinks around text of the form -.IR cp (1) +.IM cp (1) pointing to .BR /magic/man2html/1/cp . .PP .I Troff2html is new and experimental; in time, it may improve and subsume Plan 9's -\fIms2html\fR(1). +.IR ms2html (1). On the one hand, because it uses the input, .B ms2html can handle -.IR pic (1), -.IR eqn (1), +.IM pic (1) , +.IM eqn (1) , etc., which .I troff2html does not handle at all; on the other hand, .B ms2html understands only -.IR ms (7) +.IM ms (7) documents and is easily confused by complex .B troff constructions. @@ -83,13 +84,13 @@ constructions. has the reverse properties: it does not handle the preprocessors but its output is reliable and (modulo helper annotations) is independent of macro package. .SH SEE ALSO -.IR troff (1), +.IM troff (1) , Plan 9's -\fIms2html\fR(1), +.IR ms2html (1), .I man2html in Plan 9's -\fIhttpd\fR(8). +.IR httpd (8). .SH BUGS .B Troff and HTML have different models, and they don't mesh well in all cases. -- cgit v1.2.3 From d32deab17bfffa5bffc5fab3e6577558e40888c5 Mon Sep 17 00:00:00 2001 From: Russ Cox Date: Sat, 15 Aug 2020 20:07:38 -0400 Subject: tmac: rename IM (italic manual) to MR (manual reference) Suggested by G. Brandon Robinson. --- man/man1/troff2html.1 | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'man/man1/troff2html.1') diff --git a/man/man1/troff2html.1 b/man/man1/troff2html.1 index 98ea62a8..06465e9b 100644 --- a/man/man1/troff2html.1 +++ b/man/man1/troff2html.1 @@ -13,7 +13,7 @@ troff2html \- convert troff output into HTML .SH DESCRIPTION .I Troff2html reads the -.IM troff (1) +.MR troff (1) output in the named .IR files , default standard input, @@ -28,10 +28,10 @@ Its main use is for (see Plan 9's .IR httpd (8)), which converts -.IM man (1) +.MR man (1) pages into HTML and depends on a specially annotated set of -.IM man (7) +.MR man (7) macros, invoked by .B troff .BR -manhtml . @@ -58,7 +58,7 @@ x X html manref end cp 1 .EE .PP which are used to create HTML hyperlinks around text of the form -.IM cp (1) +.MR cp (1) pointing to .BR /magic/man2html/1/cp . .PP @@ -69,14 +69,14 @@ Plan 9's On the one hand, because it uses the input, .B ms2html can handle -.IM pic (1) , -.IM eqn (1) , +.MR pic (1) , +.MR eqn (1) , etc., which .I troff2html does not handle at all; on the other hand, .B ms2html understands only -.IM ms (7) +.MR ms (7) documents and is easily confused by complex .B troff constructions. @@ -84,7 +84,7 @@ constructions. has the reverse properties: it does not handle the preprocessors but its output is reliable and (modulo helper annotations) is independent of macro package. .SH SEE ALSO -.IM troff (1) , +.MR troff (1) , Plan 9's .IR ms2html (1), .I man2html -- cgit v1.2.3