From 5dab6cfb28ecc175ca8f4c24808082719246fdb7 Mon Sep 17 00:00:00 2001 From: Han-Wen Nienhuys Date: Thu, 31 Mar 2005 12:30:18 +0000 Subject: [PATCH] color patch by EA --- ChangeLog | 5 +++++ THANKS | 2 +- scm/output-tex.scm | 15 +++++++++++++++ tex/lilyponddefs.tex | 2 ++ 4 files changed, 23 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 1f7dcc680a..765695319a 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2005-03-31 Erlend Aasland + + * scm/output-tex.scm: implement {re,}setcolor + * tex/lilyponddefs.tex: use color package + 2005-03-31 Jan Nieuwenhuizen * Documentation/user/macros.itexi: Fix @usermanref html links in diff --git a/THANKS b/THANKS index fadfb53346..109d559080 100644 --- a/THANKS +++ b/THANKS @@ -16,6 +16,7 @@ Arno Waschk Bertalan Fodor Carl Sorensen Christian Hitz +David Jedlinsky Erlend Aasland Heikki Junes Jeff Smith @@ -45,7 +46,6 @@ Andreas Scherer Anthony W. Youngman Antti Kaihola Arjan Bos -David Jedlinsky Dylan Nicholson Ed Jackson Erik Ronström diff --git a/scm/output-tex.scm b/scm/output-tex.scm index 43e68d7782..7d5bffda09 100644 --- a/scm/output-tex.scm +++ b/scm/output-tex.scm @@ -43,6 +43,8 @@ round-filled-box text white-text + setcolor + resetcolor polygon draw-line no-origin @@ -170,6 +172,19 @@ (define (white-text scale s) (embedded-ps (list 'white-text scale s))) +(define (setcolor r g b) + (string-append "\\color[rgb]{" + (number->string r) ", " + (number->string g) ", " + (number->string b) "}")) + +;; FIXME +;; The PostScript backend saves the current color +;; during setcolor and restores it during resetcolor. +;; We don't do that here. +(define (resetcolor) + (string-append "\\color[rgb]{0,0,0}")) + (define (polygon points blotdiameter) (embedded-ps (list 'polygon `(quote ,points) blotdiameter))) diff --git a/tex/lilyponddefs.tex b/tex/lilyponddefs.tex index 169c73575b..9746d707aa 100644 --- a/tex/lilyponddefs.tex +++ b/tex/lilyponddefs.tex @@ -203,6 +203,8 @@ \fi \pagestyle{empty} + \usepackage{xcolor} + \lilypondifundefined{lilypondclassic} {%% If not in `classic' mode, undo LaTeX's page layout settings %% since LilyPond does the layout by itself. -- 2.39.2