+2002-07-19 Han-Wen <hanwen@cs.uu.nl>
+
+ * scm/engraver-documentation-lib.scm
+ (document-property-operation): add properties to context
+ documentation.
+
+ * scm/documentation-lib.scm (pad-string-to): align info menus.
+
2002-07-18 Jan Nieuwenhuizen <janneke@gnu.org>
* debian/GNUmakefile: Remove lilypond.links.
* stepmake/stepmake/c-vars.make (ALL_CFLAGS): Include CFLAGS.
-
2002-07-17 Han-Wen <hanwen@cs.uu.nl>
* GNUmakefile.in: distribute lexer-gcc-3.1.sh as well
Other symbols can be added using the syntax
@var{note}@code{-\}@var{name}. Again, they can be forced up or down
using @code{^} and @code{_}.
+
+@cindex accent
+@cindex marcato
+@cindex staccatissimo
+@cindex fermata
+@cindex stopped
+@cindex staccato
+@cindex tenuto
+@cindex upbow
+@cindex downbow
+@cindex foot marks
+@cindex organ pedal marks
+@cindex turn
+@cindex open
+@cindex flageolet
+@cindex reverseturn
+@cindex trill
+@cindex prall
+@cindex mordent
+@cindex prallprall
+@cindex prallmordent
+@cindex prall, up
+@cindex prall, down
+@cindex mordent
+@cindex thumb marking
+@cindex segno
+@cindex coda
+
@lilypond[]
\score {
<
@end lilypond
-The syntax is as follows.
-@example
- \grace @var{musicexpr}
-@end example
-
Unbeamed eighth notes and shorter by default have a slash through the
-stem.
+stem. This can be controlled with grob property @code{flag-style} of
+@internalsref{Stem}. The change in formatting is accomplished by
+inserting @code{\startGraceMusic} before handling the grace notes, and
+@code{\stopGraceMusic} after finishing the grace notes. You can add to
+these definitions to globally change grace note formatting. The
+standard definitions are in @file{ly/grace-init.ly}.
+
@lilypond[fragment,verbatim]
\relative c'' \context Voice {
}
SCM
-Translator_def::to_alist ()const
+Translator_def::to_alist () const
{
SCM l = SCM_EOL;
;;; Add this to your ~/.emacs or ~/.emacs.el
;;; (load-library "lilypond-mode.el")
;;; (setq auto-mode-alist
-;;; (append '(("\\.ly$" . LilyPond-mode) auto-mode-alist)))
+;;; (cons '("\\.ly$" . LilyPond-mode) auto-mode-alist))
;;;
(load-library "lilypond-font-lock")
%
% Running LilyPond on this file generates the documentation
%
-#(eval-string (ly-gulp-file "generate-documentation.scm"))
+#(load-from-path "generate-documentation.scm")
(debug-enable 'backtrace)
+
(define (tex-encoded-fontswitch name-mag)
(let* ((iname-mag (car name-mag))
(ename-mag (cdr name-mag)))
(if (not (defined? 'standalone))
(begin
-; (debug-enable 'backtrace)
-
(load "standalone.scm")
(define (number-pair? x)
"\n@end table\n"))
(define (texi-menu items-alist)
+ (let
+ (
+ (maxwid (apply max (map (lambda (x) (string-length (car x)))
+ items-alist)))
+ )
+
+
+
(string-append
"\n@menu"
(apply string-append
- (map (lambda (x) (string-append "\n* " (car x) ":: " (cdr x)))
+ (map (lambda (x)
+ (string-append
+ (pad-string-to
+ (string-append "\n* " (car x) ":: ")
+ (+ maxwid 8)
+ )
+ (cdr x))
+ )
items-alist))
"\n@end menu\n"
;; Menus don't appear in html, so we make a list ourselves
(description-list->texi (map (lambda (x) (cons (ref-ify (car x)) (cdr x)))
items-alist))
"\n@end ifhtml\n"
- "\n@end ignore\n"))
+ "\n@end ignore\n")))
(define (texi-node-menu name items-alist)
(texi-section 1 name #f)
(texi-menu items-alist)))
+
+(define (pad-string-to str wid)
+ (string-append str (make-string (max (- wid (string-length str)) 0) #\ ))
+ )
+
(define (texi-file-head name file-name top items-alist)
+
+
(string-append
"\\input texinfo @c -*-texinfo-*-"
"\n@setfilename " file-name ".info"
)
))
+(define (document-property-operation op)
+ (let
+ ((tag (car op))
+ (body (cdr op))
+ (sym (cadr op))
+ )
+
+ (cond
+ ((equal? tag 'push)
+ (string-append
+ "@item "
+ (if (null? (cddr body))
+ "Revert "
+ "Set "
+ )
+ "grob-property "
+ (symbol->string (cadr body))
+ " in " (symbol->string sym)
+ (if (not (null? (cddr body)))
+ (string-append " to " (scm->texi (cadr (cdr body))))
+ )
+ "\n"
+ )
+
+ )
+ ((equal? (object-property sym 'is-grob?) #t) "")
+ ((equal? (car op) 'assign)
+ (string-append
+ "@item Set translator property "
+ (symbol->string (car body))
+ " to "
+ (scm->texi (cadr body))
+ "\n"
+ )
+ )
+ )
+ ))
+
+
+
(define (context-doc-string context-desc)
(let*
(
(cdr (assoc 'consists context-desc))
(cdr (assoc 'end-consists context-desc))
))
+ (props (cdr (assoc 'property-ops context-desc)))
(grobs (context-grobs context-desc))
(grob-refs (map (lambda (x) (ref-ify x)) grobs))
)
"\n\nThis context creates the following grobs: \n\n"
(human-listify (uniq-list (sort grob-refs string<? )))
"."
+ (if (pair? props)
+ (string-append
+ "\n\nThis context sets the following properties:\n"
+ "@itemize @bullet\n"
+ (apply string-append (map document-property-operation props))
+ "@end itemize\n"
+ )
+ ""
+ )
(if (null? accepts)
- "This context is a `bottom' context; it can not contain other contexts."
+ "\n\nThis context is a `bottom' context; it can not contain other contexts."
(string-append
"\n\nContext "
name " can contain \n"
;;; Running LilyPond on this file generates the documentation
+(debug-enable 'backtrace)
+
;;;;;;;;;;;;;;;;
;; are described...
(define no-copies #f)
-
-
(let* ((doc (string-append
- (document-music "music properties")
- (document-paper "interpretation contexts")
- (document-all-engravers "engravers")
- (document-all-engraver-properties "context properties")
- (document-all-grobs "grob overview")
- (document-all-interfaces "interfaces")
+ (document-music "Music properties")
+ (document-paper "Contexts")
+ (document-all-engravers "Engravers")
+ (document-all-engraver-properties "Context properties")
+ (document-all-grobs "Grob overview")
+ (document-all-interfaces "Interfaces")
- (node "backend properties")
- (texi-section 1 "backend properties" #f)
+ (node "Backend properties")
+ (texi-section 1 "Backend properties" #f)
- (document-all-backend-properties "backend properties")
+ (document-all-backend-properties "Backend properties")
- (node "function documentation")
- (texi-section 1 "function documentation" #f)
+ (node "Function documentation")
+ (texi-section 1 "Function documentation" #f)
(document-all-scheme-functions)
;; we can't use (dir) and top if we're included by lilypond.tely
"LilyPond internals" name "(lilypond.info)"
'(
- ("music properties" . "properties for Music representation")
- ("interpretation contexts" . "Hierarchy and grouping of Engravers")
- ("engravers" . "Engravers create Grobs")
- ("context properties" . "context properties")
- ("grob overview" . "Detailed description of all Grobs")
- ("interfaces" . "Grob Interfaces")
- ("backend properties" . "Grob properties")
- ("function documentation" . "All embedded functions")
+ ("Music properties" . "properties for Music representation")
+ ("Contexts" . "Hierarchy and grouping of Engravers")
+ ("Engravers" . "Engravers create Grobs")
+ ("Context properties" . "context properties")
+ ("Grob overview" . "Detailed description of all Grobs")
+ ("Interfaces" . "Grob Interfaces")
+ ("Backend properties" . "Grob properties")
+ ("Function documentation" . "All embedded functions")
("Index" . "index")
))
(map (lambda (x)
; (display (car x)) (newline)
- (set-object-property! (car x) 'translation-type? list?))
+ (set-object-property! (car x) 'translation-type? list?)
+ (set-object-property! (car x) 'is-grob? #t))
all-grob-descriptions)
slur dir) -> attachment to determine the attachment (see above). If
procedure returns #t, attachment is used. Otherwise, the next
procedure is tried.")
-(grob-property-description 'flag-style string? "turn stroke through stem on/off.")
+(grob-property-description 'flag-style string? "set to \"grace\" to turn stroke through stem on.")
(grob-property-description 'flag-width-function procedure? "Procedure that computes the width of a half-beam (a non-connecting beam.).")
(grob-property-description 'flexa-width number? "width of a flexa shape in a ligature grob.")
(grob-property-description 'font-family symbol? "partial font