Re: [dev] Troff for typsetting e-mails

From: Luis Anaya <papoanaya_AT_hotmail.com>
Date: Sun, 28 Oct 2012 17:25:25 -0400

Christoph Lohmann <20h_AT_r-36.net> writes:


>> d. Text - Looking at man pages, it adds a lot of terminal commands, it
>> would not look nice in email.
>
> Well, only needed is a subset to align text on a line, add some
> lines,
[chomp...]
> much more than a simple hack would approach.

All right, so this is the method to the madness, you want to simplify
formatting UTF-8 text using Groff commands rather than typing spaces
yourself. Fine. I personally prefer to use editor facilities to do
that. But each one to its own.

My two cents.

1. Run groff with a TERM value of "dumb". I use nroff due to habit, but
   running groff -Tutf8 should yield similar results with national
   language support.
   TERM=dumb nroff -mm foo.groff > salida.txt
   You should be able to use any macro set that you like. I'm used to MM

2. Avoid using italics and bolds. Stick with adding asterisks and
   underscores as if you would do in email text.

3. You'll have to modify some of the macro fonts to Roman (font number
   1) to avoid insertion of terminal commands.

4. You'll have to adjust margins and lines to your taste. In this case I
   did not do any adjustment. I left the signature at the end
   untouched on purpose, so you can get a sense on how much you need to
   change.

Now, I have to prepare the Welcome Wagon to a Category 1 Hurricane.


Luis


Small sample attached.
-- troff in MM mode --
.\" blank out header
.PH "''''"
.\" make all headers plain
.ds HF R R R R R R R

.H 1 "Lorem Ipsum"
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
.P
beatae vitae dicta sunt explicabo. Nemo enim ipsam voluptatem
quia voluptas sit aspernatur aut odit aut fugit, sed quia
consequuntur magni dolores eos
.AL
.LI
qui ratione voluptatem sequi
nesciunt. Neque porro quisquam est,
.LI
qui dolorem ipsum quia
dolor sit amet, consectetur, adipisci velit, sed quia non
numquam eius modi tempora incidunt
.LI
ut labore et dolore
.LE
-- resultant output --







       1. Lorem Ipsum

       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

         1. qui ratione voluptatem sequi nesciunt. Neque porro
             quisquam est,

         2. qui dolorem ipsum quia dolor sit amet, consectetur,
             adipisci velit, sed quia non numquam eius modi tempora
             incidunt

         3. ut labore et dolore





































-- 
Luis Anaya
papo anaya aroba hot mail punto com
"Do not use 100 words if you can say it in 10" - Yamamoto Tsunetomo
Received on Sun Oct 28 2012 - 22:25:25 CET

This archive was generated by hypermail 2.3.0 : Sun Oct 28 2012 - 22:36:04 CET