Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/distrib/notes/common Provide separate .Tc and .Ti definition...



details:   https://anonhg.NetBSD.org/src/rev/b6ea07012965
branches:  trunk
changeset: 461525:b6ea07012965
user:      uwe <uwe%NetBSD.org@localhost>
date:      Fri Nov 29 16:15:09 2019 +0000

description:
Provide separate .Tc and .Ti definitions for HTML and non-HTML.

Change HTML definition of .Tc to enclose TOC into simple .nf/.fi that
also give us <pre> in the output.

This frees our hands to redefine non-HTML case to use better
formatting (work in progress).

diffstat:

 distrib/notes/common/macros |  19 ++++++++++++++++---
 1 files changed, 16 insertions(+), 3 deletions(-)

diffs (43 lines):

diff -r eb7b89566717 -r b6ea07012965 distrib/notes/common/macros
--- a/distrib/notes/common/macros       Fri Nov 29 15:24:21 2019 +0000
+++ b/distrib/notes/common/macros       Fri Nov 29 16:15:09 2019 +0000
@@ -1,4 +1,4 @@
-.\"    $NetBSD: macros,v 1.51 2019/11/28 19:59:48 uwe Exp $
+.\"    $NetBSD: macros,v 1.52 2019/11/29 16:15:09 uwe Exp $
 .\"
 .\" Copyright (c) 1999-2004 The NetBSD Foundation, Inc.
 .\" All rights reserved.
@@ -342,11 +342,23 @@
 .if rHTML <a name="\\$*"></a>
 .if dTOC .mktoc \\n[To-toc-level] \\$@
 ..
+.\"  .Tc and .Ti for HTML
+.ie rHTML \{\
 .de Ti
-.ie rHTML \{\
 \h'3n*\\$1u' <a href="#\\$3">\\$3</a>
+..
+.de Tc
+.tm ...reading \*[toc-file]
+.nf
+.\" Use so-real here because toc-file is in objdir not .CURDIR
+.so-real \*[toc-file]
+.fi
+..
 .\}
-.el \h'3n*\\$1u' \\$3\a\\$2
+.\"  .Tc and .Ti for text and postscript
+.ei \{\
+.de Ti
+\h'3n*\\$1u' \\$3\a\\$2
 ..
 .de Tc
 .Bd -literal
@@ -357,6 +369,7 @@
 .so-real \*[toc-file]
 .Ed
 ..
+.\}
 .
 .
 .\"    --------------------  MISC  --------------------



Home | Main Index | Thread Index | Old Index