groff-commit
[Top][All Lists]
Advanced

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

[groff] 22/31: contrib/mm/examples/letter.mm: Improve example.


From: G. Branden Robinson
Subject: [groff] 22/31: contrib/mm/examples/letter.mm: Improve example.
Date: Sun, 30 May 2021 11:12:36 -0400 (EDT)

gbranden pushed a commit to branch master
in repository groff.

commit f6352c18358926a685d654ebb50a308c463819af
Author: G. Branden Robinson <g.branden.robinson@gmail.com>
AuthorDate: Sun May 30 17:06:43 2021 +1000

    contrib/mm/examples/letter.mm: Improve example.
    
    * contrib/mm/examples/letter.mm: Revise to be a better example: use
      macro package more effectively, follow *roff input conventions more
      carefully, and incorporate more accurate comments.
    
      - Use PH to set (clear) the page header.
      - Use ".DS R" (not tabs) to get right-aligned displays.
      - Add two empty requests where vertical space expected.
      - Break input lines at (most) commas and before parenthetical prhases.
      - Add non-printing input break after non-sentence-terminating period
        followed by white space.
      - Drop mischaracterized uses of SP; they don't set line spacing.
    
    I learned a couple of things in 3½ years.  Maybe I'll learn more...
---
 ChangeLog                     |  7 ++++++
 contrib/mm/examples/letter.mm | 50 +++++++++++++++++++++++++++++--------------
 2 files changed, 41 insertions(+), 16 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 14d4742..b4c8870 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,12 @@
 2021-05-30  G. Branden Robinson <g.branden.robinson@gmail.com>
 
+       * contrib/mm/examples/letter.mm: Revise to be a better example:
+       use macro package more effectively, follow *roff input
+       conventions more carefully, and incorporate more accurate
+       comments.
+
+2021-05-30  G. Branden Robinson <g.branden.robinson@gmail.com>
+
        * contrib/mm/m.tmac: Update diagnostics.  When aborting,
        explicitly tell the user we are doing so (see
        a334cc97abbdfb9c41e28fcd7c187b81a0a3ceac, 25 September 2020).
diff --git a/contrib/mm/examples/letter.mm b/contrib/mm/examples/letter.mm
index 078546d..3683849 100644
--- a/contrib/mm/examples/letter.mm
+++ b/contrib/mm/examples/letter.mm
@@ -1,11 +1,15 @@
+.\" Set a blank page header; our letter is a single page and does not
+.\" require the default numbering.
+.PH '''
 .\" Set point size to 14.
 .S 14
 .\" Set paragraph type to "indented".
 .nr Pt 1
-                                                               1 November 2017
-.\" Set line spacing to double-spaced.
-.SP 2
-.\" Start display.
+.\" Put the date in a right-aligned display.
+.DS R
+30 May 2021
+.DE
+.\" Start display (left-aligned).
 .DS
 Mr. Ty Coon
 President of Vice, Intellectual Property and Licensing
@@ -14,20 +18,34 @@ Silly Valley, CA 94043
 .\" End display.
 .DE
 Dear Mr. Coon,
+.
+.
 .\" Start new paragraph.
 .P
-I would like to request that your wholly-owned subsidiary, Yoyodyne, Inc.,
-disclaim all copyright interest in the program `Gnomovision' (which makes 
passes
-at compilers) written by Juliet Hacker prior to her employment with Yoyodyne.
+I would like to request that your wholly-owned subsidiary,
+Yoyodyne, Inc.,
+disclaim all copyright interest in the program `Gnomovision'
+(which makes passes at compilers)
+written by Juliet Hacker prior to her employment with Yoyodyne.
+.
+.
 .P
-Our colleagues at the Software Freedom Conservancy have determined and informed
-us that Ms. Hacker's employment agreement is a contract of adhesion.
+Our colleagues at the Software Freedom Conservancy have determined and
+informed us that Ms.\& Hacker's employment agreement is a contract of
+adhesion.
+.
+.
 .P
 Thank you for your prompt attention to this matter.
-.\" Set line spacing to single-spaced.
-.SP
-                                                               Sincerely yours,
-.\" Leave room for signature.
-.SP 2
-                                                               Tracy T. Jordan
-.\" vim: set noexpandtab textwidth=80:
+.
+.
+.\" Put the closing and signature in a right-aligned display as well.
+.DS R
+Sincerely yours,
+.\" Leave three "vees" (3 text line heights) of room for signature.
+.SP 3v
+.
+.
+Tracy T.\& Jordan
+.DE
+.\" vim: set noexpandtab textwidth=72:



reply via email to

[Prev in Thread] Current Thread [Next in Thread]