groff
[Top][All Lists]
Advanced

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

[Groff] Coming back with my crazy macros !


From: Thomas Baruchel
Subject: [Groff] Coming back with my crazy macros !
Date: Mon, 4 Jun 2001 22:17:55 +0200
User-agent: Mutt/1.2.5i

Brest, le lundi 4 juin

Hi,

I thought much at my project, and found the following things:
  a) Werner Lemberg told me that my macros wouldn't work in some
     conditions. I was unhappy of this. I downloaded version 1.17 in
     order to have a look at the .unformat macro, which is one of the
     most crucial need for my project. It couldn't help me much, because
     I also need to have each word of my paragraph in a separate line of
     the diversion (in order to use the .it request later).
     I still think that I have to emulate the .unformat request with my
     own needs. I don't use the .ss request any longer, because of the
     bug. I chose a 'adding-huge-space-trap' system in order to push
     each word at the beginning of the next line (I don't keep in my
     diversion the huge spaces, but keep the words ;-). It now seems to
     work on tty output as well as postscript output. Could you have a look
     at it ?
     Just use the macros like this:
       .^( x   [optional first-line indentation]
       some text
       .^)
       .x \" print a first time the diversion
       .br
       .ll 6c
       .x \" print it a second time
       .br
       .ll 4c
       .x \" print it again

     You may think it isn't useful, since .unformat does the same thing,
     but it isn't true (I don't think that you can use the .it input trap
     between each word of a paragraph after .unformat).

     Could you try it with very different system and tell me if it works ?
     It SHOULD work in compatibility mode. Could you try it with other
     troff versions than groff ?

  b) The algorithm to format a paragraph should be faster, more intelligent:
     It won't try several dispositions in a stupid manner before choosing one.
     It will print the paragraph, deciding 'on the fly' to print some lines
     in the normal way, and deciding 'on the fly' to print several
     successive lines backwards (from right to left and from down to up).
     Don't tell me it isn't possible; it is...

=============== my file ================================
.cp \" while debugging
.\"
.\"
.\"
.nr ^L 21c \" don't change this, it shouldn't make your life happier
.\"
.\"
.\"
.de ^( \" beginning of the block
.ev 1
.ds % \\$1 \" name of the diversion
.di \\$1
.di
.di ^% \" trash diversion
.in 0u
.ll \\n(^Lu
.nr ^I 0
.if \\$2 .nr ^I \\$2
.ti \\n(^Lu-1u-\\w' 'u-\\n(^Iu
.dt \\n(.du+\\n(.vu ^_
\& \h'\\n(^Iu'\c
..
.de ^) \" end of the block
.dt
.di
.rm ^%
.ev
..
.de ^_ \" trap while diverting the paragraph
.di
.da \\*%
\h'\\n(^Lu'
.da
.di ^%
.dt \\n(.du+\\n(.vu ^_
..
.\"
.\"
.\"
.^( x 12p
On peut ce me semble, avec meilleure raison distinguer l'amour, par l'estime 
qu'on fait de ce qu'on aime à comparaison de soi-même. Car lorsqu'on estime 
l'objet de son amour moins que soi, on n'a pour lui qu'une simple affection; 
lorsqu'on l'estime à l'égal de soi, cela se nomme \fIamitié\fR et lorsqu'on 
l'estime davantage, la passion qu'on a peut être nommée dévotion.
.^)
.x
.br
.ll 8c
.x

reply via email to

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