Left: | ||
Right: |
OLD | NEW |
---|---|
1 ;;;; This file is part of LilyPond, the GNU music typesetter. | 1 ;;;; This file is part of LilyPond, the GNU music typesetter. |
2 ;;;; | 2 ;;;; |
3 ;;;; Copyright (C) 2004--2011 Han-Wen Nienhuys <hanwen@xs4all.nl> | 3 ;;;; Copyright (C) 2004--2011 Han-Wen Nienhuys <hanwen@xs4all.nl> |
4 ;;;; | 4 ;;;; |
5 ;;;; LilyPond is free software: you can redistribute it and/or modify | 5 ;;;; LilyPond is free software: you can redistribute it and/or modify |
6 ;;;; it under the terms of the GNU General Public License as published by | 6 ;;;; it under the terms of the GNU General Public License as published by |
7 ;;;; the Free Software Foundation, either version 3 of the License, or | 7 ;;;; the Free Software Foundation, either version 3 of the License, or |
8 ;;;; (at your option) any later version. | 8 ;;;; (at your option) any later version. |
9 ;;;; | 9 ;;;; |
10 ;;;; LilyPond is distributed in the hope that it will be useful, | 10 ;;;; LilyPond is distributed in the hope that it will be useful, |
11 ;;;; but WITHOUT ANY WARRANTY; without even the implied warranty of | 11 ;;;; but WITHOUT ANY WARRANTY; without even the implied warranty of |
12 ;;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 12 ;;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
13 ;;;; GNU General Public License for more details. | 13 ;;;; GNU General Public License for more details. |
14 ;;;; | 14 ;;;; |
15 ;;;; You should have received a copy of the GNU General Public License | 15 ;;;; You should have received a copy of the GNU General Public License |
16 ;;;; along with LilyPond. If not, see <http://www.gnu.org/licenses/>. | 16 ;;;; along with LilyPond. If not, see <http://www.gnu.org/licenses/>. |
17 | 17 |
18 (define-module (scm framework-ps)) | 18 (define-module (scm framework-ps) |
19 #:use-module (scm markup-facility-defs) | |
20 #:duplicates (replace)) | |
dak
2012/01/02 14:04:39
What is with the duplicate? Should this be fixed?
Ian Hulin (gmail)
2012/01/02 21:19:24
Some modules occasionally need to re-import (lily)
| |
19 | 21 |
20 ;;; this is still too big a mess. | 22 ;;; this is still too big a mess. |
21 | 23 |
22 (use-modules (ice-9 string-fun) | 24 (use-modules (ice-9 string-fun) |
23 (guile) | 25 (guile) |
24 (scm page) | 26 (scm page) |
25 (scm paper-system) | 27 (scm paper-system) |
26 (srfi srfi-1) | 28 (srfi srfi-1) |
27 (srfi srfi-13) | 29 (srfi srfi-13) |
28 (scm clip-region) | 30 (scm clip-region) |
(...skipping 388 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
417 ;; First, call ly:encode-string-for-pdf to encode the string (latin1 or | 419 ;; First, call ly:encode-string-for-pdf to encode the string (latin1 or |
418 ;; utf-16be), then escape all parentheses and backslashes | 420 ;; utf-16be), then escape all parentheses and backslashes |
419 ;; FIXME guile-2.0: use (string->utf16 str 'big) instead | 421 ;; FIXME guile-2.0: use (string->utf16 str 'big) instead |
420 | 422 |
421 (ps-quote (ly:encode-string-for-pdf val))) | 423 (ps-quote (ly:encode-string-for-pdf val))) |
422 (define (metadata-lookup-output overridevar fallbackvar field) | 424 (define (metadata-lookup-output overridevar fallbackvar field) |
423 (let* ((overrideval (ly:modules-lookup (list header) overridevar)) | 425 (let* ((overrideval (ly:modules-lookup (list header) overridevar)) |
424 (fallbackval (ly:modules-lookup (list header) fallbackvar)) | 426 (fallbackval (ly:modules-lookup (list header) fallbackvar)) |
425 (val (if overrideval overrideval fallbackval))) | 427 (val (if overrideval overrideval fallbackval))) |
426 (if val | 428 (if val |
427 » (format port "/~a (~a)\n" field (metadata-encode (markup->string val)) )))) | 429 » (fancy-format port "/~a (~a)\n" field (metadata-encode (markup->string val)))))) |
dak
2012/01/02 14:04:39
Why would we need fancy-format here? The format c
Ian Hulin (gmail)
2012/01/02 21:19:24
Another weirdo. Also reverted on my local reposito
| |
428 (display "[ " port) | 430 (display "[ " port) |
429 (metadata-lookup-output 'pdfcomposer 'composer "Author") | 431 (metadata-lookup-output 'pdfcomposer 'composer "Author") |
430 (format port "/Creator (LilyPond ~a)\n" (lilypond-version)) | 432 (format port "/Creator (LilyPond ~a)\n" (lilypond-version)) |
431 (metadata-lookup-output 'pdftitle 'title "Title") | 433 (metadata-lookup-output 'pdftitle 'title "Title") |
432 (metadata-lookup-output 'pdfsubject 'subject "Subject") | 434 (metadata-lookup-output 'pdfsubject 'subject "Subject") |
433 (metadata-lookup-output 'pdfkeywords 'keywords "Keywords") | 435 (metadata-lookup-output 'pdfkeywords 'keywords "Keywords") |
434 (metadata-lookup-output 'pdfmodDate 'modDate "ModDate") | 436 (metadata-lookup-output 'pdfmodDate 'modDate "ModDate") |
435 (metadata-lookup-output 'pdfsubtitle 'subtitle "Subtitle") | 437 (metadata-lookup-output 'pdfsubtitle 'subtitle "Subtitle") |
436 (metadata-lookup-output 'pdfcomposer 'composer "Composer") | 438 (metadata-lookup-output 'pdfcomposer 'composer "Composer") |
437 (metadata-lookup-output 'pdfarranger 'arranger "Arranger") | 439 (metadata-lookup-output 'pdfarranger 'arranger "Arranger") |
(...skipping 250 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
688 | 690 |
689 lilypond -dbackend=eps FILE | 691 lilypond -dbackend=eps FILE |
690 | 692 |
691 If have cut & pasted a lilypond fragment from a webpage, be sure | 693 If have cut & pasted a lilypond fragment from a webpage, be sure |
692 to only remove anything before | 694 to only remove anything before |
693 | 695 |
694 %% **************************************************************** | 696 %% **************************************************************** |
695 %% Start cut-&-pastable-section | 697 %% Start cut-&-pastable-section |
696 %% **************************************************************** | 698 %% **************************************************************** |
697 "))) | 699 "))) |
OLD | NEW |