lout-users
[Top][All Lists]
Advanced

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

Extended colour support in Lout


From: M. van Beilen
Subject: Extended colour support in Lout
Date: Fri, 6 Apr 2001 23:56:10 +0200
User-agent: Mutt/1.2.5i

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1



Note: I am not subscribed to this list (yet). Please reply to my
email address directly.


Hi everyone,

I am new to Lout. I generally like it a lot, especially its
cleanliness compared to the 1,398,382 different packages in a
standard TeX distribution, as well as the increased layout
control.

I was, however, horrified by the way in which non-predefined
colours had to be included. The construct with "nochange" and
"@SetColor" is a mess, especially when both PS and PDF output are
required. So, I made up this little patch. With it, you will be
able to use "{ rgb 0.9 0.8 0.7 }" anywhere you can use "white",
"blue" etc. I even included some simple error checking, so that
mistyped colour names will generate a warning and invalid PS/PDF.

Note that the word 'rgb' is slightly misleading, as anything
after rgb is included in the .ps or .pdf without warning. (So
type carefully.) This means you can use it in other colourspaces
(like CMYK) as well.

Now that I have your attention, I would also like to point out an
error in the user documentation. "bgr_colo" (page 174 of the
resulting PDF) describes how non-standard colours can be created.
Quote:

===
The standard Lout "@SetColour" symbol can provide many more
colours, although they must be specified using numbers rather
than names. For example, "{ 0.5 0.5 1.0 } @SetColour Hello"
prints @Code Hello in a colour containing red at intensity 0.5,
green at [....]
===

This generates faulty output without errors or warnings, and
should read "{ 0.5 0.5 1.0 setcolor } @SetColour Hello". This
will still generate erroneous PDF files however and the user
should be warned about this.


And now, the patch. This patch is against "bsf" in the standard
include directory, usually "/usr/lib/lout/include" or something
similar. (The default 3.24 makefile puts it in
"/usr/staff/jeff/lout.lib/include".)

===[ begin bsf.patch ]============================================
+-- bsf.orig    Fri Apr  6 20:12:56 2001
+++ bsf Fri Apr  6 21:41:06 2001
@@ -73,6 +73,12 @@
                lightgrey       @Yield  { 0.8 0.8 0.8 }
                black           @Yield  { 0.0 0.0 0.0 }
                white           @Yield  { 1.0 1.0 1.0 }
+               else @Yield {
+                   { rgb @Common col } @Case {
+                       BadColorName    @Yield { BadColorName }
+                       rgb             @Yield { rgb @Rump col }
+                   }
+               }
            }
        }
 
===[  end  bsf.patch ]============================================


+-----------------------------------------------------------------
                                   /"\
  Regards,                         \ /     ASCII Ribbon Campaign
    =Martin=                        X      Against HTML Mail
                                   / \
+-----------------------------------------------------------------
PGP:  FE87448B  DDF8 677C 9244 D119 4FE0  AE3A 37CF 3458 FE87 448B


From: "M. van Beilen" <address@hidden> 
To: address@hidden
Subject: Extended colour support in Lout
PGP: SD
X-S-Issue: address@hidden 2001/04/06 23:51:01 9091f9f3ed84990890c8643d4b9888fd
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.4 (GNU/Linux)
Comment: For info see http://www.gnupg.org

iEYEARECAAYFAjrOOlAACgkQN880WP6HRIvGxwCeIBKhjR3LGzKvm0KTH7kjR3hl
PZEAmwdvM82lMxkbImU/gXxhKAWs1q9/
=hrUC
-----END PGP SIGNATURE-----


reply via email to

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