1 \documentclass[a4paper, 12pt, oneside]{article}
3 \usepackage{t1enc,isolatin1}
5 %\usepackage{showframe}
7 \def\postMudelaExample{}
11 Mudela-book is a script that process your \LaTeX ~file and
12 with great help from GNU LilyPond
13 translates blocks of mudela code it finds inside \verb|mudela|
14 environment to tex or eps graphics. It then creates a new
15 file that can be sent through \LaTeX~ to create a document with
16 lines of music integrated with text.
18 So what does this look like? Well, here is a really
21 \begin{mudela}[fragment, verbatim]
22 \relative c'{c4 d e f | g2 g}
25 As you can see the mudela code is put inside a environment
26 called \verb|mudela|, shouldn't be too difficult to remember.
27 If you have never heard about \LaTeX, Mudela or that stuff
28 about environment, you should probably read some other manuals
31 The code above produces this music:
33 \begin{mudela}[fragment]
34 \relative c' {c4 d e f | g2 g }
37 The parameter \verb|fragment| means that mudela-book will insert
38 some red tape for you. There are one thing to remember. Currently
39 \verb|fragment|s don't know about margins and line width, so if
40 you type more than a few bars and want a line break, you can not
41 use \verb|fragment|. The \verb|verbatim| parameter is used to
42 make mudela-book print the mudela source instead of the
43 music. The parameter will probably not be visible in later versions
46 There are some conventions to follow to make the music respect
47 margins. You have to use \verb|\default_paper| as your paper,
48 to make mudela-book adjust the music to reach from the
49 left to the right margin.
52 \begin{mudela}[verbatim]
54 \notes\relative c'{c d e f | g2 g | a4 a a a | g1 |
55 f4 f f f | e2 e | d4 d d d | c1}
62 \notes\relative c'{c d e f | g2 g | a4 a a a | g1 |
63 f4 f f f | e2 e | d4 d d d | c1}
68 On my Debian 2.0 with LilyPond 1.0.17, teTex 0.9,
69 a4 paper and default line widht, the music is printet with
70 7 bars on the first line and 1 bars on the second.
72 This does not look to well, but you can fix it by setting
73 the \verb|linewidth| variable to, let's say 8 cm. The paper
83 \notes\relative c'{c d e f | g2 g | a4 a a a | g1 |
84 f4 f f f | e2 e | d4 d d d | c1}
90 The \verb|linewidth| variable is a LilyPond paper variable.
91 It is not spesific to mudela-book. See LilyPond tutorial and
92 reference manual for other variables.
95 \begin{mudela}[fragment, floating]
96 \relative c'{c c g' g | a a g2}
98 , include music in the middle of your text. Just give the option
99 \verb|floating| to \verb|\begin{mudela}|
101 Oh, you think the notes are to big to be in the middle of all those
102 small characters, that something like this,
103 \begin{mudela}[fragment, floating, 11pt]
104 \relative c'{c c g' g | a a g2}
106 , is better? If you have a lot of small music examples like this
107 in the middle of your text, you might get a nicer look by using
108 ``double'' line spacing. Put the \verb|\linespread{1.6}| command
109 into the preamble of your document. Then the line spacing will not
110 be increased between the lines where you have music printed with the
114 To change font size is easy, just give the fontsize as a parameter to
115 \verb|\begin{mudela}|. The last piece of music was created with this
117 \begin{mudela}[fragment, floating, 11pt, verbatim]
118 \relative c'{c c g' g | a a g2}
121 You can use the following font sizes:
124 \begin{mudela}[11pt, fragment, floating]
126 r16 [c d e][f d e c] [g'8 c][b-\prall c] |
127 [d16 g, a b][c a b g][d'8 g f-\prall g]
131 \begin{mudela}[13pt, fragment, floating]
133 r16 [c d e][f d e c] [g'8 c][b-\prall c] |
134 [d16 g, a b][c a b g][d'8 g f-\prall g]
138 \begin{mudela}[16pt, fragment, floating]
140 r16 [c d e][f d e c] [g'8 c][b-\prall c] |
141 [d16 g, a b][c a b g][d'8 g f-\prall g]
145 \begin{mudela}[20pt, fragment, floating]
147 r16 [c d e][f d e c] [g'8 c][b-\prall c] |
148 [d16 g, a b][c a b g][d'8 g f-\prall g]
152 \begin{mudela}[26pt, fragment, floating]
154 r16 [c d e][f d e c] [g'8 c][b-\prall c] |
155 [d16 g, a b][c a b g][d'8 g f-\prall g]
162 \begin{mudela}[11pt, fragment, floating]
163 \relative c''{\key es; r8 [g g g] es2}
166 you can see, \verb|floating| mudela don't know about margins.
167 Remember that to place the music anywhere\footnote{
169 \begin{mudela}[11pt, fragment, floating]
170 \relative c''{\key es; r8 [g g g] es2}
173 else than at the left margin you must use the option \verb|floating|.
175 \twocolumn[\Large The following is written in two columns \normalsize]
176 Sinse the version number is quite low, 0.4.0 last I checked, you
177 should be careful not to mix braces that belongs to mudela-book and
178 \LaTeX ~on the same line. The following code will probably break:
180 \verb|\footnote{\be|\verb|gin{mudela}|
182 \verb|\relative c''{ \key es; r8 [g g g] es2} |
184 \verb|\e|\verb|nd{mudela}}|
186 Mudela-book does know about \verb|\onecolumn| and \verb|\twocolumn|.
187 So the music will be adjusted to the new linewith:
188 \begin{mudela}[verbatim]
190 \notes\relative c'{c d e f | g2 g | a4 a a a | g1 |
191 f4 f f f | e2 e | d4 d d d | c1}
198 \notes\relative c'{c d e f | g2 g | a4 a a a | g1 |
199 f4 f f f | e2 e | d4 d d d | c1}
204 As in one column mode, \verb|fragment|s don't know about
206 \begin{mudela}[fragment]
207 \relative c'{[c8 e][d f][e g][f a] | [g b][a c][b d] c4 |
208 [e8 c][d b][c a][b g] | [a f][g e][f d] c4 }
210 Verbatim environments will also ignore the page margins. That is