@item latexheaders
Specify additional La@TeX{} headers file.
-
+<
Normally read from the @code{\header} block. Default value: empty.
@item latexpackages
@item papersize
The paper size (as a name, e.g. @code{a4}). It is normally read from
the @code{\paper} block.
-
-@item pagenumber
- If set to @code{no}, no page numbers will be printed. If set to a
-positive integer, start with this value as the first page number.
-
- @item fontenc
+@item fontenc
The font encoding, should be set identical to the @code{font-encoding}
property in the score.
@end table
block, then the rest of the scores will be output in numbered files,
starting with @file{filename-1.tex}. Several files can be specified;
they will each be processed independently. @footnote{The status of
- GUILE is not reset across invocations, so be careful not to change any
- system defaults from within Scheme.}
-
-We strongly advise against making LilyPond formatting available
-through a web server. That is, processing input from untrusted users,
-and returning the resulting PDF file. LilyPond is a big and complex
-program. It was not written with security in mind. Making it available
-to the outside world is a huge risk; consider the security
-implications of
-
-@verbatim
- #(system "rm -rf /")
- \score {
- c4^#(ly:export (ly:gulp-file "/etc/passwd"))
- }
-@end verbatim
+GUILE is not reset across invocations, so be careful not to change any
+system defaults from within Scheme.}
@section Command line options
@item -f,--format=@var{format}
@c
@c
-Output format for sheet music. Choices are @code{tex} (for @TeX{}
-output, to be processed with La@TeX{}, or through @code{lilypond}),
-and @code{ps} for PostScript.
+A comma separated list of output formats. Choices are @code{tex} (for
+@TeX{} output, to be processed with La@TeX{}, and @code{ps} for
+PostScript.
-Other output options are intended for developers.
+Other output options are intended for developers.
@cindex output format, setting
Set the default output file to @var{FILE}.
@item -s,--safe
-Disallow untrusted @code{\include} directives, limit available in-line
-Scheme function, disable backslashes in @TeX{}, code.
+Do not trust the @code{.ly} input.
+
+When LilyPond formatting available through a web server, the
+@code{--safe} @b{MUST} be passed. This will prevent code like
+
+@verbatim
+ #(system "rm -rf /")
+ \score {
+ c4^#(ly:export (ly:gulp-file "/etc/passwd"))
+ }
+@end verbatim
+
+The @code{--safe} option works by evaluating in-line Scheme
+expressions in a special safe module. This safe module is derived from
+GUILE @file{safe-r5rs} module, but adds a number of functions of the
+LilyPond API. These functions are listed in @file{safe-lily.scm}.
+
+In addition, @code{--safe} disallows @code{\include} directives and
+disables the use of backslashes in @TeX{} strings.
+
+In @code{--safe} mode, it is not possible to import LilyPond variables
+into Scheme.
@item -v,--version
Show version information.
;;;
;;; Try it
;;;
+;;; * If using GUILE CVS , then compile LilyPond with GUILE 1.6,
+;;;
+;;; PATH=/usr/bin/:$PATH ./configure --enable-config=g16 ; make conf=g16
+;;;
;;; * Install gnome/gtk development stuff and g-wrap, guile-gnome
;;; see buildscripts/guile-gnome.sh
;;;
;;; * Use latin1 encoding for gnome backend, do
+;;;
+;;; make -C mf conf=g16 clean
+;;; make -C mf conf=g16 ENCODING_FILE=$(kpsewhich cork.enc)
+;;; (cd mf/out && mkfontdir)i
+;;; xset +fp $(pwd)/mf/out
"
make -C mf clean
make -C mf ENCODING_FILE=$(kpsewhich cork.enc)
;;; * papersize, outputscale from book
+"
+#!/bin/bash
+
+set -ex
+
+# no CVS guile.
+export PATH=/usr/bin/:$PATH
+
+if [ -d $HOME/usr/pkg/libffi/ ] ; then
+ export LDFLAGS=-L$HOME/usr/pkg/libffi/lib/
+ export CPPFLAGS=-I$HOME/usr/pkg/libffi/include
+fi
+
+export AUTOMAKE=automake-1.8
+export AUTOCONF=autoconf2.50
+
+rm -rf test
+mkdir test
+cd test
+
+## 1. install gnome-devel (Debian/unstable: apt-get install gnome-devel)
+
+## 2. *** NOTE: use guile-1.6 for g-wrap and guile-gnome ***
+##### using GUILE CVS g-wrap/guile-gnome is experimental (read: segfaults)
+PATH=/usr/bin:$PATH
+
+
+## 3. get g-wrap 2.0
+tla register-archive a.rottmann@gmx.at--2004-main http://people.debian.org/~rotty/arch/a.rottmann@gmx.at/2004-main || true
+
+rm -rf g-wrap
+## tla get a.rottmann@gmx.at--2004-main/g-wrap--tng g-wrap
+## pull latest g-wrap from janneke -- this step is probably no longer
+## necessary when you read this
+tla register-archive janneke@gnu.org--2004-gnome http://lilypond.org/~janneke/{arch}/2004-gnome || true
+tla get janneke@gnu.org--2004-gnome/g-wrap--janneke g-wrap
+cd g-wrap
+
+rm -rf $HOME/usr/pkg/g-wrap
+sh autogen.sh --noconfigure
+mkdir =build
+cd =build
+../configure --prefix=$HOME/usr/pkg/g-wrap
+make install
+
+# cp srfi-34.scm from CVS head ? --hwn
+(cd $HOME/usr/pkg/g-wrap/share/guile/site
+ mv srfi-34.scm srfi-34.scm-g-wrap
+ cp $HOME/usr/pkg/guile/share/guile-1.7/srfi/srfi-34.scm .)
+
+cd ../..
+
+## 4. get guile-gnome
+tla register-archive guile-gnome-devel@gnu.org--2004 http://people.debian.org/~rotty/arch/guile-gnome-devel@gnu.org/2004/ || true
+rm -rf guile-gnome
+tla get guile-gnome-devel@gnu.org--2004/dists--dev guile-gnome
+cd guile-gnome
+tla build-config -r configs/gnu.org/dev
+cd src
+
+## 5. get the gnome canvas module
+tla get guile-gnome-devel@gnu.org--2004/libgnomecanvas--dev libgnomecanvas
+
+## pull latest defs from janneke -- this step is probably no longer
+## necessary when you read this
+## tla register-archive janneke@gnu.org--2004-gnome http://lilypond.org/~janneke/{arch}/2004-gnome || true
+## rm -rf defs
+## tla get janneke@gnu.org--2004-gnome/defs--janneke defs
+
+rm -rf $HOME/usr/pkg/guile-gnome
+sh autogen.sh --noconfigure
+mkdir ../=build
+cd ../=build
+
+export GUILE_LOAD_PATH=$HOME/usr/pkg/g-wrap/share/guile/site:$GUILE_LOAD_PATH
+export LD_LIBRARY_PATH=$HOME/usr/pkg/g-wrap/lib:$LD_LIBRARY_PATH
+export PKG_CONFIG_PATH=$HOME/usr/pkg/g-wrap/lib/pkgconfig:$PKG_CONFIG_PATH
+
+../src/configure --prefix=$HOME/usr/pkg/guile-gnome
+
+
+# requires 800mb RAM with -O2
+(cd gtk/gnome/gw; perl -i~ -pe 's/-O2//g' Makefile)
+
+G_WRAP_MODULE_DIR=$HOME/usr/pkg/g-wrap/share/guile/site make install
+
+export GUILE_LOAD_PATH=$HOME/usr/pkg/guile-gnome/share/guile:$GUILE_LOAD_PATH
+export LD_LIBRARY_PATH=$HOME/usr/pkg/guile-gnome/lib:$LD_LIBRARY_PATH
+
+
+# simple test
+guile -s ../src/libgnomecanvas/examples/canvas.scm
+=======
+>>>>>>> 1.21
+
(debug-enable 'backtrace)
(srfi srfi-13)
(lily)
(gnome gtk)
+<<<<<<< output-gnome.scm
+ (gnome gtk gdk-event)
+ ;; the name of the module will change to canvas rsn
+ (gnome gw libgnomecanvas))
+ ;;(gnome gw canvas))
+=======
(gnome gtk gdk-event))
;; the name of the module will change to canvas rsn
(use-modules (gnome gw canvas))
(use-modules (gnome gw libgnomecanvas)))
+>>>>>>> 1.21
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;; module entry
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;; Lily output interface --- fix silly names and docme
-
"
The output interface has functions for
* formatting stencils, and
;; minimal intercept list:
(define output-interface-intercept
+<<<<<<< output-gnome.scm
+ '(
+ no-origin
+))
+=======
'(comment
define-origin
no-origin))
+>>>>>>> 1.21
(map (lambda (x) (module-define! this-module x dummy))
output-interface-intercept)