Re: A proposition for a print-command

2000-11-21 Thread Brian Salter-Duke

On Fri, Sep 22, 2000 at 12:30:22PM +0200, [EMAIL PROTECTED] wrote:
 Hello,
 
 Having longtime searched for a nice printing-command, i've finally
 choosen the next one :
 
 set print_command="fmt --prefix='' -s | fmt -s | a2ps -b"" -1 -R 
--pretty-print=mail -o $(date +%x-%X | tr : .).ps"
 
 a2ps gives very nice layouts with the option --pretty-print=mail,
 particularly with the use of different fonts for headers, body-text and
 quoted-text, but there is some limitations. It does'nt wrap the long
 lines, so messages coming from mailers like Outlook have lines cutted
 without regarding the words-boundaries.
 
 With a first pipe fmt -s, the lines are wrapped, but the "smart font
 selection" is lost for long quoted-text (only the first line begins with
 a "").
 
 So the solution was to pipe two successives fmt commands ; the first
 concerns the quoted-text and insert the prefix "" in the beginning of
 every wrapped line. The 2d wraps the other lines.
 
 I also add the next options to a2ps :
 
 -b"" this to avoid the header but preserve the title (better than -B)
 -o $(date +%x-%X | tr : .).ps to send the output to a file rather than
 the printer. The name of the file is producted by the current date.
 
 Try it. Comments welcome.

This is indeed a nice solution, although I do not see why you want to
send it to this kind of file and not a printer. Let me point out however
that the whole world is not linux. The fmt command you use is the Gnu
fmt from the textutils Gnu package. Other fmt commands such as the AIX
one I tried first do not support what is being done here.

Cheers, Brian.

 -- 
 
 
  #=---=#
  "  ^^  Gauthier Vandemoortele "
  |   (_/°°-ç[EMAIL PROTECTED] |
  |   | \_`-"   |
  |   )/@mmm||   Chée de Wavre, 135c|
  |   \nn   \nn  B-1360 Perwez  |
  |  Belgique   |
  " FOE-Belgium : http://www.ful.ac.be/hotes/amisterre  "
  #=---=#

-- 
Associate Professor Brian Salter-Duke (Brian Duke) [EMAIL PROTECTED]  
Chemistry, School of BECS, SITE, NT University, Darwin, NT 0909, Australia.
Phone 08-89466702. Fax 08-89466847. http://www.smps.ntu.edu.au/
Get PGP2 Key:- http://www.smps.ntu.edu.au/chemistry/duke.key.html



Re: A proposition for a print-command

2000-11-21 Thread Shawn D. McPeek


The whole world doesn't have to be Linux to use this solution.  If your
AIX box does not have gfmt, you can easily download the software and
compile it for your AIX box.  Worked for me on AIX and HP-UX.

Shawn

Previously, Brian Salter-Duke wrote:
% 
% This is indeed a nice solution, although I do not see why you want to
% send it to this kind of file and not a printer. Let me point out however
% that the whole world is not linux. The fmt command you use is the Gnu
% fmt from the textutils Gnu package. Other fmt commands such as the AIX
% one I tried first do not support what is being done here.

-- 
"Benson, you are so free of the ravages of intelligence"
-- Time Bandits



Re: A proposition for a print-command

2000-11-21 Thread Brian Salter-Duke

On Tue, Nov 21, 2000 at 06:28:03PM -0800, Shawn D. McPeek wrote:
 
 The whole world doesn't have to be Linux to use this solution.  If your
 AIX box does not have gfmt, you can easily download the software and
 compile it for your AIX box.  Worked for me on AIX and HP-UX.

Sure and that is what I did do. I said I used AIX fmt first. I was
merely pointing out that not all "fmt"s are the same or useable in the
way described. With linux so dominant, this point does seem to be missed
sometimes. I have nothing against linux. I think it is great. I just
happen to use an old AIX box.

Cheers, Brian.

 Shawn
 
 Previously, Brian Salter-Duke wrote:
 % 
 % This is indeed a nice solution, although I do not see why you want to
 % send it to this kind of file and not a printer. Let me point out however
 % that the whole world is not linux. The fmt command you use is the Gnu
 % fmt from the textutils Gnu package. Other fmt commands such as the AIX
 % one I tried first do not support what is being done here.
 
 -- 
 "Benson, you are so free of the ravages of intelligence"
 -- Time Bandits

-- 
Associate Professor Brian Salter-Duke (Brian Duke) [EMAIL PROTECTED]  
Chemistry, School of BECS, SITE, NT University, Darwin, NT 0909, Australia.
Phone 08-89466702. Fax 08-89466847. http://www.smps.ntu.edu.au/
Get PGP2 Key:- http://www.smps.ntu.edu.au/chemistry/duke.key.html



Re: A proposition for a print-command

2000-09-22 Thread Vincent Lefevre

On Fri, Sep 22, 2000 at 12:30:22 +0200, [EMAIL PROTECTED] wrote:
 set print_command="fmt --prefix='' -s | fmt -s | a2ps -b"" -1 -R 
--pretty-print=mail -o $(date +%x-%X | tr : .).ps"

[snip explanations]

 Try it. Comments welcome.

I can't test it now, but this looks a good idea!

-- 
Vincent Lefèvre [EMAIL PROTECTED] - Web: http://www.vinc17.org/ - 100%
validated HTML - Acorn Risc PC, Yellow Pig 17, Championnat International des
Jeux Mathématiques et Logiques, TETRHEX, etc.
Computer science / computer arithmetic / Arénaire project at LIP, ENS-Lyon