]> git.donarmstrong.com Git - lilypond.git/commitdiff
lilypond-1.1.15
authorfred <fred>
Tue, 26 Mar 2002 21:45:20 +0000 (21:45 +0000)
committerfred <fred>
Tue, 26 Mar 2002 21:45:20 +0000 (21:45 +0000)
Documentation/man/mudela-book.yo
Documentation/tex/mudela-book-doc.doc
init/GNUmakefile
lily/chord-name-engraver.cc
scripts/mudela-book.py

index b636b5e7e5b367b045d0accd415b20770124487c..03035a61aac58ad898ee076abc568fd5b96db2de 100644 (file)
@@ -21,18 +21,8 @@ fragments of mudela in your source file, and includes the results into
 document that can be processed with LaTeX.  The result is a text
 document with formatted music integrated.
 
-Lilypond will create a directory to put temporary files, the default
-dir name is file(out). When you run mudela on a file, like this:
-
-verb(mudelab-book myfile.tex)
-
-the a file file(out/myfile.latex) will be created. And to create
-the file(.dvi) file you should type:
-
-verb(latex out/myfile.latex)
-
-This will create file(myfile.dvi) in the current directory. Bad things
-will happen if you cd to file(out) and then runs verb(latex myfile.latex)
+Lilypond will by default create all output files in directory file(out).
+The file to give to latex has ext file(.latex).
 
 bf(About the input)
 
@@ -53,16 +43,17 @@ to whatever he wants.
 code(\begin) takes the following options:
 
 description(
-dit(floating)
-    the created graphics can be inserted in the middle of a text line, 
-    not only as a separate paragraph
-dit(fragment)
-    mudela-book adds some redtape. You
-    can substitute voice-contents for CONTENTS in this case.
+dit(eps)
+    the music is created as eps graphics that can be inserted in 
+    the middle of a text line, not only as a separate paragraph
 dit(verbatim)
     CONTENTS is copied into the TeX source enclosed in a verbatim block.
 dit(11pt, 13pt, 16pt, 20pt, 26pt)
     set the fontsize to use for the music
+dit(fragment)
+dit(nonfragment)
+    Override mudela-book autodetection of what type of code is in the
+    mudela block, voice contents or complete code.
 )
 
 
@@ -70,16 +61,16 @@ manpageoptions()
 
 startdit()
 
-dit(--mudela-fontsize)
+dit(--default-mudela-fontsize=??pt)
     Set the fontsize to use for mudela if no fontsize is given
     as option.
-dit(--force-mudela-fontsize)
+dit(--force-mudela-fontsize=??pt)
     Force all mudela to use this fontsize, overriding options
     given to \begin{mudela}
-dit(--outname)
+dit(--outname=FILE)
     The name of LaTeX() file to output. If this option  is not given,
 the output name derived from the input name.
-dit(--outdir)
+dit(--outdir=DIRECTORY)
     The directory to output lilypond output and input to.
 dit(--help)
        Print a short help message
@@ -87,12 +78,13 @@ dit(--dependencies)
         Write dependencies to outdir/filename.dep
 dit(--force-verbatim)
        Make all mudela verbatim.
+dit(--initfile=FILE)
+        read command definitions from file(FILE)
 enddit()
 
 manpagefiles()
