+2005-01-08 Han-Wen Nienhuys <hanwen@xs4all.nl>
+
+ * lily/pango-select.cc (symbol_to_pango_variant): init local variable.
+
+ * Documentation/user/examples.itely (String quartet): uncomment
+ broken example.
+
+ * lily/font-config.cc: new file.
+
2005-01-08 Jan Nieuwenhuizen <janneke@gnu.org>
* scm/output-svg.scm:
This template demonstrates a string quartet. It also uses a @code{\global}
section for time and key signatures.
-@lilypond[quote,verbatim,raggedright]
+@ignore
+@li lypond[quote,verbatim,raggedright]
version "2.4.0"
global= {
\midi { \tempo 4=60}
}
@end lilypond
-
+@end ignore
@subsection String quartet parts
/* Bug in option parser: --output =foe is taken as an abbreviation
for --output-format. */
{_i ("EXT"), "backend", 'b', _i ("select back-end to use")},
- {_i ("EXTs"), "format", 'f', _i ("list of formats to dump")},
+ {_i ("EXTs"), "formats", 'f', _i ("list of formats to dump")},
{0, "help", 'h', _i ("print this help")},
{_i ("FIELD"), "header", 'H', _i ("write header field to BASENAME.FIELD")},
{_i ("DIR"), "include", 'I', _i ("add DIR to search path")},
PangoStyle pstyle = PANGO_STYLE_NORMAL;
if (style == ly_symbol2scm ("italic"))
{
- pstyle = PANGO_STYLE_NORMAL;
+ pstyle = PANGO_STYLE_ITALIC;
}
else if (style == ly_symbol2scm ("oblique")
|| style == ly_symbol2scm ("slanted")
PangoVariant
symbol_to_pango_variant (SCM variant)
{
- PangoVariant pvariant;
+ PangoVariant pvariant = PANGO_VARIANT_NORMAL;
if (variant == ly_symbol2scm ("caps"))
{
pvariant = PANGO_VARIANT_SMALL_CAPS;
LILYPOND = $(builddir)/lily/$(outconfbase)/lilypond
LILYPOND_BOOK = $(script-dir)/lilypond-book.py
LILYPOND_BOOK_INCLUDES = -I $(pwd) -I $(outdir) -I$(input-dir) -I $(input-dir)/regression/ -I $(input-dir)/test/ -I $(input-dir)/tutorial/ -I $(builddir)/mf/$(outconfbase)/ -I $(builddir)/mf/out/
-LILYPOND_BOOK_FLAGS = --process="lilypond -f tex --tex --header=texidoc -I $(srcdir)/input/test -e '(ly:set-option (quote internal-type-checking) \#t)'"
+LILYPOND_BOOK_FLAGS = --process="lilypond --backend tex --formats=tex --header=texidoc -I $(srcdir)/input/test -e '(ly:set-option (quote internal-type-checking) \#t)'"
#texi-html for www only:
LILYPOND_BOOK_FORMAT=$(if $(subst out-www,,$(notdir $(outdir))),texi,texi-html)
(srfi srfi-13)
(lily))
-(define-public (output-framework outputter book scopes fields basename)
- (ly:outputter-dump-string outputter ";; raw SCM output\n")
+(define-public (output-framework basename book scopes fields )
+ (let*
+ ((file (open-output-file (format "~a.scm" basename))))
+
+ (display ";; raw SCM output\n" file)
(for-each
(lambda (page)
- (ly:outputter-dump-string
- outputter ";;;;;;;;;;;;;;;;;;;;;;;;;;\n;;;PAGE\n")
- (ly:outputter-dump-string
- outputter
- (call-with-output-string
- (lambda (port)
- (pretty-print (ly:stencil-expr page) port)))))
- (ly:paper-book-pages book)))
+ (display
+ ";;;;;;;;;;;;;;;;;;;;;;;;;;\n;;;PAGE\n" file)
+ (pretty-print (ly:stencil-expr page) file))
+ (ly:paper-book-pages book))))
(define-public (convert-to-ps . args) #t)
")
-(define-public (output-classic-framework outputter book scopes fields basename)
- (let* ((paper (ly:paper-book-paper book))
+(define-public (output-classic-framework basename book scopes fields)
+ (let* ((filename (format "~a.texstr" basename))
+ (outputter (ly:make-paper-outputter filename
+ (ly:output-backend)))
+ (paper (ly:paper-book-paper book))
(lines (ly:paper-book-systems book))
)
(ly:outputter-dump-string outputter (header basename))
lines)
(ly:outputter-dump-string outputter (footer))))
-(define-public (output-framework outputter book scopes fields basename)
- (let* ((paper (ly:paper-book-paper book))
+(define-public (output-framework basename book scopes fields )
+ (let* ((filename (format "~a.texstr" basename))
+ (outputter (ly:make-paper-outputter filename
+ (ly:output-backend)))
+ (paper (ly:paper-book-paper book))
(pages (ly:paper-book-pages book))
)
(ly:outputter-dump-string outputter (header basename))
(define-public point-and-click #f)
(define-public tex-backend?
- (memq (ly:output-backend) '("texstr" "tex")))
+ (member (ly:output-backend) '("texstr" "tex")))
(define-public parser #f)
(ly:numbers->string
(list x y width height blotdiam)) " draw_round_box"))
-(define (old-text font s)
- ;; ugh, we should find a better way to
- ;; extract the hsbw for /space from the font.
- (let* ((space-length (cdar (ly:text-dimension font " ")))
- (commands '())
- (add-command (lambda (x) (set! commands (cons x commands)))))
-
- (string-fold
- (lambda (chr word)
- "Translate space as into moveto, group the rest in words."
- (if (and (< 0 (string-length word))
- (equal? #\space chr))
- (add-command
- (string-append "(" (ps-encoding word) ") show\n")))
-
- (if (equal? #\space chr)
- (add-command (string-append (number->string space-length)
- " 0.0 rmoveto ")))
-
- (if (equal? #\space chr)
- ""
- (string-append word (make-string 1 chr))))
- ""
- (string-append s " "))
-
- (string-append
- (ps-font-command font) " setfont "
- (string-join (reverse commands)))))
-
-(define (new-text font s)
+(define (text font s)
+; (ly:warn "TEXT backend-command encountered in Pango backend\nargs: ~a ~a" font str)
+
(let* ((space-length (cdar (ly:text-dimension font " ")))
(space-move (string-append (number->string space-length)
" 0.0 rmoveto "))
(string-append "/" (symbol->string sym) " glyphshow")))
out-vec))))))
-;;(define text old-text)
-(define (text font str)
- (ly:warn "TEXT backend-command encountered in Pango backend\nargs: ~a ~a" font str)
- (new-text font str))
-
;; FIXME: BARF helvetica?
(define (white-text scale s)
(let ((mystring (string-append
TODO:
* ly-options: intertext?
* --linewidth?
- * eps in latex / eps by lilypond -fps?
+ * eps in latex / eps by lilypond -b ps?
* check latex parameters, twocolumn, multicolumn?
* use --png --ps --pdf for making images?
# it is too generic for lilypond-book.
if texstr_names and re.search ('^[0-9A-Za-z/]*lilypond', cmd):
- my_system (string.join ([cmd + ' -f texstr ' ] + texstr_names))
+ my_system (string.join ([cmd + ' --backend texstr ' ] + texstr_names))
for l in texstr_names:
my_system ('latex %s.texstr' % l)