-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathlilypond.sty
30 lines (27 loc) · 973 Bytes
/
lilypond.sty
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{lilypond}
\RequirePackage{xkeyval}
\RequirePackage{graphicx}
\newlength{\lilypond@staffsize}
\newlength{\lilypond@betweensystemspace}
\setlength{\lilypond@betweensystemspace}{20mm}
\DeclareOptionX{staffsize}[0]{\setlength{\lilypond@staffsize}{#1pt}}
\DeclareOptionX{between-system-space}[20]{%
\setlength{\lilypond@betweensystemspace}{#1mm}}
\ProcessOptionsX
\newcommand{\lilypondfile}[1]{%
\newwrite\conffile
\immediate\openout\conffile\jobname.lil
\immediate\write\conffile{[General]}
\immediate\write\conffile{filename: #1.ly}
\immediate\write\conffile{columnwidth: \the\columnwidth}
\immediate\write\conffile{}
\immediate\write\conffile{[Options]}
\immediate\write\conffile{staffsize: \the\lilypond@staffsize}
\immediate\write%
\conffile{between-system-space: \the\lilypond@betweensystemspace}
\immediate\closeout\conffile
\par
\IfFileExists{#1.eps}{\noindent\includegraphics{#1}}{}
\par
}