-  You have to install LaTeX. file(mudela-book) is not tested on LaTeX 2.09
-  and will probably fail on something else than LaTeX2e.
-
+  See file(Documentation/tex/out/mudela-book-doc.dvi) for more info.
+  You have to install LaTeX.
   file(mudela-book) is written in  python 1.5, so you have to install 
   url(python)(http://www.python.org).
 
@@ -104,7 +96,8 @@ You get trouble if you use the --force-verbatim option and have some
 music in \footnote{...} or \marginpar{...}.
 
 Ignores almost all LaTeX commands that changes margins and linewidths.
-  
+
+file(\begin{verbatim}) is ignored.
 manpageauthor()
 
 nemail(Han-Wen Nienhuys)(hanwen@cs.uu.nl), lurl(http://www.cs.uu.nl/people/hanwen)
index 3aa58bedb9afee987dd6d1d106f9a57c17b3ffc0..cd5591adfdf629e3d8c915ff00f22ba90bbbf085 100644 (file)
@@ -12,6 +12,8 @@
 \maketitle
 %\printparam
 
+\section{Introduction}
+
 Mudela-book is a script that process your \LaTeX~file and with great
 help from GNU LilyPond it translates blocks of mudela code it finds
 inside \verb|mudela| environments to tex or eps graphics. It then
@@ -157,27 +159,12 @@ To avoid that \LaTeX~places the music on a line of its one, there should
 be no empty lines between the normal text and the mudela
 environment. 
 
-There is an even shorter way to write small musical fragments. This
-triad, \mudela{<c' e' g'>}, was created with this code:
-\verb|\mudela{<c' e' g'>}|
-
-Mudela-book let you define your own commands, see the file 
-\verb|mudela-book-defs.py|. In a later version, it will be possible to
-have your own file that defines new commands. To print small rhythms
-like this, \mudelaRhythm{c4 r8 [c16 c] c4 c}, the default 
-\verb|mudela-book-defs.py| also defines a command \verb|mudelaRhythm|. 
-The last music was created like this:
-\verb|\mudelaRhytm{c4 r8 [c16 c] c4 c}|. This feature is higly
-experimental, so Things Will Change.
-
-The last example show that we need options to change the
+\section{Fontsize options}
+You can use all lilypond fontsizes in mudela-book. 
 % LONG line just to test multiple mudela on one line
-fontsize of the music. 11pt, \mudela[11pt]{<c' e' g'>} or 13pt, \mudela[13pt]{<c' e' g'>} is probably a better fontsize
-if you include music in the middle of the text. The code looks like this:
-\verb|\mudela[11pt]{<c' e' g'>}|
-
-or
-\begin{mudela}[13pt, verbatim]
+The default 16pt fontsize, \mudela{<c' e' g'>}, is probably to big to be included in the middle of the text. 11pt, \mudela[11pt]{<c' e' g'>} or 13pt, \mudela[13pt]{<c' e' g'>} is probably better.
+The code can look like this:
+\begin{mudela}[13pt, eps, verbatim]
 <c' e' g'>
 \end{mudela}
 
@@ -220,6 +207,68 @@ The following options set the fontsize:
 \end{mudela}
 \end{itemize}
 
+\section{User defined commands}
+There is an even shorter way to write small musical fragments. This
+triad, \mudela{<c' e' g'>}, was created with this code:
+\verb|\mudela{<c' e' g'>}|
+
+Mudela-book defines the \verb|\mudela| command, and let you define
+your own commands in a file specified by 
+the command line option \verb|--initfile=filename|. The format for the
+file is a definition of a python dictionary:
+% mudela-book should really respect \begin{verbatim}
+
+\verb|{    'mudela': r"""|
+
+\verb|\begin|\verb|{mudela}[eps \fontoptions]|
+
+\verb|    \maininput|
+
+\verb|\end|\verb|{mudela}|
+
+\verb|""",|
+
+\verb|    'mudelaRhythm': r"""|
+
+\verb|\begin|\verb|{mudela}[eps \fontoptions]|
+\begin{verbatim}
+\score{
+    \type RhythmicStaff{
+        \notes{\stemup \maininput}
+    }
+    \paper{linewidth = -1.\cm;}
+}
+\end{verbatim}
+\verb|\end|\verb|{mudela}|
+
+\verb|"""|
+
+\verb|}|
+
+The above code show how \verb|\mudela| could have been defined, and
+also defines a new command \verb|mudelaRhythm|. Notice that you can
+send fontsize options to the defined commands. 
+\verb|\mudelaRhytm[11pt]{c4 c8 [c16 c] c4 c}| produce this music:
+\begin{mudela}[eps, 11pt]
+\score{
+  \type RhythmicStaff{
+    \notes{ \stemup c4 r8 [c16 c] c4 c }
+  }
+  \paper{linewidth = -1.\cm;}
+}
+\end{mudela}
+
+\section{Just in case...}
+The options \verb|fragment| and \verb|nonfragment| will override
+mudela-book when it scans the mudela code to see if it is staff
+contents or complete code. This might be useful if mudela-book choose
+wrong. 
+
+Since there is no finder's fee which doubles every year, there is no
+need to wait for the price money to grow. So send a bug report today
+if you need this one of this options.
+
+\section{Examples}
 This was all options to \verb|\begin{mudela}|. The rest of the
 document will show some ways you can use mudela in
 \LaTeX~documents. It will also act as a simple test-suite for
@@ -244,7 +293,7 @@ and marginspars just as any other included eps graphics.
        r4-\fermata [b16-.( )b-.] [f'8-- dis16-.( )dis-. gis8--]
        [f16-.( )f-. dis8-- gis16-.( )gis-.] cis4.-\fermata |
        
-       r4.-\fermata [cis,16 cis g'8 f16 f b][g16 g f8 b16 b] dis4.-\fermata
+       r4.-\fermata [cis,16 cis g'8 f16 f b8][g16 g f8 b16 b] dis4.-\fermata
   }
   \paper{linewidth = 7.\cm;}
 }
@@ -253,7 +302,7 @@ and marginspars just as any other included eps graphics.
 
 To the right you can see some bars from the trumpet fanfara from the
 beginning of the fantastic street opera ``Houdini the Great'', by the
-danish composer Andy Pape.  The music is put inside a
+danish composer Andy Pape. The music is put inside a
 \verb|floatingfigure| environment, and the music will be aligned by
 the right marging if you set floatingfigure width and mudela linewidth
 to the same value. The code looks like this:
@@ -266,7 +315,7 @@ to the same value. The code looks like this:
     r4.-\fermata [b16-.( )b-.] [f'8-- dis16-.( )dis-. gis8--]
     [f16-.( )f-. dis8-- gis16-.( )gis-.] cis8.-\fermata |
        
-    r4.-\fermata [cis,16 cis g'8 f16 f b]
+    r4.-\fermata [cis,16 cis g'8 f16 f b8]
     [g16 g f8 b16 b] dis4.-\fermata
   }
   \paper{linewidth = 7.\cm;}
index 1157e404daf46cba6d660d7d2c765520338f1f7b..6513297576c50209155a431b3cd6c498a3da6941 100644 (file)
@@ -3,8 +3,7 @@
 depth = ..
 
 INI_FILES = $(FLY_FILES) $(LY_FILES)
-PY_FILES=$(wildcard *.py)
-EXTRA_DIST_FILES = $(SCM_FILES)  $(PY_FILES)
+EXTRA_DIST_FILES = $(SCM_FILES)
 
 INSTALLATION_DIR=$(datadir)/ly/
 INSTALLATION_FILES=$(INI_FILES)
index 133f91ae6423607948bcd85ff75da6376dac9507..46bee3b37c45217ea2abed73665012416cd58905 100644 (file)
@@ -50,14 +50,13 @@ Chord_name_engraver::do_process_requests ()
   /*
    Banter style chord names (almost).
    TODO:
-     - don't print inclusive scale (i.e. no "9" in c 9/11)
-     - handle c7 / cmaj7
-     - use #,b iso -es -is on tonica
+     - move this stuff to new Item class Chord_name
      - switch on property, add american (?) chordNameStyle
+     - jazz inversions
 
   Scalar chordNameStyle = get_property ("chordNameStyle");
-  if (chordNameStyle == "Banner")
-     chord = pitches_to_banner (pitch_arr_.size ());
+  if (chordNameStyle == "Banter")
+     chord = pitches_to_banter (pitch_arr_));
 
    */
 
index 98fb69f81ea44b09d479f1904b0f080f90a787fc..e79f120c807b2fee5834b925c60cea2811e8132f 100644 (file)
 #   - mudela-book will scan the mudela code to find out if it has to add
 #     paper-definition and \score{\notes{...}}
 #   - possible to define commands that look like this: \mudela{ c d e }
+# 0.5.1:
+#   - removed init/mudela-book-defs.py, \mudela is defined inside mudela-book
+#   - fragment and nonfragment options will override autodetection of type of
+#     in mudela-block (voice contents or complete code)
 
 import os
 import string
@@ -45,7 +49,7 @@ import sys
 
 outdir = 'out'
 initfile = ''
-program_version = '0.5'
+program_version = '0.5.1'
 
 out_files = []
 
@@ -592,24 +596,11 @@ def main():
     if outdir[-1:] != '/':
         outdir = outdir + '/'
 
-    std_init_filename = ''
-    for p in string.split(os.environ['LILYINCLUDE'], ':'):
-        try:
-            std_init_filename =  p+os.sep+'mudela-book-defs.py'
-            break
-        except:
-            continue
-    defined_mudela_cmd_re = {}
-    try:
-       f = open(std_init_filename)
-       s = f.read()
-       f.close()
-       defined_mudela_cmd = eval(s)    # UGH
-    except IOError, w:
-        sys.stderr.write("%s (`%s')\n" % (w[1], std_init_filename))
-#        sys.exit(1)
-
-
+    defined_mudela_cmd = {'mudela': r"""
+\begin{mudela}[eps \fontoptions]
+    \maininput
+\end{mudela}
+"""}
     if initfile != '':
         f = open(initfile)
         s = f.read()
@@ -618,7 +609,6 @@ def main():
         for i in d.keys():
             defined_mudela_cmd[i] = d[i]
         del d
-
     c = defined_mudela_cmd.keys()[0]
     for x in defined_mudela_cmd.keys()[1:]:
         c = c + '|'+x