[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[groff] 08/21: [me]: Integrate better with papersize.tmac.
From: |
G. Branden Robinson |
Subject: |
[groff] 08/21: [me]: Integrate better with papersize.tmac. |
Date: |
Fri, 18 Nov 2022 13:47:52 -0500 (EST) |
gbranden pushed a commit to branch master
in repository groff.
commit ac6e764a1c9e237d75b75a7f512b5d35c3ab613e
Author: G. Branden Robinson <g.branden.robinson@gmail.com>
AuthorDate: Wed Nov 16 15:00:38 2022 -0600
[me]: Integrate better with papersize.tmac.
* tmac/e.tmac: Integrate better with papersize.tmac by no longer forcing
line (and title) length to 6 inches for typesetters on initialization.
Gather default line length from output device description, possibly
modified later (by other macro file or input). No change to terminal
("nroff mode") output.
* NEWS: Add item.
Tested as follows.
$ cat lorem.me
.de M
. nr N \\$1-1
. if \\$1 .M \\nN
. pp
Sed ut perspiciatis, unde omnis iste natus error sit voluptatem
accusantium doloremque laudantium, totam rem aperiam eaque ipsa, quae ab
illo inventore veritatis et quasi architecto beatae vitae dicta sunt,
explicabo. Nemo enim ipsam voluptatem, quia voluptas sit, aspernatur
aut odit aut fugit, sed quia consequuntur magni dolores eos, qui ratione
voluptatem sequi nesciunt, neque porro quisquam est, qui dolorem ipsum,
quia dolor sit amet consectetur adipiscivelit, sed quia non-numquam eius
modi tempora incidunt, ut labore et dolore magnam aliquam quaerat
voluptatem. Ut enim ad minima veniam, quis nostrum exercitationem ullam
corporis suscipitlaboriosam, nisi ut aliquid ex ea commodi consequatur?
Quis autem vel eum iure reprehenderit, qui inea voluptate velit esse,
quam nihil molestiae consequatur, vel illum, qui dolorem eum fugiat, quo
voluptas nulla pariatur? At vero eos et accusamus et iusto odio
dignissimos ducimus, qui blanditiis praesentium voluptatum deleniti
atque corrupti, quos dolores et quas molestias excepturi sint, obcaecati
cupiditate non-provident, similique sunt in culpa, qui officia deserunt
mollitia animi, id est laborum et dolorum fuga. Et harum quidem rerum
facilis est et expedita distinctio. Nam libero tempore, cum soluta
nobis est eligendi optio, cumque nihil impedit, quo minus id, quod
maxime placeat, facere possimus, omnis voluptas assumenda est, omnis
dolor repellendus. Temporibus autem quibusdam et aut officiis debitis
aut rerum necessitatibus saepe eveniet, ut et voluptates repudiandae
sint et molestiae non-recusandae. Itaque earum rerum hic tenetur a
sapiente delectus, ut aut reiciendis voluptatibus maiores alias
consequatur aut perferendis doloribus asperiores repellat.
..
.M 4
$ ./test-groff -me lorem.me >| lorem-me-port.ps
$ ./test-groff -dpaper=letterl -me -P-l lorem.me >| lorem-me-land.ps
---
ChangeLog | 9 +++++++++
NEWS | 7 +++++++
tmac/e.tmac | 7 ++++---
3 files changed, 20 insertions(+), 3 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index 7463a423e..26c0fd0c4 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+2022-11-16 G. Branden Robinson <g.branden.robinson@gmail.com>
+
+ * tmac/e.tmac: Integrate better with papersize.tmac by no longer
+ forcing line (and title) length to 6 inches for typesetters on
+ initialization. Gather default line length from output device
+ description, possibly modified later (by other macro file or
+ input). No change to terminal ("nroff mode") output.
+ * NEWS: Add item.
+
2022-11-16 Peter Schaffter <peter@schaffter.ca>
* tmac/papersize.tmac: If a paper format has been selected,
diff --git a/NEWS b/NEWS
index c867cc914..0c1e1f079 100644
--- a/NEWS
+++ b/NEWS
@@ -311,6 +311,13 @@ o The doc (mdoc) macro package now renders man page
(sub)section cross
references cited with the `Sx` macro by quoting them instead of
setting them in italics.
+o On typestting output devices, the e (me) macro package now derives the
+ line length from the device description, which can be overriden by the
+ "papersize.tmac" macro file (usually configured via the "-d paper"
+ groff command-line option). The package thus adapts to landscape
+ orientation and paper formats other than U.S. letter. It continues to
+ use a line length of 6 (notional) inches on terminals.
+
o The e (me) macro package has changed its support for output line
numbering with the `n1` and `n2` macros to resolve several bugs in the
previous implementation. The `n1` macro now accepts an optional `C`
diff --git a/tmac/e.tmac b/tmac/e.tmac
index 88f966fc8..b30a6142a 100644
--- a/tmac/e.tmac
+++ b/tmac/e.tmac
@@ -2187,7 +2187,7 @@
.nr es 0.5v \" equation pre/postspacing
.if \n(es<\n(.V .nr es \n(.V
.wh 0 @h \" set header
-.nr $l \n(.lu \" line length
+.nr $l \n(.lu \" line length (of column)
.nr _L \n(.lu \" line length of page
.nr $c 1 \" current column number
.nr $f 1 \" footnote number
@@ -2199,6 +2199,9 @@
.ds rq \(rq\" \" right quote
.em @z
.
+.\" Set line length and get .lt side effect.
+.if t .ll \n(_Lu
+.if n .ll 6.0i
.
.\" *** FOREIGN LETTERS AND SPECIAL CHARACTERS ***
.
@@ -2228,8 +2231,6 @@
.ds qe
\s-2\v'0.45m'\z\(em\v'-0.625m'\z\(em\v'-0.625m'\(em\v'0.8m'\s0\h'-0.1m'\v'-0.05m'\(br\v'0.05m'\h'0.1m'
.ds qa \z\e\h'0.35m'\z\(sl\h'-0.33m'\v'-0.3m'\s-4\(em\s0\v'0.3m'\h'0.15m'
.rm #h #v
-.ll 6.0i
-.lt 6.0i
.
.de @U
.do @err the '\\$1' macro is not supported by this version of 'me'
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [groff] 08/21: [me]: Integrate better with papersize.tmac.,
G. Branden Robinson <=