From bcbcf02fdbddaca8f090471055f98588b8c9b8ca Mon Sep 17 00:00:00 2001 From: Han-Wen Nienhuys Date: Sat, 31 Jul 2004 21:22:42 +0000 Subject: [PATCH] * input/test/scales-greek.ly: remove. * scm/define-markup-commands.scm (score): remove debugging code. --- ChangeLog | 2 ++ input/test/cue-notes.ly | 8 -------- input/test/embedded-postscript.ly | 12 ++++------- input/test/scales-greek.ly | 33 ------------------------------- scm/define-markup-commands.scm | 9 +++++++++ scm/output-ps.scm | 5 ++++- scm/output-tex.scm | 4 ++++ 7 files changed, 23 insertions(+), 50 deletions(-) delete mode 100644 input/test/cue-notes.ly delete mode 100644 input/test/scales-greek.ly diff --git a/ChangeLog b/ChangeLog index f6cef7fa6d..c6f8411451 100644 --- a/ChangeLog +++ b/ChangeLog @@ -5,6 +5,8 @@ * input/test/clef-end-of-line.ly: fold into manual. + * input/test/scales-greek.ly: remove. + * input/test/chords-without-melody.ly: fold into manual. * input/test/cadenza-skip.ly: remove. diff --git a/input/test/cue-notes.ly b/input/test/cue-notes.ly deleted file mode 100644 index 28137d39ad..0000000000 --- a/input/test/cue-notes.ly +++ /dev/null @@ -1,8 +0,0 @@ -\version "2.3.8" -% TODO: check to see if this example can be simplified using \small -% or \tiny. -\header { texidoc = "@cindex Cue Notes -Cue notes are typeset in a smaller font. " -% Cue clefs are usually not restored explicitly. " -} - diff --git a/input/test/embedded-postscript.ly b/input/test/embedded-postscript.ly index f84c92d6e6..3917999423 100644 --- a/input/test/embedded-postscript.ly +++ b/input/test/embedded-postscript.ly @@ -8,16 +8,12 @@ insert postscript directly into the output. " } - -% -%TODO: make print-function to do this. -% - \score { \relative c'' { - a-"\\embeddedps{3 4 moveto 5 3 rlineto stroke}" - -"\\embeddedps{ [ 0 1 ] 0 setdash 3 5 moveto 5 -3 rlineto stroke}" - b-"\\embeddedps{3 4 moveto 0 0 1 2 8 4 20 3.5 rcurveto stroke}" + a-\markup { \postscript #"3 4 moveto 5 3 rlineto stroke" } + -\markup { \postscript #"[ 0 1 ] 0 setdash 3 5 moveto 5 -3 rlineto stroke " } + + b-\markup { \postscript #"3 4 moveto 0 0 1 2 8 4 20 3.5 rcurveto stroke" } s2 a'1 } diff --git a/input/test/scales-greek.ly b/input/test/scales-greek.ly deleted file mode 100644 index 2ffa40602c..0000000000 --- a/input/test/scales-greek.ly +++ /dev/null @@ -1,33 +0,0 @@ -\version "2.3.8" -\header { - texidoc = " - -In addition to major and minor keys, the key can be given also in terms -of greek, modal scales: ionian (= major), dorian, phrygian, lydian, mixolydian, -aeolian (= minor), and locrian. All these scales are in the key of C. - -" -} - -\score { { - -\key c \ionian c'8 -"C ionian, major" d'8 e'8 f'8 g'8 a'8 b'8 c''8 - -\transpose d c { \key d \dorian d'8 -"C dorian" e'8 f'8 g'8 a'8 b'8 c''8 d''8} - -\transpose e c { \key e \phrygian e'8 -"C phrygian" f'8 g'8 a'8 b'8 c''8 d''8 e''8} - -\transpose f c { \key f \lydian f'8 -"C lydian" g'8 a'8 b'8 c''8 d''8 e''8 f''8} - -\transpose g c { \key g \mixolydian g'8 -"C mixolydian" a'8 b'8 c''8 d''8 e''8 f''8 g''8} - -\transpose a c' { \key a \aeolian a8 -"C aeolian, minor" b8 c'8 d'8 e'8 f'8 g'8 a'8 } - -\transpose b c' { \key b \locrian b8 -"C locrian" c'8 d'8 e'8 f'8 g'8 a'8 b'8 } - -} - - \paper { } - \midi {} -} - diff --git a/scm/define-markup-commands.scm b/scm/define-markup-commands.scm index abcb7e3313..d67ec557e0 100644 --- a/scm/define-markup-commands.scm +++ b/scm/define-markup-commands.scm @@ -35,6 +35,7 @@ (Text_item::interpret_string paper props sym str)) + ;; TODO: use font recoding. ;; (make-line-markup ;; (map make-word-markup (string-tokenize str))))) @@ -42,6 +43,14 @@ (define-public empty-markup (make-simple-markup "")) + +(def-markup-command (postscript paper props str) + "This inserts @var{str} directly into the output as a PostScript command string." + (string?) + (ly:make-stencil + (list 'embedded-ps str) + '(0 . 0) '(0 . 0) )) + ;;(def-markup-command (fill-line paper props line-width markups) ;; (number? markup-list?) ;; no parser tag -- should make number? markuk-list? thingy diff --git a/scm/output-ps.scm b/scm/output-ps.scm index 35d850a344..1615102f6c 100644 --- a/scm/output-ps.scm +++ b/scm/output-ps.scm @@ -36,6 +36,7 @@ placebox bezier-sandwich horizontal-line + embedded-ps filledbox round-filled-box text @@ -80,6 +81,7 @@ (escape-parentheses val) ") def\n")) + (define (ps-number-def prefix key val) (let ((s (if (integer? val) (ly:number->string val) @@ -140,7 +142,8 @@ ; todo: merge with tex-font-command? - +(define (embedded-ps string) + string) (define (dot x y radius) (string-append diff --git a/scm/output-tex.scm b/scm/output-tex.scm index 253d97a26f..4ea8fbe77d 100644 --- a/scm/output-tex.scm +++ b/scm/output-tex.scm @@ -75,6 +75,10 @@ (define (dot x y radius) (embedded-ps (list 'dot x y radius))) + +(define (embedded-ps string) + (embedded-ps (list 'embedded-ps string))) + (define (white-dot x y radius) (embedded-ps (list 'white-dot x y radius))) -- 2.39.5